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

Side by Side Diff: remoting/host/me2me_desktop_environment.h

Issue 138753005: Add gnubby authentication to remoting host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another Windows warning Created 6 years, 10 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 unified diff | Download patch
« no previous file with comments | « remoting/host/ipc_desktop_environment.cc ('k') | remoting/host/me2me_desktop_environment.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_ 5 #ifndef REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_
6 #define REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_ 6 #define REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_
7 7
8 #include "remoting/host/basic_desktop_environment.h" 8 #include "remoting/host/basic_desktop_environment.h"
9 9
10 namespace remoting { 10 namespace remoting {
11 11
12 class CurtainMode; 12 class CurtainMode;
13 class HostWindow; 13 class HostWindow;
14 class LocalInputMonitor; 14 class LocalInputMonitor;
15 15
16 // Same as BasicDesktopEnvironment but supports desktop resizing and X DAMAGE 16 // Same as BasicDesktopEnvironment but supports desktop resizing and X DAMAGE
17 // notifications on Linux. 17 // notifications on Linux.
18 class Me2MeDesktopEnvironment : public BasicDesktopEnvironment { 18 class Me2MeDesktopEnvironment : public BasicDesktopEnvironment {
19 public: 19 public:
20 virtual ~Me2MeDesktopEnvironment(); 20 virtual ~Me2MeDesktopEnvironment();
21 21
22 // DesktopEnvironment interface. 22 // DesktopEnvironment interface.
23 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE; 23 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE;
24 virtual scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer() OVERRIDE; 24 virtual scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer() OVERRIDE;
25 virtual std::string GetCapabilities() const OVERRIDE; 25 virtual std::string GetCapabilities() const OVERRIDE;
26 virtual scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler(
27 protocol::ClientStub* client_stub) OVERRIDE;
26 28
27 protected: 29 protected:
28 friend class Me2MeDesktopEnvironmentFactory; 30 friend class Me2MeDesktopEnvironmentFactory;
29 Me2MeDesktopEnvironment( 31 Me2MeDesktopEnvironment(
30 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 32 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
31 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 33 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
32 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); 34 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
33 35
34 // Initializes security features of the desktop environment (the curtain mode 36 // Initializes security features of the desktop environment (the curtain mode
35 // and in-session UI). 37 // and in-session UI).
36 bool InitializeSecurity( 38 bool InitializeSecurity(
37 base::WeakPtr<ClientSessionControl> client_session_control, 39 base::WeakPtr<ClientSessionControl> client_session_control,
38 bool curtain_enabled); 40 bool curtain_enabled);
39 41
42 void SetEnableGnubbyAuth(bool gnubby_auth_enabled);
43
40 private: 44 private:
41 // "Curtains" the session making sure it is disconnected from the local 45 // "Curtains" the session making sure it is disconnected from the local
42 // console. 46 // console.
43 scoped_ptr<CurtainMode> curtain_; 47 scoped_ptr<CurtainMode> curtain_;
44 48
45 // Presents the disconnect window to the local user. 49 // Presents the disconnect window to the local user.
46 scoped_ptr<HostWindow> disconnect_window_; 50 scoped_ptr<HostWindow> disconnect_window_;
47 51
48 // Notifies the client session about the local mouse movements. 52 // Notifies the client session about the local mouse movements.
49 scoped_ptr<LocalInputMonitor> local_input_monitor_; 53 scoped_ptr<LocalInputMonitor> local_input_monitor_;
50 54
55 // True if gnubby auth is enabled.
56 bool gnubby_auth_enabled_;
57
51 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironment); 58 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironment);
52 }; 59 };
53 60
54 // Used to create |Me2MeDesktopEnvironment| instances. 61 // Used to create |Me2MeDesktopEnvironment| instances.
55 class Me2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory { 62 class Me2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory {
56 public: 63 public:
57 Me2MeDesktopEnvironmentFactory( 64 Me2MeDesktopEnvironmentFactory(
58 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 65 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
59 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 66 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
60 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); 67 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
61 virtual ~Me2MeDesktopEnvironmentFactory(); 68 virtual ~Me2MeDesktopEnvironmentFactory();
62 69
63 // DesktopEnvironmentFactory interface. 70 // DesktopEnvironmentFactory interface.
64 virtual scoped_ptr<DesktopEnvironment> Create( 71 virtual scoped_ptr<DesktopEnvironment> Create(
65 base::WeakPtr<ClientSessionControl> client_session_control) OVERRIDE; 72 base::WeakPtr<ClientSessionControl> client_session_control) OVERRIDE;
66 virtual void SetEnableCurtaining(bool enable) OVERRIDE; 73 virtual void SetEnableCurtaining(bool enable) OVERRIDE;
74 virtual void SetEnableGnubbyAuth(bool enable) OVERRIDE;
67 75
68 protected: 76 protected:
69 bool curtain_enabled() const { return curtain_enabled_; } 77 bool curtain_enabled() const { return curtain_enabled_; }
70 78
71 private: 79 private:
72 // True if curtain mode is enabled. 80 // True if curtain mode is enabled.
73 bool curtain_enabled_; 81 bool curtain_enabled_;
74 82
83 // True if gnubby auth is enabled.
84 bool gnubby_auth_enabled_;
85
75 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironmentFactory); 86 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironmentFactory);
76 }; 87 };
77 88
78 } // namespace remoting 89 } // namespace remoting
79 90
80 #endif // REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_ 91 #endif // REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_
OLDNEW
« no previous file with comments | « remoting/host/ipc_desktop_environment.cc ('k') | remoting/host/me2me_desktop_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698