summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorflackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-10 21:55:10 +0000
committerflackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-10 21:55:10 +0000
commit2c9171d2865b5b727a9bab050e1000e2d2c3cc44 (patch)
tree4b9ea66194cf8c16049a270394ea40d29323965f /content
parent6895b79c71f7d5c00934187fb60aec43b6d0c6d8 (diff)
downloadchromium_src-2c9171d2865b5b727a9bab050e1000e2d2c3cc44.zip
chromium_src-2c9171d2865b5b727a9bab050e1000e2d2c3cc44.tar.gz
chromium_src-2c9171d2865b5b727a9bab050e1000e2d2c3cc44.tar.bz2
Ignore non-active fullscreen windows for shelf state.
BUG=319889 TEST=ShelfLayoutManagerTest.FullscreenWindowInFrontHidesShelf, ShelfLayoutManagerTest.FullscreenWindowOnSecondDisplay,WorkspaceLayoutManagerTest.NotifyFullscreenChanges TEST=Navigate to a site using HTML5 fullscreen API, alt tab away to another window and back. Window remains fullscreen but shelf shows while another window is in front. Review URL: https://codereview.chromium.org/100903002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239859 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura.cc8
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura.h3
2 files changed, 10 insertions, 1 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 48bf38b..2be8603 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -4,6 +4,7 @@
#include "content/browser/renderer_host/render_widget_host_view_aura.h"
+#include "base/auto_reset.h"
#include "base/basictypes.h"
#include "base/bind.h"
#include "base/callback_helpers.h"
@@ -450,6 +451,7 @@ RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host)
: host_(RenderWidgetHostImpl::From(host)),
window_(new aura::Window(this)),
in_shutdown_(false),
+ in_bounds_changed_(false),
is_fullscreen_(false),
popup_parent_host_view_(NULL),
popup_child_host_view_(NULL),
@@ -1166,7 +1168,10 @@ void RenderWidgetHostViewAura::InternalSetBounds(const gfx::Rect& rect) {
if (HasDisplayPropertyChanged(window_))
host_->InvalidateScreenInfo();
- window_->SetBounds(rect);
+ // Don't recursively call SetBounds if this bounds update is the result of
+ // a Window::SetBoundsInternal call.
+ if (!in_bounds_changed_)
+ window_->SetBounds(rect);
host_->WasResized();
MaybeCreateResizeLock();
if (touch_editing_client_) {
@@ -2475,6 +2480,7 @@ gfx::Size RenderWidgetHostViewAura::GetMaximumSize() const {
void RenderWidgetHostViewAura::OnBoundsChanged(const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) {
+ base::AutoReset<bool> in_bounds_changed(&in_bounds_changed_, true);
// We care about this only in fullscreen mode, where there is no
// WebContentsViewAura. We are sized via SetSize() or SetBounds() by
// WebContentsViewAura in other cases.
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 83fb8b9..86db864 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -584,6 +584,9 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
// after requesting shutdown for another reason (e.g. Escape key).
bool in_shutdown_;
+ // True if in the process of handling a window bounds changed notification.
+ bool in_bounds_changed_;
+
// Is this a fullscreen view?
bool is_fullscreen_;