Index: remoting/host/window_capturer_screen_wrapper.h |
diff --git a/remoting/host/window_capturer_screen_wrapper.h b/remoting/host/window_capturer_screen_wrapper.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7b6bd0ebffac5f8a62c01d391f15c3c156960817 |
--- /dev/null |
+++ b/remoting/host/window_capturer_screen_wrapper.h |
@@ -0,0 +1,42 @@ |
+// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
Wez
2014/08/01 23:41:55
Lose the (c), please.
ronakvora do not use
2014/08/05 19:54:51
Done.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" |
+#include "third_party/webrtc/modules/desktop_capture/window_capturer.h" |
Wez
2014/08/01 23:41:55
You don't need this include, I don't think; just f
ronakvora do not use
2014/08/05 19:54:51
Done. Added the include to the cc file.
|
+ |
+namespace remoting { |
+ |
+// This class wraps a WindowCapturer instance. The reason we do this |
+// is becaues the remoting_me2me_host uses a screen capturer interface. |
+// Instead of adding support for a window_capturer_interface, which |
+// is not really needed, we simply wrap a WindowCapturer inside of a |
+// ScreenCapturer and delegate messages sent to this class to the |
+// wrapped WindowCapturer. |
Wez
2014/08/01 23:41:55
Do you actually need to proxy these calls through?
Wez
2014/08/01 23:41:55
You shouldn't need this class at all, in fact; the
ronakvora do not use
2014/08/05 19:54:51
Yep. The original plan was to change the interface
ronakvora do not use
2014/08/05 19:54:51
Done.
|
+class WindowCapturerScreenWrapper : public ::webrtc::ScreenCapturer { |
Wez
2014/08/01 23:41:55
Lose the :: before webrtc.
ronakvora do not use
2014/08/05 19:54:51
Done.
|
+ public: |
+ WindowCapturerScreenWrapper(); |
+ virtual ~WindowCapturerScreenWrapper(); |
+ |
+ // WindowCapturer interface. |
Wez
2014/08/01 23:41:55
This class doesn't provide the WindowCapturer, int
ronakvora do not use
2014/08/05 19:54:51
Removed. I used to have all the methods of WindowC
|
+ bool SelectWindow(webrtc::WindowId id); |
+ void SetWindow(const webrtc::DesktopCaptureOptions& options); |
Wez
2014/08/01 23:41:55
What's the differencing between "selecting" and "s
ronakvora do not use
2014/08/05 19:54:51
The SetWindow just creates the wrapped WindowCaptu
|
+ |
+ // DesktopCapturer interface. |
Wez
2014/08/01 23:41:55
nit: webrtc::DesktopCapturer for consistency, or j
ronakvora do not use
2014/08/05 19:54:51
Done.
|
+ virtual void Start(DesktopCapturer::Callback* callback) OVERRIDE; |
+ virtual void Capture(const webrtc::DesktopRegion& region) OVERRIDE; |
+ |
+ // webrtc::ScreenCapturer interface. |
+ virtual void SetMouseShapeObserver( |
+ MouseShapeObserver* mouse_shape_observer) OVERRIDE; |
+ virtual bool GetScreenList(ScreenList* screens) OVERRIDE; |
+ virtual bool SelectScreen(webrtc::ScreenId id) OVERRIDE; |
+ |
+ private: |
+ webrtc::WindowCapturer* window_capturer_; |
Wez
2014/08/01 23:41:55
scoped_ptr<WindowCapturer>
ronakvora do not use
2014/08/05 19:54:51
Done.
|
+ |
+ DISALLOW_COPY_AND_ASSIGN(WindowCapturerScreenWrapper); |
+}; |
+ |
+ |
+} // namespace remoting |