OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ | |
6 #define CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ | |
7 | |
8 #include "ppapi/c/pp_instance.h" | |
9 | |
10 namespace ppapi { | |
11 namespace host { | |
12 class PpapiHost; | |
13 } | |
14 } | |
15 | |
16 namespace content { | |
17 | |
18 class RenderView; | |
19 | |
20 // Interface that allows components in the embedder app to talk to the | |
21 // PpapiHost in the browser process. | |
raymes
2012/07/29 15:53:24
browser->renderer
| |
22 // | |
23 // There will be one of these objects in the renderer per plugin module. | |
24 class RendererPpapiHost { | |
25 public: | |
26 // Returns the PpapiHost object. | |
27 virtual ppapi::host::PpapiHost* GetPpapiHost() = 0; | |
28 | |
29 // Returns true if the given PP_Instance is valid and belongs to the | |
30 // plugin associated with this host. | |
31 virtual bool IsValidInstance(PP_Instance instance) const = 0; | |
32 | |
33 // Returns the RenderView for the given plugin instance, or NULL if the | |
34 // instance is invalid. | |
35 virtual RenderView* GetRenderViewForInstance(PP_Instance instance) const = 0; | |
36 | |
37 // Returns true if the given instance is considered to be currently | |
38 // processing a user gesture or the plugin module has the "override user | |
39 // gesture" flag set (in which case it can always do things normally | |
40 // restricted by user gestures). Returns false if the instance is invalid or | |
41 // if there is no current user gesture. | |
42 virtual bool HasUserGesture(PP_Instance instance) const = 0; | |
43 | |
44 protected: | |
45 virtual ~RendererPpapiHost() {} | |
46 }; | |
47 | |
48 } // namespace content | |
49 | |
50 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ | |
51 | |
OLD | NEW |