Chromium Code Reviews| Index: remoting/host/me2me_single_window_desktop_environment.h |
| diff --git a/remoting/host/me2me_single_window_desktop_environment.h b/remoting/host/me2me_single_window_desktop_environment.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f917488b671fce8a2b86f438c3f29a86cdfab26e |
| --- /dev/null |
| +++ b/remoting/host/me2me_single_window_desktop_environment.h |
| @@ -0,0 +1,62 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
|
Wez
2014/08/06 04:10:16
This file should be called single_window_desktop_e
ronakvora do not use
2014/08/06 20:56:18
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef REMOTING_HOST_WINDOW_DESKTOP_ENVIRONMENT_H_ |
|
Lambros
2014/08/05 22:47:24
nit: REMOTING_HOST_ME2ME_SINGLE_WINDOW_DESKTOP_ENV
Wez
2014/08/06 04:10:16
REMOTING_HOST_SINGLE_WINDOW_DESKTOP_ENVIRONMENT_H_
ronakvora do not use
2014/08/06 20:56:17
Done.
ronakvora do not use
2014/08/06 20:56:18
Done.
|
| +#define REMOTING_HOST_WINDOW_DESKTOP_ENVIRONMENT_H_ |
| + |
| +#include "remoting/host/basic_desktop_environment.h" |
| +#include "third_party/webrtc/modules/desktop_capture/desktop_capture_types.h" |
| + |
| +namespace remoting { |
| + |
| +// Enables capturing and streaming of windows. |
| +class SingleWindowDesktopEnvironment : |
|
Wez
2014/08/06 04:10:16
This doesn't need to be defined in the header - it
ronakvora do not use
2014/08/06 20:56:18
Done.
|
| + public BasicDesktopEnvironment { |
|
Lambros
2014/08/05 22:47:24
nit: This will fit on one line.
ronakvora do not use
2014/08/06 20:56:18
Done.
|
| + |
| + public: |
| + virtual ~SingleWindowDesktopEnvironment(); |
| + |
| + // DesktopEnvironment interface. |
| + virtual scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer() OVERRIDE; |
| + virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE; |
| + |
| + protected: |
| + friend class SingleWindowDesktopEnvironmentFactory; |
| + SingleWindowDesktopEnvironment( |
| + scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| + scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
| + scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); |
| + |
| + void SetWindowId(webrtc::WindowId windowIdEnvironment); |
|
Lambros
2014/08/05 22:47:24
nit: s/windowIdEnvironment/window_id
(and also in
Wez
2014/08/06 04:10:16
Why not pass this directly to the ctor, like you d
ronakvora do not use
2014/08/06 20:56:18
I believe this was just easier for me at the time
ronakvora do not use
2014/08/06 20:56:18
Just removed it as wez suggested.
|
| + |
| + private: |
| + webrtc::WindowId window_id_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SingleWindowDesktopEnvironment); |
|
Wez
2014/08/06 04:10:16
nit: Indentation should be two spaces.
ronakvora do not use
2014/08/06 20:56:18
Done.
|
| +}; |
| + |
| +// Used to create |SingleWindowDesktopEnvironment| instances. |
|
Wez
2014/08/06 04:10:16
This is already implicit in the name of the class.
ronakvora do not use
2014/08/06 20:56:18
Done.
|
| +class SingleWindowDesktopEnvironmentFactory : |
|
Wez
2014/08/06 04:10:15
nit: Wrap before the :
ronakvora do not use
2014/08/06 20:56:17
Done.
|
| + public BasicDesktopEnvironmentFactory { |
| + public: |
| + SingleWindowDesktopEnvironmentFactory( |
| + scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| + scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
| + scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
| + webrtc::WindowId windowId); |
|
Wez
2014/08/06 04:10:15
window_id
ronakvora do not use
2014/08/06 20:56:18
Done.
|
| + virtual ~SingleWindowDesktopEnvironmentFactory(); |
| + |
| + // DesktopEnvironmentFactory interface. |
| + virtual scoped_ptr<DesktopEnvironment> Create( |
| + base::WeakPtr<ClientSessionControl> client_session_control) OVERRIDE; |
| + |
| + private: |
| + webrtc::WindowId window_id_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SingleWindowDesktopEnvironmentFactory); |
|
Wez
2014/08/06 04:10:15
nit: Indentation should be two spaces.
ronakvora do not use
2014/08/06 20:56:17
Done.
|
| +}; |
| + |
| +} // namespace remoting |
| + |
| +#endif // REMOTING_HOST_WINDOW_DESKTOP_ENVIRONMENT_H_ |