| 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 "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "ppapi/c/pp_instance.h" | 10 #include "ppapi/c/pp_instance.h" |
| 11 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 11 | 12 |
| 12 class FilePath; | 13 class FilePath; |
| 13 | 14 |
| 14 namespace IPC { | 15 namespace IPC { |
| 15 struct ChannelHandle; | 16 struct ChannelHandle; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace ppapi { | 19 namespace ppapi { |
| 19 class PpapiPermissions; | 20 class PpapiPermissions; |
| 20 namespace host { | 21 namespace host { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 66 |
| 66 // Returns the RenderView for the given plugin instance, or NULL if the | 67 // Returns the RenderView for the given plugin instance, or NULL if the |
| 67 // instance is invalid. | 68 // instance is invalid. |
| 68 virtual RenderView* GetRenderViewForInstance(PP_Instance instance) const = 0; | 69 virtual RenderView* GetRenderViewForInstance(PP_Instance instance) const = 0; |
| 69 | 70 |
| 70 // Returns the WebPluginContainer for the given plugin instance, or NULL if | 71 // Returns the WebPluginContainer for the given plugin instance, or NULL if |
| 71 // the instance is invalid. | 72 // the instance is invalid. |
| 72 virtual WebKit::WebPluginContainer* GetContainerForInstance( | 73 virtual WebKit::WebPluginContainer* GetContainerForInstance( |
| 73 PP_Instance instance) const = 0; | 74 PP_Instance instance) const = 0; |
| 74 | 75 |
| 76 // Returns the PlatformGraphics2D for the given plugin resource, or NULL if |
| 77 // the resource is invalid. |
| 78 virtual webkit::ppapi::PluginDelegate::PlatformGraphics2D* |
| 79 GetPlatformGraphics2D(PP_Resource resource) = 0; |
| 80 |
| 75 // Returns true if the given instance is considered to be currently | 81 // Returns true if the given instance is considered to be currently |
| 76 // processing a user gesture or the plugin module has the "override user | 82 // processing a user gesture or the plugin module has the "override user |
| 77 // gesture" flag set (in which case it can always do things normally | 83 // gesture" flag set (in which case it can always do things normally |
| 78 // restricted by user gestures). Returns false if the instance is invalid or | 84 // restricted by user gestures). Returns false if the instance is invalid or |
| 79 // if there is no current user gesture. | 85 // if there is no current user gesture. |
| 80 virtual bool HasUserGesture(PP_Instance instance) const = 0; | 86 virtual bool HasUserGesture(PP_Instance instance) const = 0; |
| 81 | 87 |
| 88 // Returns true if the plugin is running in process. |
| 89 virtual bool IsRunningInProcess() const = 0; |
| 90 |
| 82 protected: | 91 protected: |
| 83 virtual ~RendererPpapiHost() {} | 92 virtual ~RendererPpapiHost() {} |
| 84 }; | 93 }; |
| 85 | 94 |
| 86 } // namespace content | 95 } // namespace content |
| 87 | 96 |
| 88 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ | 97 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ |
| 89 | |
| OLD | NEW |