| 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_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/Source/WebKit/chromium/public/WebPlugin.h" | 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 public: | 34 public: |
| 35 RenderViewImpl* render_view() const { return render_view_.get(); } | 35 RenderViewImpl* render_view() const { return render_view_.get(); } |
| 36 | 36 |
| 37 bool OnMessageReceived(const IPC::Message& msg); | 37 bool OnMessageReceived(const IPC::Message& msg); |
| 38 | 38 |
| 39 // Update Browser Plugin's DOM Node attribute |attribute_name| with the value | 39 // Update Browser Plugin's DOM Node attribute |attribute_name| with the value |
| 40 // |attribute_value|. | 40 // |attribute_value|. |
| 41 void UpdateDOMAttribute(const std::string& attribute_name, | 41 void UpdateDOMAttribute(const std::string& attribute_name, |
| 42 const std::string& attribute_value); | 42 const std::string& attribute_value); |
| 43 | 43 |
| 44 // Get the name attribute value. |
| 45 std::string name_attribute() const { return name_; } |
| 46 // Set the name attribute value. |
| 47 void SetNameAttribute(const std::string& name); |
| 44 // Get the src attribute value of the BrowserPlugin instance. | 48 // Get the src attribute value of the BrowserPlugin instance. |
| 45 std::string src_attribute() const { return src_; } | 49 std::string src_attribute() const { return src_; } |
| 46 // Set the src attribute value of the BrowserPlugin instance. | 50 // Set the src attribute value of the BrowserPlugin instance. |
| 47 bool SetSrcAttribute(const std::string& src, std::string* error_message); | 51 bool SetSrcAttribute(const std::string& src, std::string* error_message); |
| 48 // Get the autosize attribute value. | 52 // Get the autosize attribute value. |
| 49 bool auto_size_attribute() const { return auto_size_; } | 53 bool auto_size_attribute() const { return auto_size_; } |
| 50 // Sets the autosize attribute value. | 54 // Sets the autosize attribute value. |
| 51 void SetAutoSizeAttribute(bool auto_size); | 55 void SetAutoSizeAttribute(bool auto_size); |
| 52 // Get the maxheight attribute value. | 56 // Get the maxheight attribute value. |
| 53 int max_height_attribute() const { return max_height_; } | 57 int max_height_attribute() const { return max_height_; } |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 void OnLoadCommit(int instance_id, | 257 void OnLoadCommit(int instance_id, |
| 254 const BrowserPluginMsg_LoadCommit_Params& params); | 258 const BrowserPluginMsg_LoadCommit_Params& params); |
| 255 void OnLoadRedirect(int instance_id, | 259 void OnLoadRedirect(int instance_id, |
| 256 const GURL& old_url, | 260 const GURL& old_url, |
| 257 const GURL& new_url, | 261 const GURL& new_url, |
| 258 bool is_top_level); | 262 bool is_top_level); |
| 259 void OnLoadStart(int instance_id, const GURL& url, bool is_top_level); | 263 void OnLoadStart(int instance_id, const GURL& url, bool is_top_level); |
| 260 void OnLoadStop(int instance_id); | 264 void OnLoadStop(int instance_id); |
| 261 void OnSetCursor(int instance_id, const WebCursor& cursor); | 265 void OnSetCursor(int instance_id, const WebCursor& cursor); |
| 262 void OnShouldAcceptTouchEvents(int instance_id, bool accept); | 266 void OnShouldAcceptTouchEvents(int instance_id, bool accept); |
| 267 void OnUpdatedName(int instance_id, const std::string& name); |
| 263 void OnUpdateRect(int instance_id, | 268 void OnUpdateRect(int instance_id, |
| 264 const BrowserPluginMsg_UpdateRect_Params& params); | 269 const BrowserPluginMsg_UpdateRect_Params& params); |
| 265 | 270 |
| 266 int instance_id_; | 271 int instance_id_; |
| 267 base::WeakPtr<RenderViewImpl> render_view_; | 272 base::WeakPtr<RenderViewImpl> render_view_; |
| 268 // We cache the |render_view_|'s routing ID because we need it on destruction. | 273 // We cache the |render_view_|'s routing ID because we need it on destruction. |
| 269 // If the |render_view_| is destroyed before the BrowserPlugin is destroyed | 274 // If the |render_view_| is destroyed before the BrowserPlugin is destroyed |
| 270 // then we will attempt to access a NULL pointer. | 275 // then we will attempt to access a NULL pointer. |
| 271 int render_view_routing_id_; | 276 int render_view_routing_id_; |
| 272 WebKit::WebPluginContainer* container_; | 277 WebKit::WebPluginContainer* container_; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 292 int process_id_; | 297 int process_id_; |
| 293 std::string storage_partition_id_; | 298 std::string storage_partition_id_; |
| 294 bool persist_storage_; | 299 bool persist_storage_; |
| 295 bool valid_partition_id_; | 300 bool valid_partition_id_; |
| 296 int content_window_routing_id_; | 301 int content_window_routing_id_; |
| 297 bool plugin_focused_; | 302 bool plugin_focused_; |
| 298 bool embedder_focused_; | 303 bool embedder_focused_; |
| 299 // Tracks the visibility of the browser plugin regardless of the whole | 304 // Tracks the visibility of the browser plugin regardless of the whole |
| 300 // embedder RenderView's visibility. | 305 // embedder RenderView's visibility. |
| 301 bool visible_; | 306 bool visible_; |
| 307 std::string name_; |
| 302 | 308 |
| 303 WebCursor cursor_; | 309 WebCursor cursor_; |
| 304 | 310 |
| 305 gfx::Size last_view_size_; | 311 gfx::Size last_view_size_; |
| 306 bool size_changed_in_flight_; | 312 bool size_changed_in_flight_; |
| 307 | 313 |
| 308 // BrowserPlugin outlives RenderViewImpl in Chrome Apps and so we need to | 314 // BrowserPlugin outlives RenderViewImpl in Chrome Apps and so we need to |
| 309 // store the BrowserPlugin's BrowserPluginManager in a member variable to | 315 // store the BrowserPlugin's BrowserPluginManager in a member variable to |
| 310 // avoid accessing the RenderViewImpl. | 316 // avoid accessing the RenderViewImpl. |
| 311 scoped_refptr<BrowserPluginManager> browser_plugin_manager_; | 317 scoped_refptr<BrowserPluginManager> browser_plugin_manager_; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 325 | 331 |
| 326 // Used for HW compositing. | 332 // Used for HW compositing. |
| 327 bool compositing_enabled_; | 333 bool compositing_enabled_; |
| 328 | 334 |
| 329 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 335 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
| 330 }; | 336 }; |
| 331 | 337 |
| 332 } // namespace content | 338 } // namespace content |
| 333 | 339 |
| 334 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 340 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
| OLD | NEW |