1 // Copyright 2018 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef REMOTING_HOST_WIN_SESSION_ACTION_EXECUTOR_H_ 6 #define REMOTING_HOST_WIN_SESSION_ACTION_EXECUTOR_H_ 7 8 #include <memory> 9 10 #include "base/callback.h" 11 #include "base/macros.h" 12 #include "base/memory/ref_counted.h" 13 #include "remoting/host/action_executor.h" 14 15 namespace base { 16 class SingleThreadTaskRunner; 17 } // namespace base 18 19 namespace remoting { 20 21 class SessionActionExecutor : public ActionExecutor { 22 public: 23 // |inject_sas| and |lock_workstation| are invoked on 24 // |execute_action_task_runner|. 25 SessionActionExecutor( 26 scoped_refptr<base::SingleThreadTaskRunner> execute_action_task_runner, 27 const base::RepeatingClosure& inject_sas, 28 const base::RepeatingClosure& lock_workstation); 29 ~SessionActionExecutor() override; 30 31 // ActionExecutor implementation. 32 void ExecuteAction(const protocol::ActionRequest& request) override; 33 34 private: 35 scoped_refptr<base::SingleThreadTaskRunner> execute_action_task_runner_; 36 37 // Injects the Secure Attention Sequence. 38 base::RepeatingClosure inject_sas_; 39 40 // Locks the current session. 41 base::RepeatingClosure lock_workstation_; 42 43 DISALLOW_COPY_AND_ASSIGN(SessionActionExecutor); 44 }; 45 46 } // namespace remoting 47 48 #endif // REMOTING_HOST_WIN_SESSION_ACTION_EXECUTOR_H_ 49