Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / remoting / host / host_extension_session.h
bloba4a0bd710abd7c776688028bd9b4ce2bb52d32c3
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
3 // found in the LICENSE file.
5 #ifndef REMOTING_HOST_HOST_EXTENSION_SESSION_H_
6 #define REMOTING_HOST_HOST_EXTENSION_SESSION_H_
8 #include "base/memory/scoped_ptr.h"
10 namespace webrtc {
11 class DesktopCapturer;
14 namespace remoting {
16 class ClientSessionControl;
17 class VideoEncoder;
19 namespace protocol {
20 class ExtensionMessage;
21 class ClientStub;
22 } // namespace protocol
24 // Created by an |HostExtension| to store |ClientSession| specific state, and to
25 // handle extension messages.
26 class HostExtensionSession {
27 public:
28 virtual ~HostExtensionSession() {}
30 // Optional hook functions for HostExtensions which need to wrap or replace
31 // parts of the video, audio, input, etc pipelines.
32 // These are called in response to ResetVideoPipeline().
33 virtual scoped_ptr<webrtc::DesktopCapturer> OnCreateVideoCapturer(
34 scoped_ptr<webrtc::DesktopCapturer> capturer);
35 virtual scoped_ptr<VideoEncoder> OnCreateVideoEncoder(
36 scoped_ptr<VideoEncoder> encoder);
37 virtual bool ModifiesVideoPipeline() const;
39 // Called when the host receives an |ExtensionMessage| for the |ClientSession|
40 // associated with this |HostExtensionSession|.
41 // It returns |true| if the message was handled, and |false| otherwise.
42 virtual bool OnExtensionMessage(
43 ClientSessionControl* client_session_control,
44 protocol::ClientStub* client_stub,
45 const protocol::ExtensionMessage& message) = 0;
48 } // namespace remoting
50 #endif // REMOTING_HOST_HOST_EXTENSION_SESSION_H_