Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Unified Diff: remoting/host/window_capturer_screen_wrapper.cc

Issue 422503004: Adding ability to stream windows and inject events to them (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: uploaded to remove lint errors Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698