diff options
author | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-08 04:20:10 +0000 |
---|---|---|
committer | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-08 04:20:10 +0000 |
commit | 0c6e969a46c294e81f616e9c2da725f1e45f268f (patch) | |
tree | 8d03791b4be7c4e78535e26104fc98f6c36bf048 /ui/views/bubble | |
parent | fcae032c9e8a900167d8ce71cf66f581b2390162 (diff) | |
download | chromium_src-0c6e969a46c294e81f616e9c2da725f1e45f268f.zip chromium_src-0c6e969a46c294e81f616e9c2da725f1e45f268f.tar.gz chromium_src-0c6e969a46c294e81f616e9c2da725f1e45f268f.tar.bz2 |
Move logic wrt to revealing the top-of-window views in immersive fullscreen when a bubble is visible to ImmersiveModeControllerAsh.
BUG=181684
TEST=ImmersiveModeControllerAshTest.*
Review URL: https://chromiumcodereview.appspot.com/18284002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210341 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/bubble')
-rw-r--r-- | ui/views/bubble/bubble_delegate.cc | 4 | ||||
-rw-r--r-- | ui/views/bubble/bubble_delegate.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/ui/views/bubble/bubble_delegate.cc b/ui/views/bubble/bubble_delegate.cc index 75946c7c..32a7b54 100644 --- a/ui/views/bubble/bubble_delegate.cc +++ b/ui/views/bubble/bubble_delegate.cc @@ -294,6 +294,10 @@ void BubbleDelegateView::SetArrowPaintType( SizeToContents(); } +void BubbleDelegateView::OnAnchorViewBoundsChanged() { + SizeToContents(); +} + bool BubbleDelegateView::AcceleratorPressed( const ui::Accelerator& accelerator) { if (!close_on_esc() || accelerator.key_code() != ui::VKEY_ESCAPE) diff --git a/ui/views/bubble/bubble_delegate.h b/ui/views/bubble/bubble_delegate.h index be35b79..d6c45be 100644 --- a/ui/views/bubble/bubble_delegate.h +++ b/ui/views/bubble/bubble_delegate.h @@ -116,6 +116,11 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView, // Sets the bubble arrow paint type. void SetArrowPaintType(BubbleBorder::ArrowPaintType paint_type); + // Call this method when the anchor view bounds have changed to reposition + // the bubble. The bubble is automatically repositioned when the anchor view + // bounds change as a result of the widget's bounds changing. + void OnAnchorViewBoundsChanged(); + protected: // Get bubble bounds from the anchor rect and client view's preferred size. virtual gfx::Rect GetBubbleBounds(); |