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_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 #include "third_party/WebKit/public/platform/WebCanvas.h" | 52 #include "third_party/WebKit/public/platform/WebCanvas.h" |
53 #include "third_party/WebKit/public/platform/WebString.h" | 53 #include "third_party/WebKit/public/platform/WebString.h" |
54 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" | 54 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" |
55 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 55 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
56 #include "third_party/WebKit/public/web/WebPlugin.h" | 56 #include "third_party/WebKit/public/web/WebPlugin.h" |
57 #include "third_party/WebKit/public/web/WebUserGestureToken.h" | 57 #include "third_party/WebKit/public/web/WebUserGestureToken.h" |
58 #include "ui/base/ime/text_input_type.h" | 58 #include "ui/base/ime/text_input_type.h" |
59 #include "ui/events/latency_info.h" | 59 #include "ui/events/latency_info.h" |
60 #include "ui/gfx/rect.h" | 60 #include "ui/gfx/rect.h" |
61 #include "url/gurl.h" | 61 #include "url/gurl.h" |
| 62 #include "v8/include/v8.h" |
62 | 63 |
63 struct PP_Point; | 64 struct PP_Point; |
64 struct _NPP; | 65 struct _NPP; |
65 | 66 |
66 class SkBitmap; | 67 class SkBitmap; |
67 class TransportDIB; | 68 class TransportDIB; |
68 | 69 |
69 namespace blink { | 70 namespace blink { |
70 class WebInputEvent; | 71 class WebInputEvent; |
71 class WebLayer; | 72 class WebLayer; |
(...skipping 15 matching lines...) Expand all Loading... |
87 class Range; | 88 class Range; |
88 } | 89 } |
89 | 90 |
90 namespace ppapi { | 91 namespace ppapi { |
91 class Resource; | 92 class Resource; |
92 struct InputEventData; | 93 struct InputEventData; |
93 struct PPP_Instance_Combined; | 94 struct PPP_Instance_Combined; |
94 class ScopedPPVar; | 95 class ScopedPPVar; |
95 } | 96 } |
96 | 97 |
97 namespace v8 { | |
98 class Isolate; | |
99 } | |
100 | |
101 namespace content { | 98 namespace content { |
102 | 99 |
103 class ContentDecryptorDelegate; | 100 class ContentDecryptorDelegate; |
104 class FullscreenContainer; | 101 class FullscreenContainer; |
105 class MessageChannel; | 102 class MessageChannel; |
106 class PepperCompositorHost; | 103 class PepperCompositorHost; |
107 class PepperGraphics2DHost; | 104 class PepperGraphics2DHost; |
108 class PluginModule; | 105 class PluginModule; |
109 class PluginObject; | 106 class PluginObject; |
110 class PPB_Graphics3D_Impl; | 107 class PPB_Graphics3D_Impl; |
(...skipping 28 matching lines...) Expand all Loading... |
139 blink::WebPluginContainer* container() const { return container_; } | 136 blink::WebPluginContainer* container() const { return container_; } |
140 | 137 |
141 // Returns the PP_Instance uniquely identifying this instance. Guaranteed | 138 // Returns the PP_Instance uniquely identifying this instance. Guaranteed |
142 // nonzero. | 139 // nonzero. |
143 PP_Instance pp_instance() const { return pp_instance_; } | 140 PP_Instance pp_instance() const { return pp_instance_; } |
144 | 141 |
145 ppapi::thunk::ResourceCreationAPI& resource_creation() { | 142 ppapi::thunk::ResourceCreationAPI& resource_creation() { |
146 return *resource_creation_.get(); | 143 return *resource_creation_.get(); |
147 } | 144 } |
148 | 145 |
| 146 // Return the v8 context that the plugin is in. |
| 147 v8::Local<v8::Context> GetContext(); |
| 148 |
149 // Does some pre-destructor cleanup on the instance. This is necessary | 149 // Does some pre-destructor cleanup on the instance. This is necessary |
150 // because some cleanup depends on the plugin instance still existing (like | 150 // because some cleanup depends on the plugin instance still existing (like |
151 // calling the plugin's DidDestroy function). This function is called from | 151 // calling the plugin's DidDestroy function). This function is called from |
152 // the WebPlugin implementation when WebKit is about to remove the plugin. | 152 // the WebPlugin implementation when WebKit is about to remove the plugin. |
153 void Delete(); | 153 void Delete(); |
154 | 154 |
155 // Returns true if Delete() has been called on this object. | 155 // Returns true if Delete() has been called on this object. |
156 bool is_deleted() const; | 156 bool is_deleted() const; |
157 | 157 |
158 // Paints the current backing store to the web page. | 158 // Paints the current backing store to the web page. |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 907 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
908 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; | 908 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; |
909 | 909 |
910 friend class PpapiPluginInstanceTest; | 910 friend class PpapiPluginInstanceTest; |
911 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 911 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
912 }; | 912 }; |
913 | 913 |
914 } // namespace content | 914 } // namespace content |
915 | 915 |
916 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 916 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
OLD | NEW |