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

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

Issue 455073004: Switch DesktopEnvironment to return a DesktopCapturer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove ShapedDesktopCapturer::Create() Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_HOST_EXTENSION_SESSION_MANAGER_H_ 5 #ifndef REMOTING_HOST_HOST_EXTENSION_SESSION_MANAGER_H_
6 #define REMOTING_HOST_HOST_EXTENSION_SESSION_MANAGER_H_ 6 #define REMOTING_HOST_HOST_EXTENSION_SESSION_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 13
14 namespace webrtc { 14 namespace webrtc {
15 class ScreenCapturer; 15 class DesktopCapturer;
16 } 16 }
17 17
18 namespace remoting { 18 namespace remoting {
19 19
20 class ClientSessionControl; 20 class ClientSessionControl;
21 class HostExtension; 21 class HostExtension;
22 class HostExtensionSession; 22 class HostExtensionSession;
23 class VideoEncoder; 23 class VideoEncoder;
24 24
25 namespace protocol { 25 namespace protocol {
26 class ClientStub; 26 class ClientStub;
27 class ExtensionMessage; 27 class ExtensionMessage;
28 } 28 }
29 29
30 // Helper class used to create and manage a set of HostExtensionSession 30 // Helper class used to create and manage a set of HostExtensionSession
31 // instances depending upon the set of registered HostExtensions, and the 31 // instances depending upon the set of registered HostExtensions, and the
32 // set of capabilities negotiated between client and host. 32 // set of capabilities negotiated between client and host.
33 class HostExtensionSessionManager { 33 class HostExtensionSessionManager {
34 public: 34 public:
35 // Creates an extension manager for the specified |extensions|. 35 // Creates an extension manager for the specified |extensions|.
36 HostExtensionSessionManager(const std::vector<HostExtension*>& extensions, 36 HostExtensionSessionManager(const std::vector<HostExtension*>& extensions,
37 ClientSessionControl* client_session_control); 37 ClientSessionControl* client_session_control);
38 virtual ~HostExtensionSessionManager(); 38 virtual ~HostExtensionSessionManager();
39 39
40 // Returns the union of all capabilities supported by registered extensions. 40 // Returns the union of all capabilities supported by registered extensions.
41 std::string GetCapabilities(); 41 std::string GetCapabilities();
42 42
43 // Calls the corresponding hook functions in each extension in turn, to give 43 // Calls the corresponding hook functions in each extension in turn, to give
44 // them an opportunity to wrap or replace video components. 44 // them an opportunity to wrap or replace video components.
45 scoped_ptr<webrtc::ScreenCapturer> OnCreateVideoCapturer( 45 scoped_ptr<webrtc::DesktopCapturer> OnCreateVideoCapturer(
46 scoped_ptr<webrtc::ScreenCapturer> capturer); 46 scoped_ptr<webrtc::DesktopCapturer> capturer);
47 scoped_ptr<VideoEncoder> OnCreateVideoEncoder( 47 scoped_ptr<VideoEncoder> OnCreateVideoEncoder(
48 scoped_ptr<VideoEncoder> encoder); 48 scoped_ptr<VideoEncoder> encoder);
49 49
50 // Handles completion of authentication and capabilities negotiation, creating 50 // Handles completion of authentication and capabilities negotiation, creating
51 // the set of |HostExtensionSession| to match the client's capabilities. 51 // the set of |HostExtensionSession| to match the client's capabilities.
52 void OnNegotiatedCapabilities(protocol::ClientStub* client_stub, 52 void OnNegotiatedCapabilities(protocol::ClientStub* client_stub,
53 const std::string& capabilities); 53 const std::string& capabilities);
54 54
55 // Passes |message| to each |HostExtensionSession| in turn until the message 55 // Passes |message| to each |HostExtensionSession| in turn until the message
56 // is handled, or none remain. Returns true if the message was handled. 56 // is handled, or none remain. Returns true if the message was handled.
(...skipping 14 matching lines...) Expand all
71 71
72 // List of HostExtensionSessions, used to handle extension messages. 72 // List of HostExtensionSessions, used to handle extension messages.
73 HostExtensionSessionList extension_sessions_; 73 HostExtensionSessionList extension_sessions_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(HostExtensionSessionManager); 75 DISALLOW_COPY_AND_ASSIGN(HostExtensionSessionManager);
76 }; 76 };
77 77
78 } // namespace remoting 78 } // namespace remoting
79 79
80 #endif // REMOTING_HOST_HOST_EXTENSION_SESSION_MANAGER_H_ 80 #endif // REMOTING_HOST_HOST_EXTENSION_SESSION_MANAGER_H_
OLDNEW
« no previous file with comments | « remoting/host/host_extension_session.cc ('k') | remoting/host/host_extension_session_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698