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

Side by Side Diff: ppapi/host/ppapi_host.h

Issue 128683003: [PPAPI] Implement media stream video track API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@video_track_impl_cl
Patch Set: Fix review issue Created 6 years, 11 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
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 PPAPI_HOST_PPAPI_HOST_H_ 5 #ifndef PPAPI_HOST_PPAPI_HOST_H_
6 #define PPAPI_HOST_PPAPI_HOST_H_ 6 #define PPAPI_HOST_PPAPI_HOST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector>
9 10
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
11 #include "base/memory/linked_ptr.h" 12 #include "base/memory/linked_ptr.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/scoped_vector.h" 14 #include "base/memory/scoped_vector.h"
14 #include "base/observer_list.h" 15 #include "base/observer_list.h"
15 #include "ipc/ipc_listener.h" 16 #include "ipc/ipc_listener.h"
16 #include "ipc/ipc_sender.h" 17 #include "ipc/ipc_sender.h"
17 #include "ppapi/c/pp_instance.h" 18 #include "ppapi/c/pp_instance.h"
18 #include "ppapi/c/pp_resource.h" 19 #include "ppapi/c/pp_resource.h"
19 #include "ppapi/host/ppapi_host_export.h" 20 #include "ppapi/host/ppapi_host_export.h"
20 #include "ppapi/shared_impl/ppapi_permissions.h" 21 #include "ppapi/shared_impl/ppapi_permissions.h"
21 22
22 namespace ppapi { 23 namespace ppapi {
23 24
24 namespace proxy { 25 namespace proxy {
25 class ResourceMessageCallParams; 26 class ResourceMessageCallParams;
26 class ResourceMessageReplyParams; 27 class ResourceMessageReplyParams;
28 class SerializedHandle;
27 } 29 }
28 30
29 namespace host { 31 namespace host {
30 32
31 class HostFactory; 33 class HostFactory;
32 struct HostMessageContext; 34 struct HostMessageContext;
33 class InstanceMessageFilter; 35 class InstanceMessageFilter;
34 struct ReplyMessageContext; 36 struct ReplyMessageContext;
35 class ResourceHost; 37 class ResourceHost;
36 38
(...skipping 17 matching lines...) Expand all
54 // Listener implementation. 56 // Listener implementation.
55 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 57 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
56 58
57 // Sends the given reply message to the plugin. 59 // Sends the given reply message to the plugin.
58 void SendReply(const ReplyMessageContext& context, 60 void SendReply(const ReplyMessageContext& context,
59 const IPC::Message& msg); 61 const IPC::Message& msg);
60 62
61 // Sends the given unsolicited reply message to the plugin. 63 // Sends the given unsolicited reply message to the plugin.
62 void SendUnsolicitedReply(PP_Resource resource, const IPC::Message& msg); 64 void SendUnsolicitedReply(PP_Resource resource, const IPC::Message& msg);
63 65
66 //Similar to |SendUnsolicitedReply()|, but it supports sending file handles.
bbudge 2014/01/10 22:57:06 Consider: // Similar to |SendUnsolicitedReply()|,
Peng 2014/01/13 19:10:15 Done.
67 void SendUnsolicitedReplyWithHandles(
68 PP_Resource resource,
69 const IPC::Message& msg,
70 const std::vector<proxy::SerializedHandle>& handles);
71
64 // Create a ResourceHost with the given |nested_msg|. 72 // Create a ResourceHost with the given |nested_msg|.
65 scoped_ptr<ResourceHost> CreateResourceHost( 73 scoped_ptr<ResourceHost> CreateResourceHost(
66 const proxy::ResourceMessageCallParams& params, 74 const proxy::ResourceMessageCallParams& params,
67 PP_Instance instance, 75 PP_Instance instance,
68 const IPC::Message& nested_msg); 76 const IPC::Message& nested_msg);
69 77
70 // Adds the given host resource as a pending one (with no corresponding 78 // Adds the given host resource as a pending one (with no corresponding
71 // PluginResource object and no PP_Resource ID yet). The pending resource ID 79 // PluginResource object and no PP_Resource ID yet). The pending resource ID
72 // is returned. See PpapiHostMsg_AttachToPendingHost. 80 // is returned. See PpapiHostMsg_AttachToPendingHost.
73 int AddPendingResourceHost(scoped_ptr<ResourceHost> resource_host); 81 int AddPendingResourceHost(scoped_ptr<ResourceHost> resource_host);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 PendingHostResourceMap pending_resource_hosts_; 143 PendingHostResourceMap pending_resource_hosts_;
136 int next_pending_resource_host_id_; 144 int next_pending_resource_host_id_;
137 145
138 DISALLOW_COPY_AND_ASSIGN(PpapiHost); 146 DISALLOW_COPY_AND_ASSIGN(PpapiHost);
139 }; 147 };
140 148
141 } // namespace host 149 } // namespace host
142 } // namespace ppapi 150 } // namespace ppapi
143 151
144 #endif // PPAPI_HOST_PPAPIE_HOST_H_ 152 #endif // PPAPI_HOST_PPAPIE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698