OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
7 | 7 |
8 #include "third_party/WebKit/public/web/WebPlugin.h" | 8 #include "third_party/WebKit/public/web/WebPlugin.h" |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 std::string GetDOMAttributeValue(const std::string& attribute_name) const; | 56 std::string GetDOMAttributeValue(const std::string& attribute_name) const; |
57 // Checks if the attribute |attribute_name| exists in the DOM. | 57 // Checks if the attribute |attribute_name| exists in the DOM. |
58 bool HasDOMAttribute(const std::string& attribute_name) const; | 58 bool HasDOMAttribute(const std::string& attribute_name) const; |
59 | 59 |
60 // Get the allowtransparency attribute value. | 60 // Get the allowtransparency attribute value. |
61 bool GetAllowTransparencyAttribute() const; | 61 bool GetAllowTransparencyAttribute() const; |
62 // Parse the allowtransparency attribute and adjust transparency of | 62 // Parse the allowtransparency attribute and adjust transparency of |
63 // BrowserPlugin accordingly. | 63 // BrowserPlugin accordingly. |
64 void ParseAllowTransparencyAttribute(); | 64 void ParseAllowTransparencyAttribute(); |
65 | 65 |
66 // Get the guest's DOMWindow proxy. | |
67 NPObject* GetContentWindow() const; | |
68 | |
69 // Returns whether the guest process has crashed. | 66 // Returns whether the guest process has crashed. |
70 bool guest_crashed() const { return guest_crashed_; } | 67 bool guest_crashed() const { return guest_crashed_; } |
71 | 68 |
72 // Informs the guest of an updated focus state. | 69 // Informs the guest of an updated focus state. |
73 void UpdateGuestFocusState(); | 70 void UpdateGuestFocusState(); |
74 // Indicates whether the guest should be focused. | 71 // Indicates whether the guest should be focused. |
75 bool ShouldGuestBeFocused() const; | 72 bool ShouldGuestBeFocused() const; |
76 | 73 |
77 // Embedder's device scale factor changed, we need to update the guest | 74 // Embedder's device scale factor changed, we need to update the guest |
78 // renderer. | 75 // renderer. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 // Please keep in alphabetical order. | 189 // Please keep in alphabetical order. |
193 void OnAdvanceFocus(int instance_id, bool reverse); | 190 void OnAdvanceFocus(int instance_id, bool reverse); |
194 void OnAttachACK(int browser_plugin_instance_id); | 191 void OnAttachACK(int browser_plugin_instance_id); |
195 void OnBuffersSwapped(int instance_id, | 192 void OnBuffersSwapped(int instance_id, |
196 const FrameMsg_BuffersSwapped_Params& params); | 193 const FrameMsg_BuffersSwapped_Params& params); |
197 void OnCompositorFrameSwapped(const IPC::Message& message); | 194 void OnCompositorFrameSwapped(const IPC::Message& message); |
198 void OnCopyFromCompositingSurface(int instance_id, | 195 void OnCopyFromCompositingSurface(int instance_id, |
199 int request_id, | 196 int request_id, |
200 gfx::Rect source_rect, | 197 gfx::Rect source_rect, |
201 gfx::Size dest_size); | 198 gfx::Size dest_size); |
202 void OnGuestContentWindowReady(int instance_id, | |
203 int content_window_routing_id); | |
204 void OnGuestGone(int instance_id); | 199 void OnGuestGone(int instance_id); |
205 void OnSetCursor(int instance_id, const WebCursor& cursor); | 200 void OnSetCursor(int instance_id, const WebCursor& cursor); |
206 void OnSetMouseLock(int instance_id, bool enable); | 201 void OnSetMouseLock(int instance_id, bool enable); |
207 void OnShouldAcceptTouchEvents(int instance_id, bool accept); | 202 void OnShouldAcceptTouchEvents(int instance_id, bool accept); |
208 | 203 |
209 // This indicates whether this BrowserPlugin has been attached to a | 204 // This indicates whether this BrowserPlugin has been attached to a |
210 // WebContents. | 205 // WebContents. |
211 bool attached_; | 206 bool attached_; |
212 bool attach_pending_; | 207 bool attach_pending_; |
213 const base::WeakPtr<RenderViewImpl> render_view_; | 208 const base::WeakPtr<RenderViewImpl> render_view_; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might | 249 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might |
255 // get called after BrowserPlugin has been destroyed. | 250 // get called after BrowserPlugin has been destroyed. |
256 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; | 251 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; |
257 | 252 |
258 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 253 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
259 }; | 254 }; |
260 | 255 |
261 } // namespace content | 256 } // namespace content |
262 | 257 |
263 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 258 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
OLD | NEW |