action_executor.h 967 B

123456789101112131415161718192021222324252627282930313233343536
  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. #ifndef REMOTING_HOST_ACTION_EXECUTOR_H_
  5. #define REMOTING_HOST_ACTION_EXECUTOR_H_
  6. #include <memory>
  7. namespace remoting {
  8. namespace protocol {
  9. class ActionRequest;
  10. } // namespace protocol
  11. class ActionExecutor {
  12. public:
  13. ActionExecutor(const ActionExecutor&) = delete;
  14. ActionExecutor& operator=(const ActionExecutor&) = delete;
  15. virtual ~ActionExecutor();
  16. // Creates an action executor for the current platform / host architecture.
  17. static std::unique_ptr<ActionExecutor> Create();
  18. // Implementations must never assume the presence of any |request| fields,
  19. // nor assume that their contents are valid.
  20. virtual void ExecuteAction(const protocol::ActionRequest& request) = 0;
  21. protected:
  22. ActionExecutor();
  23. };
  24. } // namespace remoting
  25. #endif // REMOTING_HOST_ACTION_EXECUTOR_H_