Index: remoting/host/window_capturer_screen_wrapper.cc |
diff --git a/remoting/host/window_capturer_screen_wrapper.cc b/remoting/host/window_capturer_screen_wrapper.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2c4f3dc73c541da1749b437dbe303ac15519ec7e |
--- /dev/null |
+++ b/remoting/host/window_capturer_screen_wrapper.cc |
@@ -0,0 +1,79 @@ |
+/* |
+ * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
Lambros
2014/07/30 00:14:50
This should be the normal Chromium copyright. Anyt
ronakvora do not use
2014/07/30 20:55:37
Done.
|
+ * |
+ * Use of this source code is governed by a BSD-style license |
+ * that can be found in the LICENSE file in the root of the source |
+ * tree. An additional intellectual property rights grant can be found |
+ * in the file PATENTS. All contributing project authors may |
+ * be found in the AUTHORS file in the root of the source tree. |
+ */ |
+ |
+#include "remoting/host/window_capturer_screen_wrapper.h" |
+ |
+#include <assert.h> |
+ |
+#include "remoting/base/logging.h" |
+#include "third_party/webrtc/base/macutils.h" |
+#include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" |
Lambros
2014/07/30 00:14:50
You shouldn't need most of these #includes. Partic
ronakvora do not use
2014/07/30 20:55:37
Done.
|
+#include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" |
+#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
+#include "third_party/webrtc/modules/desktop_capture/mac/desktop_configuration.h" |
+#include "third_party/webrtc/modules/desktop_capture/mac/window_list_utils.h" |
+#include "third_party/webrtc/system_wrappers/interface/logging.h" |
+#include "third_party/webrtc/system_wrappers/interface/tick_util.h" |
+ |
+namespace remoting { |
+ |
+WindowCapturerScreenWrapper::WindowCapturerScreenWrapper() { |
+} |
+ |
+WindowCapturerScreenWrapper::~WindowCapturerScreenWrapper() { |
+} |
+ |
+bool WindowCapturerScreenWrapper::SelectWindow |
+ (webrtc::WindowCapturer::WindowId id) { |
+ return window_capturer_->SelectWindow(id); |
+} |
+void WindowCapturerScreenWrapper::SetWindow |
+ (const webrtc::DesktopCaptureOptions& options) { |
+ window_capturer_ = webrtc::WindowCapturer::Create(options); |
+} |
+ |
+/* probably not needed for now since these methods don't get called |
Lambros
2014/07/30 00:14:50
Remove this commented-out block. It's Mac-specific
ronakvora do not use
2014/07/30 20:55:37
Done.
|
+ * directly. |
+bool WindowCapturerScreenWrapperMac::GetWindowList |
+ (webrtc::WindowCapturer::WindowList* windows) { |
+ return window_capturer_mac_->GetWindowList(windows); |
+} |
+ |
+bool WindowCapturerScreenWrapperMac::BringSelectedWindowToFront() { |
+ return window_capturer_mac_->BringSelectedWindowToFront(); |
+} |
+*/ |
+ |
+void WindowCapturerScreenWrapper::Start(Callback* callback) { |
+ window_capturer_->Start(callback); |
+} |
+ |
+void WindowCapturerScreenWrapper::Capture(const webrtc::DesktopRegion& region) { |
+ window_capturer_->Capture(region); |
+} |
+ |
+void WindowCapturerScreenWrapper::SetMouseShapeObserver( |
+ MouseShapeObserver* mouse_shape_observer) { |
+ return; |
+} |
+bool WindowCapturerScreenWrapper::GetScreenList(ScreenList* screens) { |
+ return false; |
+} |
+ |
+bool WindowCapturerScreenWrapper::SelectScreen(webrtc::ScreenId id) { |
+ return false; |
+} |
+ |
+// static |
+WindowCapturerScreenWrapper* WindowCapturerScreenWrapper::Create() { |
+ return new WindowCapturerScreenWrapper(); |
+} |
+ |
+} // namespace remoting |