| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // |attribute_value|. | 48 // |attribute_value|. |
| 49 void UpdateDOMAttribute(const std::string& attribute_name, | 49 void UpdateDOMAttribute(const std::string& attribute_name, |
| 50 const std::string& attribute_value); | 50 const std::string& attribute_value); |
| 51 // Remove the DOM Node attribute with the name |attribute_name|. | 51 // Remove the DOM Node attribute with the name |attribute_name|. |
| 52 void RemoveDOMAttribute(const std::string& attribute_name); | 52 void RemoveDOMAttribute(const std::string& attribute_name); |
| 53 // Get Browser Plugin's DOM Node attribute |attribute_name|'s value. | 53 // Get Browser Plugin's DOM Node attribute |attribute_name|'s value. |
| 54 std::string GetDOMAttributeValue(const std::string& attribute_name) const; | 54 std::string GetDOMAttributeValue(const std::string& attribute_name) const; |
| 55 // Checks if the attribute |attribute_name| exists in the DOM. | 55 // Checks if the attribute |attribute_name| exists in the DOM. |
| 56 bool HasDOMAttribute(const std::string& attribute_name) const; | 56 bool HasDOMAttribute(const std::string& attribute_name) const; |
| 57 | 57 |
| 58 // Get the name attribute value. | |
| 59 std::string GetNameAttribute() const; | |
| 60 // Parse the name attribute value. | |
| 61 void ParseNameAttribute(); | |
| 62 // Get the allowtransparency attribute value. | 58 // Get the allowtransparency attribute value. |
| 63 bool GetAllowTransparencyAttribute() const; | 59 bool GetAllowTransparencyAttribute() const; |
| 64 // Parse the allowtransparency attribute and adjust transparency of | 60 // Parse the allowtransparency attribute and adjust transparency of |
| 65 // BrowserPlugin accordingly. | 61 // BrowserPlugin accordingly. |
| 66 void ParseAllowTransparencyAttribute(); | 62 void ParseAllowTransparencyAttribute(); |
| 67 // Get the src attribute value of the BrowserPlugin instance. | 63 // Get the src attribute value of the BrowserPlugin instance. |
| 68 std::string GetSrcAttribute() const; | 64 std::string GetSrcAttribute() const; |
| 69 // Parse the src attribute value of the BrowserPlugin instance. | 65 // Parse the src attribute value of the BrowserPlugin instance. |
| 70 bool ParseSrcAttribute(std::string* error_message); | 66 bool ParseSrcAttribute(std::string* error_message); |
| 71 // Get the autosize attribute value. | 67 // Get the autosize attribute value. |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 void OnCopyFromCompositingSurface(int instance_id, | 264 void OnCopyFromCompositingSurface(int instance_id, |
| 269 int request_id, | 265 int request_id, |
| 270 gfx::Rect source_rect, | 266 gfx::Rect source_rect, |
| 271 gfx::Size dest_size); | 267 gfx::Size dest_size); |
| 272 void OnGuestContentWindowReady(int instance_id, | 268 void OnGuestContentWindowReady(int instance_id, |
| 273 int content_window_routing_id); | 269 int content_window_routing_id); |
| 274 void OnGuestGone(int instance_id); | 270 void OnGuestGone(int instance_id); |
| 275 void OnSetCursor(int instance_id, const WebCursor& cursor); | 271 void OnSetCursor(int instance_id, const WebCursor& cursor); |
| 276 void OnSetMouseLock(int instance_id, bool enable); | 272 void OnSetMouseLock(int instance_id, bool enable); |
| 277 void OnShouldAcceptTouchEvents(int instance_id, bool accept); | 273 void OnShouldAcceptTouchEvents(int instance_id, bool accept); |
| 278 void OnUpdatedName(int instance_id, const std::string& name); | |
| 279 void OnUpdateRect(int instance_id, | 274 void OnUpdateRect(int instance_id, |
| 280 const BrowserPluginMsg_UpdateRect_Params& params); | 275 const BrowserPluginMsg_UpdateRect_Params& params); |
| 281 | 276 |
| 282 // This is the browser-process-allocated instance ID that uniquely identifies | 277 // This is the browser-process-allocated instance ID that uniquely identifies |
| 283 // a guest WebContents. | 278 // a guest WebContents. |
| 284 int guest_instance_id_; | 279 int guest_instance_id_; |
| 285 // This indicates whether this BrowserPlugin has been attached to a | 280 // This indicates whether this BrowserPlugin has been attached to a |
| 286 // WebContents. | 281 // WebContents. |
| 287 bool attached_; | 282 bool attached_; |
| 288 const base::WeakPtr<RenderViewImpl> render_view_; | 283 const base::WeakPtr<RenderViewImpl> render_view_; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might | 334 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might |
| 340 // get called after BrowserPlugin has been destroyed. | 335 // get called after BrowserPlugin has been destroyed. |
| 341 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; | 336 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; |
| 342 | 337 |
| 343 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 338 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
| 344 }; | 339 }; |
| 345 | 340 |
| 346 } // namespace content | 341 } // namespace content |
| 347 | 342 |
| 348 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 343 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
| OLD | NEW |