summaryrefslogtreecommitdiffstats
path: root/content/renderer/browser_plugin/browser_plugin.h
diff options
context:
space:
mode:
authorlazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-05 13:16:26 +0000
committerlazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-05 13:16:26 +0000
commitd191f3c24b0c7384b9f59b2c39db6f35c3549e97 (patch)
treee0756cc18df331b8a8d403c2a8a95988036b2324 /content/renderer/browser_plugin/browser_plugin.h
parentf0fcbc2c71043668c3bac8cb825b16744ea70ae3 (diff)
downloadchromium_src-d191f3c24b0c7384b9f59b2c39db6f35c3549e97.zip
chromium_src-d191f3c24b0c7384b9f59b2c39db6f35c3549e97.tar.gz
chromium_src-d191f3c24b0c7384b9f59b2c39db6f35c3549e97.tar.bz2
Reland attempt 2: Improve <webview> autosize:
a. Expand/shrink <webview> element when 'sizechange' event fires, to match with the new view size (in shim). b. For SW mode, fix a bug where damage buffer would remain smaller than the view size and would result in crash. Added test for this case. BUG=173238, 282116 Test=WebViewTest.AutoSize.*, <webview>.autosize=true now should autosize webview container within the constraints (minwidth/maxwidth/minheight/maxheight). Review URL: https://chromiumcodereview.appspot.com/23691039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221402 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/browser_plugin/browser_plugin.h')
-rw-r--r--content/renderer/browser_plugin/browser_plugin.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/content/renderer/browser_plugin/browser_plugin.h b/content/renderer/browser_plugin/browser_plugin.h
index 001f2d7..ba30ac9 100644
--- a/content/renderer/browser_plugin/browser_plugin.h
+++ b/content/renderer/browser_plugin/browser_plugin.h
@@ -252,20 +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);
+ void UpdateGuestAutoSizeState(bool auto_size_enabled);
// Indicates whether a damage buffer was used by the guest process for the
// provided |params|.
@@ -312,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_;