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

Side by Side Diff: remoting/host/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/client_session_unittest.cc ('k') | remoting/host/gnubby_auth_handler.h » ('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_DESKTOP_ENVIRONMENT_H_ 5 #ifndef REMOTING_HOST_DESKTOP_ENVIRONMENT_H_
6 #define REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ 6 #define REMOTING_HOST_DESKTOP_ENVIRONMENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 15
16 namespace base { 16 namespace base {
17 class SingleThreadTaskRunner; 17 class SingleThreadTaskRunner;
18 } // namespace base 18 } // namespace base
19 19
20 namespace webrtc { 20 namespace webrtc {
21 class ScreenCapturer; 21 class ScreenCapturer;
22 } // namespace webrtc 22 } // namespace webrtc
23 23
24 namespace remoting { 24 namespace remoting {
25 25
26 namespace protocol {
27 class ClientStub;
28 } // namespace protocol
29
26 class AudioCapturer; 30 class AudioCapturer;
27 class ClientSessionControl; 31 class ClientSessionControl;
32 class GnubbyAuthHandler;
28 class InputInjector; 33 class InputInjector;
29 class ScreenControls; 34 class ScreenControls;
30 35
31 // Provides factory methods for creation of audio/video capturers and event 36 // Provides factory methods for creation of audio/video capturers and event
32 // executor for a given desktop environment. 37 // executor for a given desktop environment.
33 class DesktopEnvironment { 38 class DesktopEnvironment {
34 public: 39 public:
35 virtual ~DesktopEnvironment() {} 40 virtual ~DesktopEnvironment() {}
36 41
37 // Factory methods used to create audio/video capturers, event executor, and 42 // Factory methods used to create audio/video capturers, event executor, and
38 // screen controls object for a particular desktop environment. 43 // screen controls object for a particular desktop environment.
39 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() = 0; 44 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() = 0;
40 virtual scoped_ptr<InputInjector> CreateInputInjector() = 0; 45 virtual scoped_ptr<InputInjector> CreateInputInjector() = 0;
41 virtual scoped_ptr<ScreenControls> CreateScreenControls() = 0; 46 virtual scoped_ptr<ScreenControls> CreateScreenControls() = 0;
42 virtual scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer() = 0; 47 virtual scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer() = 0;
43 48
44 // Returns the set of all capabilities supported by |this|. 49 // Returns the set of all capabilities supported by |this|.
45 virtual std::string GetCapabilities() const = 0; 50 virtual std::string GetCapabilities() const = 0;
46 51
47 // Passes the final set of capabilities negotiated between the client and host 52 // Passes the final set of capabilities negotiated between the client and host
48 // to |this|. 53 // to |this|.
49 virtual void SetCapabilities(const std::string& capabilities) = 0; 54 virtual void SetCapabilities(const std::string& capabilities) = 0;
55
56 // Factory method to create a gnubby auth handler suitable for the particular
57 // desktop environment.
58 virtual scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler(
59 protocol::ClientStub* client_stub) = 0;
50 }; 60 };
51 61
52 // Used to create |DesktopEnvironment| instances. 62 // Used to create |DesktopEnvironment| instances.
53 class DesktopEnvironmentFactory { 63 class DesktopEnvironmentFactory {
54 public: 64 public:
55 virtual ~DesktopEnvironmentFactory() {} 65 virtual ~DesktopEnvironmentFactory() {}
56 66
57 // Creates an instance of |DesktopEnvironment|. Returns a NULL pointer if 67 // Creates an instance of |DesktopEnvironment|. Returns a NULL pointer if
58 // the desktop environment could not be created for any reason (if the curtain 68 // the desktop environment could not be created for any reason (if the curtain
59 // failed to active for instance). |client_session_control| must outlive 69 // failed to active for instance). |client_session_control| must outlive
60 // the created desktop environment. 70 // the created desktop environment.
61 virtual scoped_ptr<DesktopEnvironment> Create( 71 virtual scoped_ptr<DesktopEnvironment> Create(
62 base::WeakPtr<ClientSessionControl> client_session_control) = 0; 72 base::WeakPtr<ClientSessionControl> client_session_control) = 0;
63 73
64 // Enables or disables the curtain mode. 74 // Enables or disables the curtain mode.
65 virtual void SetEnableCurtaining(bool enable) {} 75 virtual void SetEnableCurtaining(bool enable) {}
66 76
67 // Returns |true| if created |DesktopEnvironment| instances support audio 77 // Returns |true| if created |DesktopEnvironment| instances support audio
68 // capture. 78 // capture.
69 virtual bool SupportsAudioCapture() const = 0; 79 virtual bool SupportsAudioCapture() const = 0;
80
81 // Enables or disables gnubby authentication.
82 virtual void SetEnableGnubbyAuth(bool enable) {}
70 }; 83 };
71 84
72 } // namespace remoting 85 } // namespace remoting
73 86
74 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ 87 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_
OLDNEW
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/gnubby_auth_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698