| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 // Returns the RenderView for the given plugin instance, or NULL if the | 88 // Returns the RenderView for the given plugin instance, or NULL if the |
| 89 // instance is invalid. | 89 // instance is invalid. |
| 90 virtual RenderView* GetRenderViewForInstance(PP_Instance instance) const = 0; | 90 virtual RenderView* GetRenderViewForInstance(PP_Instance instance) const = 0; |
| 91 | 91 |
| 92 // Returns the WebPluginContainer for the given plugin instance, or NULL if | 92 // Returns the WebPluginContainer for the given plugin instance, or NULL if |
| 93 // the instance is invalid. | 93 // the instance is invalid. |
| 94 virtual WebKit::WebPluginContainer* GetContainerForInstance( | 94 virtual WebKit::WebPluginContainer* GetContainerForInstance( |
| 95 PP_Instance instance) const = 0; | 95 PP_Instance instance) const = 0; |
| 96 | 96 |
| 97 // Returns the PID of the child process containing the plugin. If running |
| 98 // in-process, this returns base::kNullProcessId. |
| 99 virtual base::ProcessId GetPluginPID() const = 0; |
| 100 |
| 97 // Returns the PlatformGraphics2D for the given plugin resource, or NULL if | 101 // Returns the PlatformGraphics2D for the given plugin resource, or NULL if |
| 98 // the resource is invalid. | 102 // the resource is invalid. |
| 99 virtual webkit::ppapi::PluginDelegate::PlatformGraphics2D* | 103 virtual webkit::ppapi::PluginDelegate::PlatformGraphics2D* |
| 100 GetPlatformGraphics2D(PP_Resource resource) = 0; | 104 GetPlatformGraphics2D(PP_Resource resource) = 0; |
| 101 | 105 |
| 102 // Returns true if the given instance is considered to be currently | 106 // Returns true if the given instance is considered to be currently |
| 103 // processing a user gesture or the plugin module has the "override user | 107 // processing a user gesture or the plugin module has the "override user |
| 104 // gesture" flag set (in which case it can always do things normally | 108 // gesture" flag set (in which case it can always do things normally |
| 105 // restricted by user gestures). Returns false if the instance is invalid or | 109 // restricted by user gestures). Returns false if the instance is invalid or |
| 106 // if there is no current user gesture. | 110 // if there is no current user gesture. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 132 // Returns true if the plugin is running in process. | 136 // Returns true if the plugin is running in process. |
| 133 virtual bool IsRunningInProcess() const = 0; | 137 virtual bool IsRunningInProcess() const = 0; |
| 134 | 138 |
| 135 protected: | 139 protected: |
| 136 virtual ~RendererPpapiHost() {} | 140 virtual ~RendererPpapiHost() {} |
| 137 }; | 141 }; |
| 138 | 142 |
| 139 } // namespace content | 143 } // namespace content |
| 140 | 144 |
| 141 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ | 145 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ |
| OLD | NEW |