OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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_WINDOW_DESKTOP_ENVIRONMENT_H_ |
| 6 #define REMOTING_HOST_WINDOW_DESKTOP_ENVIRONMENT_H_ |
| 7 |
| 8 #include "remoting/host/basic_desktop_environment.h" |
| 9 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_types.h" |
| 10 |
| 11 namespace remoting { |
| 12 // Enables capturing and streaming of windows. |
| 13 class SingleWindowDesktopEnvironment : |
| 14 public BasicDesktopEnvironment { |
| 15 public: |
| 16 virtual ~SingleWindowDesktopEnvironment(); |
| 17 |
| 18 // DesktopEnvironment interface. |
| 19 virtual scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer() OVERRIDE; |
| 20 virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE; |
| 21 |
| 22 protected: |
| 23 friend class SingleWindowDesktopEnvironmentFactory; |
| 24 SingleWindowDesktopEnvironment( |
| 25 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| 26 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
| 27 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); |
| 28 |
| 29 void SetWindowId(webrtc::WindowId windowIdEnvironment); |
| 30 |
| 31 private: |
| 32 webrtc::WindowId window_id_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(SingleWindowDesktopEnvironment); |
| 35 }; |
| 36 |
| 37 // Used to create |SingleWindowDesktopEnvironment| instances. |
| 38 class SingleWindowDesktopEnvironmentFactory : |
| 39 public BasicDesktopEnvironmentFactory { |
| 40 public: |
| 41 SingleWindowDesktopEnvironmentFactory( |
| 42 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| 43 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
| 44 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
| 45 webrtc::WindowId windowId); |
| 46 virtual ~SingleWindowDesktopEnvironmentFactory(); |
| 47 |
| 48 // DesktopEnvironmentFactory interface. |
| 49 virtual scoped_ptr<DesktopEnvironment> Create( |
| 50 base::WeakPtr<ClientSessionControl> client_session_control) OVERRIDE; |
| 51 |
| 52 private: |
| 53 webrtc::WindowId window_id_; |
| 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(SingleWindowDesktopEnvironmentFactory); |
| 56 }; |
| 57 |
| 58 } // namespace remoting |
| 59 |
| 60 #endif // REMOTING_HOST_WINDOW_DESKTOP_ENVIRONMENT_H_ |
OLD | NEW |