Index: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc |
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc |
index 28a7585e110e18dbc10d22a30c153404628896e5..7cd41a51f06b975677d21c57afbfc3f2f90fb9d6 100644 |
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc |
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc |
@@ -1021,9 +1021,7 @@ ManagePasswordsBubbleView::ManagePasswordsBubbleView( |
ManagePasswordsIconView* anchor_view, |
DisplayReason reason) |
: ManagePasswordsBubble(web_contents, reason), |
- BubbleDelegateView(anchor_view, |
- anchor_view ? views::BubbleBorder::TOP_RIGHT |
- : views::BubbleBorder::NONE), |
+ ManagedFullScreenBubbleDelegateView(anchor_view, web_contents), |
anchor_view_(anchor_view), |
initially_focused_view_(NULL) { |
// Compensate for built-in vertical padding in the anchor view's image. |
@@ -1031,13 +1029,6 @@ ManagePasswordsBubbleView::ManagePasswordsBubbleView( |
if (anchor_view) |
anchor_view->SetActive(true); |
mouse_handler_.reset(new WebContentMouseHandler(this)); |
- |
- // Add observers to close the bubble if the fullscreen state changes. |
- Browser* browser = chrome::FindBrowserWithWebContents(web_contents); |
- registrar_.Add( |
- this, |
- chrome::NOTIFICATION_FULLSCREEN_CHANGED, |
- content::Source<FullscreenController>(browser->fullscreen_controller())); |
} |
ManagePasswordsBubbleView::~ManagePasswordsBubbleView() { |
@@ -1045,20 +1036,6 @@ ManagePasswordsBubbleView::~ManagePasswordsBubbleView() { |
anchor_view_->SetActive(false); |
} |
-void ManagePasswordsBubbleView::AdjustForFullscreen( |
- const gfx::Rect& screen_bounds) { |
- if (GetAnchorView()) |
- return; |
- |
- // The bubble's padding from the screen edge, used in fullscreen. |
- const int kFullscreenPaddingEnd = 20; |
- const size_t bubble_half_width = width() / 2; |
- const int x_pos = base::i18n::IsRTL() ? |
- screen_bounds.x() + bubble_half_width + kFullscreenPaddingEnd : |
- screen_bounds.right() - bubble_half_width - kFullscreenPaddingEnd; |
- SetAnchorRect(gfx::Rect(x_pos, screen_bounds.y(), 0, 0)); |
-} |
- |
void ManagePasswordsBubbleView::Close() { |
mouse_handler_.reset(); |
GetWidget()->Close(); |
@@ -1130,12 +1107,3 @@ void ManagePasswordsBubbleView::WindowClosing() { |
views::View* ManagePasswordsBubbleView::GetInitiallyFocusedView() { |
return initially_focused_view_; |
} |
- |
-void ManagePasswordsBubbleView::Observe( |
- int type, |
- const content::NotificationSource& source, |
- const content::NotificationDetails& details) { |
- DCHECK_EQ(type, chrome::NOTIFICATION_FULLSCREEN_CHANGED); |
- GetWidget()->SetVisibilityAnimationTransition(views::Widget::ANIMATE_NONE); |
- CloseBubble(); |
-} |