diff options
| author | Andras Becsi <andras.becsi@digia.com> | 2013-12-11 21:33:03 +0100 |
|---|---|---|
| committer | Andras Becsi <andras.becsi@digia.com> | 2013-12-13 12:34:07 +0100 |
| commit | f2a33ff9cbc6d19943f1c7fbddd1f23d23975577 (patch) | |
| tree | 0586a32aa390ade8557dfd6b4897f43a07449578 /chromium/content/renderer/browser_plugin/browser_plugin.h | |
| parent | 5362912cdb5eea702b68ebe23702468d17c3017a (diff) | |
Update Chromium to branch 1650 (31.0.1650.63)
Change-Id: I57d8c832eaec1eb2364e0a8e7352a6dd354db99f
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'chromium/content/renderer/browser_plugin/browser_plugin.h')
| -rw-r--r-- | chromium/content/renderer/browser_plugin/browser_plugin.h | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/chromium/content/renderer/browser_plugin/browser_plugin.h b/chromium/content/renderer/browser_plugin/browser_plugin.h index d18906a573d..ba30ac909d8 100644 --- a/chromium/content/renderer/browser_plugin/browser_plugin.h +++ b/chromium/content/renderer/browser_plugin/browser_plugin.h @@ -40,6 +40,7 @@ class CONTENT_EXPORT BrowserPlugin : RenderViewImpl* render_view() const { return render_view_.get(); } int render_view_routing_id() const { return render_view_routing_id_; } int guest_instance_id() const { return guest_instance_id_; } + bool attached() const { return attached_; } static BrowserPlugin* FromContainer(WebKit::WebPluginContainer* container); @@ -115,10 +116,6 @@ class CONTENT_EXPORT BrowserPlugin : // A request to enable hardware compositing. void EnableCompositing(bool enable); - // A request from content client to track lifetime of a JavaScript object. - // This is used to track permission request objects, and new window API - // window objects. - void TrackObjectLifetime(const NPVariant* request, int id); // Returns true if |point| lies within the bounds of the plugin rectangle. // Not OK to use this function for making security-sensitive decision since it @@ -255,23 +252,22 @@ class CONTENT_EXPORT BrowserPlugin : // allocates a new |pending_damage_buffer_| if in software rendering mode. void PopulateResizeGuestParameters( BrowserPluginHostMsg_ResizeGuest_Params* params, - const gfx::Rect& view_size); + const gfx::Rect& view_size, + bool needs_repaint); // Populates BrowserPluginHostMsg_AutoSize_Params object with autosize state. void PopulateAutoSizeParameters( - BrowserPluginHostMsg_AutoSize_Params* params, bool current_auto_size); + BrowserPluginHostMsg_AutoSize_Params* params, bool auto_size_enabled); // Populates both AutoSize and ResizeGuest parameters based on the current // autosize state. void GetDamageBufferWithSizeParams( BrowserPluginHostMsg_AutoSize_Params* auto_size_params, - BrowserPluginHostMsg_ResizeGuest_Params* resize_guest_params); + BrowserPluginHostMsg_ResizeGuest_Params* resize_guest_params, + bool needs_repaint); // Informs the guest of an updated autosize state. - void UpdateGuestAutoSizeState(bool current_auto_size); - - // Informs the BrowserPlugin that guest has changed its size in autosize mode. - void SizeChangedDueToAutoSize(const gfx::Size& old_view_size); + void UpdateGuestAutoSizeState(bool auto_size_enabled); // Indicates whether a damage buffer was used by the guest process for the // provided |params|. @@ -283,14 +279,6 @@ class CONTENT_EXPORT BrowserPlugin : bool UsesPendingDamageBuffer( const BrowserPluginMsg_UpdateRect_Params& params); - // Called when the tracked object of |id| ID becomes unreachable in - // JavaScript. - void OnTrackedObjectGarbageCollected(int id); - // V8 garbage collection callback for |object|. - static void WeakCallbackForTrackedObject(v8::Isolate* isolate, - v8::Persistent<v8::Value>* object, - void* param); - // IPC message handlers. // Please keep in alphabetical order. void OnAdvanceFocus(int instance_id, bool reverse); @@ -312,6 +300,9 @@ class CONTENT_EXPORT BrowserPlugin : // This is the browser-process-allocated instance ID that uniquely identifies // a guest WebContents. int guest_instance_id_; + // This indicates whether this BrowserPlugin has been attached to a + // WebContents. + bool attached_; base::WeakPtr<RenderViewImpl> render_view_; // We cache the |render_view_|'s routing ID because we need it on destruction. // If the |render_view_| is destroyed before the BrowserPlugin is destroyed @@ -323,14 +314,16 @@ class CONTENT_EXPORT BrowserPlugin : scoped_ptr<base::SharedMemory> current_damage_buffer_; scoped_ptr<base::SharedMemory> pending_damage_buffer_; uint32 damage_buffer_sequence_id_; - bool resize_ack_received_; + bool paint_ack_received_; gfx::Rect plugin_rect_; float last_device_scale_factor_; // Bitmap for crashed plugin. Lazily initialized, non-owning pointer. SkBitmap* sad_guest_; bool guest_crashed_; scoped_ptr<BrowserPluginHostMsg_ResizeGuest_Params> pending_resize_params_; - bool auto_size_ack_pending_; + bool is_auto_size_state_dirty_; + // Maximum size constraint for autosize. + gfx::Size max_auto_size_; std::string storage_partition_id_; bool persist_storage_; bool valid_partition_id_; @@ -343,7 +336,6 @@ class CONTENT_EXPORT BrowserPlugin : WebCursor cursor_; gfx::Size last_view_size_; - bool size_changed_in_flight_; bool before_first_navigation_; bool mouse_locked_; |
