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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 9673001: Notify RenderWidgets when "tab fullscreen" state changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 months 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 | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_impl.cc
===================================================================
--- content/browser/renderer_host/render_widget_host_impl.cc (revision 126512)
+++ content/browser/renderer_host/render_widget_host_impl.cc (working copy)
@@ -120,6 +120,7 @@
surface_id_(0),
is_loading_(false),
is_hidden_(false),
+ is_fullscreen_(false),
is_accelerated_compositing_active_(false),
repaint_ack_pending_(false),
resize_ack_pending_(false),
@@ -425,21 +426,26 @@
#endif
gfx::Size new_size(view_bounds.size());
+ bool was_fullscreen = is_fullscreen_;
+ is_fullscreen_ = IsFullscreen();
+ bool fullscreen_changed = was_fullscreen != is_fullscreen_;
+ bool size_changed = new_size != current_size_;
+
// Avoid asking the RenderWidget to resize to its current size, since it
// won't send us a PaintRect message in that case.
- if (new_size == current_size_)
+ if (!size_changed && !fullscreen_changed)
return;
- if (in_flight_size_ != gfx::Size() && new_size == in_flight_size_) {
+ if (in_flight_size_ != gfx::Size() && new_size == in_flight_size_ &&
+ !fullscreen_changed)
return;
- }
// We don't expect to receive an ACK when the requested size is empty.
- if (!new_size.IsEmpty())
+ if (!new_size.IsEmpty() && size_changed)
resize_ack_pending_ = true;
if (!Send(new ViewMsg_Resize(routing_id_, new_size,
- GetRootWindowResizerRect(), IsFullscreen()))) {
+ GetRootWindowResizerRect(), is_fullscreen_))) {
resize_ack_pending_ = false;
} else {
in_flight_size_ = new_size;
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698