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 "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
9 | 10 |
11 class FilePath; | |
12 | |
13 namespace IPC { | |
14 struct ChannelHandle; | |
15 } | |
16 | |
10 namespace ppapi { | 17 namespace ppapi { |
18 class PpapiPermissions; | |
11 namespace host { | 19 namespace host { |
12 class PpapiHost; | 20 class PpapiHost; |
13 } | 21 } |
14 } | 22 } |
15 | 23 |
16 namespace WebKit { | 24 namespace WebKit { |
17 class WebPluginContainer; | 25 class WebPluginContainer; |
18 } | 26 } |
19 | 27 |
28 namespace webkit { | |
29 namespace ppapi { | |
30 class PluginInstance; | |
31 class PluginModule; | |
32 } | |
33 } | |
34 | |
20 namespace content { | 35 namespace content { |
21 | 36 |
22 class RenderView; | 37 class RenderView; |
23 | 38 |
24 // Interface that allows components in the embedder app to talk to the | 39 // Interface that allows components in the embedder app to talk to the |
25 // PpapiHost in the renderer process. | 40 // PpapiHost in the renderer process. |
26 // | 41 // |
27 // There will be one of these objects in the renderer per plugin module. | 42 // There will be one of these objects in the renderer per plugin module. |
28 class RendererPpapiHost { | 43 class RendererPpapiHost { |
29 public: | 44 public: |
(...skipping 13 matching lines...) Expand all Loading... | |
43 virtual WebKit::WebPluginContainer* GetContainerForInstance( | 58 virtual WebKit::WebPluginContainer* GetContainerForInstance( |
44 PP_Instance instance) const = 0; | 59 PP_Instance instance) const = 0; |
45 | 60 |
46 // Returns true if the given instance is considered to be currently | 61 // Returns true if the given instance is considered to be currently |
47 // processing a user gesture or the plugin module has the "override user | 62 // processing a user gesture or the plugin module has the "override user |
48 // gesture" flag set (in which case it can always do things normally | 63 // gesture" flag set (in which case it can always do things normally |
49 // restricted by user gestures). Returns false if the instance is invalid or | 64 // restricted by user gestures). Returns false if the instance is invalid or |
50 // if there is no current user gesture. | 65 // if there is no current user gesture. |
51 virtual bool HasUserGesture(PP_Instance instance) const = 0; | 66 virtual bool HasUserGesture(PP_Instance instance) const = 0; |
52 | 67 |
68 // Creates a host and sets up an out-of-process proxy for an external plugin | |
69 // module. Returns the host if the external module is proxied successfully, | |
70 // otherwise NULL. | |
brettw
2012/10/16 23:37:32
Can the comment here make it clear what the file p
bbudge
2012/10/17 00:18:44
Done. This is only used to construct a PepperHungP
| |
71 static RendererPpapiHost* CreateExternalPluginModule( | |
jam
2012/10/16 21:14:43
nit: static methods go first in the api
bbudge
2012/10/17 00:18:44
Done.
| |
72 scoped_refptr<webkit::ppapi::PluginModule> plugin_module, | |
73 webkit::ppapi::PluginInstance* plugin_instance, | |
74 const FilePath& file_path, | |
75 ppapi::PpapiPermissions permissions, | |
76 const IPC::ChannelHandle& channel_handle, | |
77 int child_process_id); | |
78 | |
53 protected: | 79 protected: |
54 virtual ~RendererPpapiHost() {} | 80 virtual ~RendererPpapiHost() {} |
55 }; | 81 }; |
56 | 82 |
57 } // namespace content | 83 } // namespace content |
58 | 84 |
59 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ | 85 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ |
60 | 86 |
OLD | NEW |