Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(602)

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 102243002: BrowserPlugin: Reduce resize code repetition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_plugin/browser_plugin_guest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 7d166a60ae0f8498db267b22cc0918ca378dcc94..3b288b04a13e5294b5cbe07d8161bd1c1abb04f9 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -1428,15 +1428,10 @@ void BrowserPluginGuest::OnResizeGuest(
}
// Invalid damage buffer means we are in HW compositing mode,
// so just resize the WebContents and repaint if needed.
- if (!base::SharedMemory::IsHandleValid(params.damage_buffer_handle)) {
- if (!params.view_rect.size().IsEmpty())
- GetWebContents()->GetView()->SizeContents(params.view_rect.size());
- if (params.repaint)
- Send(new ViewMsg_Repaint(routing_id(), params.view_rect.size()));
- return;
- }
- SetDamageBuffer(params);
- GetWebContents()->GetView()->SizeContents(params.view_rect.size());
+ if (base::SharedMemory::IsHandleValid(params.damage_buffer_handle))
+ SetDamageBuffer(params);
+ if (!params.view_rect.size().IsEmpty())
+ GetWebContents()->GetView()->SizeContents(params.view_rect.size());
alexst (slow to review) 2013/12/03 17:10:30 Seems like the old code sized contents and set the
if (params.repaint)
Send(new ViewMsg_Repaint(routing_id(), params.view_rect.size()));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698