Chromium Code Reviews| OLD | NEW |
|---|---|
| 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> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/platform_file.h" | 12 #include "base/platform_file.h" |
| 13 #include "base/process/process.h" | 13 #include "base/process/process.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "ipc/ipc_platform_file.h" | 15 #include "ipc/ipc_platform_file.h" |
| 16 #include "ppapi/c/pp_instance.h" | 16 #include "ppapi/c/pp_instance.h" |
| 17 #include "url/gurl.h" | |
| 17 | 18 |
| 18 namespace base { | 19 namespace base { |
| 19 class FilePath; | 20 class FilePath; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace gfx { | 23 namespace gfx { |
| 23 class Point; | 24 class Point; |
| 24 } | 25 } |
| 25 | 26 |
| 26 namespace IPC { | 27 namespace IPC { |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 // resource host creation messages and |instance| is the PP_Instance which | 122 // resource host creation messages and |instance| is the PP_Instance which |
| 122 // the resource will belong to. |callback| will be called asynchronously with | 123 // the resource will belong to. |callback| will be called asynchronously with |
| 123 // the pending host IDs when the ResourceHosts have been created. This can be | 124 // the pending host IDs when the ResourceHosts have been created. This can be |
| 124 // passed back to the plugin to attach to the ResourceHosts. Pending IDs of 0 | 125 // passed back to the plugin to attach to the ResourceHosts. Pending IDs of 0 |
| 125 // will be passed to the callback if a ResourceHost fails to be created. | 126 // will be passed to the callback if a ResourceHost fails to be created. |
| 126 virtual void CreateBrowserResourceHosts( | 127 virtual void CreateBrowserResourceHosts( |
| 127 PP_Instance instance, | 128 PP_Instance instance, |
| 128 const std::vector<IPC::Message>& nested_msgs, | 129 const std::vector<IPC::Message>& nested_msgs, |
| 129 const base::Callback<void(const std::vector<int>&)>& callback) const = 0; | 130 const base::Callback<void(const std::vector<int>&)>& callback) const = 0; |
| 130 | 131 |
| 132 // Gets the URL of the document containing the given PP_Instance. | |
| 133 // Returns an empty URL if the instance is invalid. | |
| 134 virtual GURL GetDocumentURL(PP_Instance instance) const = 0; | |
|
bbudge
2013/10/31 00:31:42
Can't you detect if the instance is valid using Ge
yzshen1
2013/10/31 00:52:03
I think this is a pure interface, we don't provide
bbudge
2013/10/31 01:10:02
It looks like a "convenience method" so I think it
yzshen1
2013/11/01 17:00:00
There are a few other methods in this interface ar
| |
| 135 | |
| 131 protected: | 136 protected: |
| 132 virtual ~RendererPpapiHost() {} | 137 virtual ~RendererPpapiHost() {} |
| 133 }; | 138 }; |
| 134 | 139 |
| 135 } // namespace content | 140 } // namespace content |
| 136 | 141 |
| 137 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ | 142 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ |
| OLD | NEW |