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

Side by Side Diff: content/public/renderer/renderer_ppapi_host.h

Issue 15947004: Allow renderer to create pepper ResourceHosts in the browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 (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 CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_
6 #define CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ 6 #define CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/platform_file.h" 9 #include "base/platform_file.h"
10 #include "base/process.h" 10 #include "base/process.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "ipc/ipc_platform_file.h" 12 #include "ipc/ipc_platform_file.h"
13 #include "ppapi/c/pp_instance.h" 13 #include "ppapi/c/pp_instance.h"
14 #include "webkit/plugins/ppapi/plugin_delegate.h" 14 #include "webkit/plugins/ppapi/plugin_delegate.h"
15 15
16 namespace base { 16 namespace base {
17 class FilePath; 17 class FilePath;
18 } 18 }
19 19
20 namespace gfx { 20 namespace gfx {
21 class Point; 21 class Point;
22 } 22 }
23 23
24 namespace IPC { 24 namespace IPC {
25 struct ChannelHandle; 25 struct ChannelHandle;
26 class Message;
26 } 27 }
27 28
28 namespace ppapi { 29 namespace ppapi {
29 class PpapiPermissions; 30 class PpapiPermissions;
30 namespace host { 31 namespace host {
31 class PpapiHost; 32 class PpapiHost;
32 } 33 }
33 } 34 }
34 35
35 namespace WebKit { 36 namespace WebKit {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // message fails, the returned handle is properly closed by the IPC system. If 130 // message fails, the returned handle is properly closed by the IPC system. If
130 // |should_close_source| is set to true, the original handle is closed by this 131 // |should_close_source| is set to true, the original handle is closed by this
131 // operation and should not be used again. 132 // operation and should not be used again.
132 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( 133 virtual IPC::PlatformFileForTransit ShareHandleWithRemote(
133 base::PlatformFile handle, 134 base::PlatformFile handle,
134 bool should_close_source) = 0; 135 bool should_close_source) = 0;
135 136
136 // Returns true if the plugin is running in process. 137 // Returns true if the plugin is running in process.
137 virtual bool IsRunningInProcess() const = 0; 138 virtual bool IsRunningInProcess() const = 0;
138 139
140 // There are times when the renderer needs to create a ResourceHost in the
141 // browser. This function does so asynchronously. |nested_msg| is the
142 // resource host creation message and |instance| is the PP_Instance which
143 // the resource will belong to. |callback| will be called with the pending
144 // host ID when the ResourceHost has been created. This can be passed back
145 // to the plugin to attach to the ResourceHost. A pending ID of 0 will be
146 // returned upon error.
teravest 2013/05/29 15:19:36 small nit: Should this be "sent to the callback" i
raymes 2013/05/29 15:53:03 Done.
147 virtual void CreateBrowserResourceHost(
148 PP_Instance instance,
149 const IPC::Message& nested_msg,
150 base::Callback<void(int)> callback) const = 0;
151
139 protected: 152 protected:
140 virtual ~RendererPpapiHost() {} 153 virtual ~RendererPpapiHost() {}
141 }; 154 };
142 155
143 } // namespace content 156 } // namespace content
144 157
145 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ 158 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698