| 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 "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" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // routing ID of the fullscreen widget. Returns 0 on failure. | 118 // routing ID of the fullscreen widget. Returns 0 on failure. |
| 119 virtual int GetRoutingIDForWidget(PP_Instance instance) const = 0; | 119 virtual int GetRoutingIDForWidget(PP_Instance instance) const = 0; |
| 120 | 120 |
| 121 // Converts the given plugin coordinate to the containing RenderView. This | 121 // Converts the given plugin coordinate to the containing RenderView. This |
| 122 // will take into account the current Flash fullscreen state so will use | 122 // will take into account the current Flash fullscreen state so will use |
| 123 // the fullscreen widget if it's displayed. | 123 // the fullscreen widget if it's displayed. |
| 124 virtual gfx::Point PluginPointToRenderView( | 124 virtual gfx::Point PluginPointToRenderView( |
| 125 PP_Instance instance, | 125 PP_Instance instance, |
| 126 const gfx::Point& pt) const = 0; | 126 const gfx::Point& pt) const = 0; |
| 127 | 127 |
| 128 // Returns the url of current document. |
| 129 virtual GURL GetDocumentURLForInstance(PP_Instance instance) const = 0; |
| 130 |
| 128 // Shares a file handle (HANDLE / file descriptor) with the remote side. It | 131 // Shares a file handle (HANDLE / file descriptor) with the remote side. It |
| 129 // returns a handle that should be sent in exactly one IPC message. Upon | 132 // returns a handle that should be sent in exactly one IPC message. Upon |
| 130 // receipt, the remote side then owns that handle. Note: if sending the | 133 // receipt, the remote side then owns that handle. Note: if sending the |
| 131 // message fails, the returned handle is properly closed by the IPC system. If | 134 // message fails, the returned handle is properly closed by the IPC system. If |
| 132 // |should_close_source| is set to true, the original handle is closed by this | 135 // |should_close_source| is set to true, the original handle is closed by this |
| 133 // operation and should not be used again. | 136 // operation and should not be used again. |
| 134 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( | 137 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( |
| 135 base::PlatformFile handle, | 138 base::PlatformFile handle, |
| 136 bool should_close_source) = 0; | 139 bool should_close_source) = 0; |
| 137 | 140 |
| 138 // Returns true if the plugin is running in process. | 141 // Returns true if the plugin is running in process. |
| 139 virtual bool IsRunningInProcess() const = 0; | 142 virtual bool IsRunningInProcess() const = 0; |
| 140 | 143 |
| 141 protected: | 144 protected: |
| 142 virtual ~RendererPpapiHost() {} | 145 virtual ~RendererPpapiHost() {} |
| 143 }; | 146 }; |
| 144 | 147 |
| 145 } // namespace content | 148 } // namespace content |
| 146 | 149 |
| 147 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ | 150 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ |
| OLD | NEW |