| 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 22 matching lines...) Expand all Loading... |
| 33 public MouseLockDispatcher::LockTarget { | 33 public MouseLockDispatcher::LockTarget { |
| 34 public: | 34 public: |
| 35 RenderViewImpl* render_view() const { return render_view_.get(); } | 35 RenderViewImpl* render_view() const { return render_view_.get(); } |
| 36 int render_view_routing_id() const { return render_view_routing_id_; } | 36 int render_view_routing_id() const { return render_view_routing_id_; } |
| 37 int guest_instance_id() const { return guest_instance_id_; } | 37 int guest_instance_id() const { return guest_instance_id_; } |
| 38 bool attached() const { return attached_; } | 38 bool attached() const { return attached_; } |
| 39 BrowserPluginManager* browser_plugin_manager() const { | 39 BrowserPluginManager* browser_plugin_manager() const { |
| 40 return browser_plugin_manager_.get(); | 40 return browser_plugin_manager_.get(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void AttachToPlugin(int instance_id); |
| 44 |
| 43 bool OnMessageReceived(const IPC::Message& msg); | 45 bool OnMessageReceived(const IPC::Message& msg); |
| 44 | 46 |
| 45 // Update Browser Plugin's DOM Node attribute |attribute_name| with the value | 47 // Update Browser Plugin's DOM Node attribute |attribute_name| with the value |
| 46 // |attribute_value|. | 48 // |attribute_value|. |
| 47 void UpdateDOMAttribute(const std::string& attribute_name, | 49 void UpdateDOMAttribute(const std::string& attribute_name, |
| 48 const std::string& attribute_value); | 50 const std::string& attribute_value); |
| 49 // Remove the DOM Node attribute with the name |attribute_name|. | 51 // Remove the DOM Node attribute with the name |attribute_name|. |
| 50 void RemoveDOMAttribute(const std::string& attribute_name); | 52 void RemoveDOMAttribute(const std::string& attribute_name); |
| 51 // Get Browser Plugin's DOM Node attribute |attribute_name|'s value. | 53 // Get Browser Plugin's DOM Node attribute |attribute_name|'s value. |
| 52 std::string GetDOMAttributeValue(const std::string& attribute_name) const; | 54 std::string GetDOMAttributeValue(const std::string& attribute_name) const; |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 bool visible_; | 283 bool visible_; |
| 282 | 284 |
| 283 const bool auto_navigate_; | 285 const bool auto_navigate_; |
| 284 std::string html_string_; | 286 std::string html_string_; |
| 285 | 287 |
| 286 WebCursor cursor_; | 288 WebCursor cursor_; |
| 287 | 289 |
| 288 gfx::Size last_view_size_; | 290 gfx::Size last_view_size_; |
| 289 bool mouse_locked_; | 291 bool mouse_locked_; |
| 290 | 292 |
| 293 bool attach_called_; |
| 294 bool seen_src_; |
| 295 int pending_instance_id_; |
| 296 |
| 297 void MaybeAttach(); |
| 298 |
| 291 // BrowserPlugin outlives RenderViewImpl in Chrome Apps and so we need to | 299 // BrowserPlugin outlives RenderViewImpl in Chrome Apps and so we need to |
| 292 // store the BrowserPlugin's BrowserPluginManager in a member variable to | 300 // store the BrowserPlugin's BrowserPluginManager in a member variable to |
| 293 // avoid accessing the RenderViewImpl. | 301 // avoid accessing the RenderViewImpl. |
| 294 const scoped_refptr<BrowserPluginManager> browser_plugin_manager_; | 302 const scoped_refptr<BrowserPluginManager> browser_plugin_manager_; |
| 295 | 303 |
| 296 // Used for HW compositing. | 304 // Used for HW compositing. |
| 297 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_; | 305 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_; |
| 298 | 306 |
| 299 // Used to identify the plugin to WebBindings. | 307 // Used to identify the plugin to WebBindings. |
| 300 scoped_ptr<struct _NPP> npp_; | 308 scoped_ptr<struct _NPP> npp_; |
| 301 | 309 |
| 302 // URL for the embedder frame. | 310 // URL for the embedder frame. |
| 303 const GURL embedder_frame_url_; | 311 const GURL embedder_frame_url_; |
| 304 | 312 |
| 305 std::vector<EditCommand> edit_commands_; | 313 std::vector<EditCommand> edit_commands_; |
| 306 | 314 |
| 307 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might | 315 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might |
| 308 // get called after BrowserPlugin has been destroyed. | 316 // get called after BrowserPlugin has been destroyed. |
| 309 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; | 317 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; |
| 310 | 318 |
| 311 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 319 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
| 312 }; | 320 }; |
| 313 | 321 |
| 314 } // namespace content | 322 } // namespace content |
| 315 | 323 |
| 316 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 324 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
| OLD | NEW |