Bring the browser window to the front when clicking on deprecated accelerator notific...
[chromium-blink-merge.git] / remoting / host / host_extension_session.h
blob1c51644c15a452a2273ace98650e1b0c1e4622fe
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 // Hook functions called when the video pipeline is being (re)constructed.
31 // Implementations will receive these calls only if they express the need to
32 // modify the pipeline (see below). They may replace or wrap |capturer| and/or
33 // |encoder|, e.g. to filter video frames in some way.
34 // If either |capturer| or |encoder| are reset then the video pipeline is not
35 // constructed.
36 virtual void OnCreateVideoCapturer(
37 scoped_ptr<webrtc::DesktopCapturer>* capturer);
38 virtual void OnCreateVideoEncoder(scoped_ptr<VideoEncoder>* encoder);
40 // Must return true if the HostExtensionSession needs the opportunity to
41 // modify the video pipeline.
42 virtual bool ModifiesVideoPipeline() const;
44 // Called when the host receives an |ExtensionMessage| for the |ClientSession|
45 // associated with this |HostExtensionSession|.
46 // It returns |true| if the message was handled, and |false| otherwise.
47 virtual bool OnExtensionMessage(
48 ClientSessionControl* client_session_control,
49 protocol::ClientStub* client_stub,
50 const protocol::ExtensionMessage& message) = 0;
53 } // namespace remoting
55 #endif // REMOTING_HOST_HOST_EXTENSION_SESSION_H_