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

Unified Diff: chrome/browser/ui/views/location_bar/zoom_bubble_view.cc

Issue 795053003: [Password Manager] Close the bubble when fullscreen state gets change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
Index: chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
diff --git a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
index 354d3918d17442d49c7320a612471e86a1319395..ded8564e57ef4a3ccd931332d33931246cb38be6 100644
--- a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
+++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
@@ -131,8 +131,7 @@ ZoomBubbleView::ZoomBubbleView(
bool auto_close,
ImmersiveModeController* immersive_mode_controller,
FullscreenController* fullscreen_controller)
- : BubbleDelegateView(anchor_view, anchor_view ?
- views::BubbleBorder::TOP_RIGHT : views::BubbleBorder::NONE),
+ : ManagedFullScreenBubbleDelegateView(anchor_view, web_contents),
image_button_(NULL),
label_(NULL),
web_contents_(web_contents),
@@ -142,11 +141,7 @@ ZoomBubbleView::ZoomBubbleView(
set_anchor_view_insets(gfx::Insets(5, 0, 5, 0));
set_notify_enter_exit_on_child(true);
- // Add observers to close the bubble if the fullscreen state or immersive
- // fullscreen revealed state changes.
- registrar_.Add(this,
- chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- content::Source<FullscreenController>(fullscreen_controller));
+ // Add observers immersive fullscreen revealed state changes.
vasilii 2014/12/17 13:40:11 nit: grammar.
Pritam Nikam 2014/12/17 16:06:26 Done.
immersive_mode_controller_->AddObserver(this);
}
@@ -295,7 +290,7 @@ void ZoomBubbleView::Init() {
views::ColumnSet* columns = grid_layout->AddColumnSet(0);
// First row.
if (extension_info_.icon_image) {
- columns->AddColumn(views::GridLayout::CENTER,views::GridLayout::CENTER, 2,
+ columns->AddColumn(views::GridLayout::CENTER, views::GridLayout::CENTER, 2,
views::GridLayout::USE_PREF, 0, 0);
}
columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
@@ -342,13 +337,6 @@ void ZoomBubbleView::Init() {
StartTimerIfNecessary();
}
-void ZoomBubbleView::Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- DCHECK_EQ(type, chrome::NOTIFICATION_FULLSCREEN_CHANGED);
- CloseBubble();
-}
-
void ZoomBubbleView::OnImmersiveRevealStarted() {
CloseBubble();
}

Powered by Google App Engine
This is Rietveld 408576698