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

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

Issue 23011018: Modify Pepper CreateResourceHostFromHost to create multiple hosts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 (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 <vector>
9
8 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
9 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
10 #include "base/platform_file.h" 12 #include "base/platform_file.h"
11 #include "base/process/process.h" 13 #include "base/process/process.h"
12 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
13 #include "ipc/ipc_platform_file.h" 15 #include "ipc/ipc_platform_file.h"
14 #include "ppapi/c/pp_instance.h" 16 #include "ppapi/c/pp_instance.h"
15 17
16 namespace base { 18 namespace base {
17 class FilePath; 19 class FilePath;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // |should_close_source| is set to true, the original handle is closed by this 105 // |should_close_source| is set to true, the original handle is closed by this
104 // operation and should not be used again. 106 // operation and should not be used again.
105 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( 107 virtual IPC::PlatformFileForTransit ShareHandleWithRemote(
106 base::PlatformFile handle, 108 base::PlatformFile handle,
107 bool should_close_source) = 0; 109 bool should_close_source) = 0;
108 110
109 // Returns true if the plugin is running in process. 111 // Returns true if the plugin is running in process.
110 virtual bool IsRunningInProcess() const = 0; 112 virtual bool IsRunningInProcess() const = 0;
111 113
112 // There are times when the renderer needs to create a ResourceHost in the 114 // There are times when the renderer needs to create a ResourceHost in the
113 // browser. This function does so asynchronously. |nested_msg| is the 115 // browser. This function does so asynchronously. |nested_msgs| is a list of
114 // resource host creation message and |instance| is the PP_Instance which 116 // resource host creation messages and |instance| is the PP_Instance which
115 // the resource will belong to. |callback| will be called with the pending 117 // the resource will belong to. |callback| will be called with the pending
116 // host ID when the ResourceHost has been created. This can be passed back 118 // host IDs when the ResourceHosts have been created. This can be passed back
117 // to the plugin to attach to the ResourceHost. A pending ID of 0 will be 119 // to the plugin to attach to the ResourceHosts. Pending IDs of 0 will be
118 // passed to the callback upon error. 120 // passed to the callback if a ResourceHost fails to be created.
119 virtual void CreateBrowserResourceHost( 121 virtual void CreateBrowserResourceHosts(
120 PP_Instance instance, 122 PP_Instance instance,
121 const IPC::Message& nested_msg, 123 const std::vector<IPC::Message>& nested_msgs,
122 const base::Callback<void(int)>& callback) const = 0; 124 const base::Callback<void(const std::vector<int>&)>& callback) const = 0;
123 125
124 protected: 126 protected:
125 virtual ~RendererPpapiHost() {} 127 virtual ~RendererPpapiHost() {}
126 }; 128 };
127 129
128 } // namespace content 130 } // namespace content
129 131
130 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ 132 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_renderer_connection.cc ('k') | content/renderer/pepper/mock_renderer_ppapi_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698