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

Unified Diff: remoting/host/me2me_window_desktop_environment.h

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: I updated the code with almost all of the comments Lambros had. The exceptions are the redesign of … 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/me2me_window_desktop_environment.h
diff --git a/remoting/host/me2me_window_desktop_environment.h b/remoting/host/me2me_window_desktop_environment.h
new file mode 100644
index 0000000000000000000000000000000000000000..e33ef28a17351036f997bde90503047b53d2a4a7
--- /dev/null
+++ b/remoting/host/me2me_window_desktop_environment.h
@@ -0,0 +1,61 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
Wez 2014/08/01 23:41:54 nit: No (c) please.
ronakvora do not use 2014/08/05 19:54:50 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_
+#define REMOTING_HOST_WINDOW_DESKTOP_ENVIRONMENT_H_
+
+#include "remoting/host/basic_desktop_environment.h"
+#include "remoting/host/input_injector.h"
Wez 2014/08/01 23:41:54 Why do you need this?
ronakvora do not use 2014/08/05 19:54:50 I needed it for me2me_window_desktop_environment.c
+#include "third_party/webrtc/modules/desktop_capture/desktop_capture_types.h"
+
+namespace remoting {
+
+// Enables capturing and streaming of windows.
+class Me2MeWindowDesktopEnvironment :
Wez 2014/08/01 23:41:54 Suggest SingleWindowDesktopEnvironment
Wez 2014/08/01 23:41:54 This is a definition of a class that is only creat
ronakvora do not use 2014/08/05 19:54:50 The reason I did it this way is because it's decla
ronakvora do not use 2014/08/05 19:54:50 Done.
+ public BasicDesktopEnvironment {
+ public:
+ virtual ~Me2MeWindowDesktopEnvironment();
+
+ // DesktopEnvironment interface.
+ virtual scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer() OVERRIDE;
+ virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE;
+
+ protected:
+ friend class Me2MeWindowDesktopEnvironmentFactory;
+ Me2MeWindowDesktopEnvironment(
+ 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);
+
+ private:
+ webrtc::WindowId windowIdEnvironment_;
Wez 2014/08/01 23:41:54 Do you mean window_id_?
ronakvora do not use 2014/08/05 19:54:50 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(Me2MeWindowDesktopEnvironment);
+};
+
+// Used to create |Me2MeWindowDesktopEnvironment| instances.
+class Me2MeWindowDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory {
Wez 2014/08/01 23:41:54 Line too long; presubmit should have caught this?
ronakvora do not use 2014/08/05 19:54:50 It did. Thought I had changed it. Done.
+ public:
+ Me2MeWindowDesktopEnvironmentFactory(
+ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
+ webrtc::WindowId windowId);
+ virtual ~Me2MeWindowDesktopEnvironmentFactory();
+
+ // DesktopEnvironmentFactory interface.
+ virtual scoped_ptr<DesktopEnvironment> Create(
+ base::WeakPtr<ClientSessionControl> client_session_control) OVERRIDE;
+
+ private:
+ webrtc::WindowId windowIdEnvironmentFactory_;
Wez 2014/08/01 23:41:54 Do you mean window_id_?
ronakvora do not use 2014/08/05 19:54:50 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(Me2MeWindowDesktopEnvironmentFactory);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_WINDOW_DESKTOP_ENVIRONMENT_H_

Powered by Google App Engine
This is Rietveld 408576698