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

Unified Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h

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: Addresses Peter's review comments. 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/passwords/manage_passwords_bubble_view.h
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h
index f888b356474986b8a62c83213896c7a35527207d..af0eca7899c6bb061f44c6986a61bf161f66cd0e 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h
@@ -6,9 +6,7 @@
#define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_
#include "chrome/browser/ui/passwords/manage_passwords_bubble.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
-#include "ui/views/bubble/bubble_delegate.h"
+#include "chrome/browser/ui/views/managed_full_screen_bubble_delegate_view.h"
class ManagePasswordsIconView;
@@ -25,8 +23,7 @@ class WebContents;
// 3. BlacklistedView: Informs the user that the current page is blacklisted.
//
class ManagePasswordsBubbleView : public ManagePasswordsBubble,
- public views::BubbleDelegateView,
- public content::NotificationObserver {
+ public ManagedFullScreenBubbleDelegateView {
public:
// Shows the bubble.
static void ShowBubble(content::WebContents* web_contents,
@@ -61,20 +58,18 @@ class ManagePasswordsBubbleView : public ManagePasswordsBubble,
class PendingView;
class SaveConfirmationView;
class SetupOSPasswordView;
+ class WebContentMouseHandler;
ManagePasswordsBubbleView(content::WebContents* web_contents,
ManagePasswordsIconView* anchor_view,
DisplayReason reason);
~ManagePasswordsBubbleView() override;
- // If the bubble is not anchored to a view, places the bubble in the top
- // right (left in RTL) of the |screen_bounds| that contain |web_contents_|'s
- // browser window. Because the positioning is based on the size of the
- // bubble, this must be called after the bubble is created.
- void AdjustForFullscreen(const gfx::Rect& screen_bounds);
-
- // Close the bubble.
- void Close();
+ // ManagedFullScreenBubbleDelegateView:
+ views::View* GetInitiallyFocusedView() override;
+ void Init() override;
+ void WindowClosing() override;
+ void Close() override;
// Refreshes the bubble's state: called to display a confirmation screen after
// a user selects "Never for this site", for instance.
@@ -92,18 +87,6 @@ class ManagePasswordsBubbleView : public ManagePasswordsBubble,
// undo the action and refresh to PendingView.
void NotifyUndoNeverForThisSite();
- // views::BubbleDelegateView:
- void Init() override;
- void WindowClosing() override;
-
- // views::WidgetDelegate:
- views::View* GetInitiallyFocusedView() override;
-
- // content::NotificationObserver:
- void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
-
void set_initially_focused_view(views::View* view) {
DCHECK(!initially_focused_view_);
initially_focused_view_ = view;
@@ -120,12 +103,8 @@ class ManagePasswordsBubbleView : public ManagePasswordsBubble,
views::View* initially_focused_view_;
// A helper to intercept mouse click events on the web contents.
- class WebContentMouseHandler;
scoped_ptr<WebContentMouseHandler> mouse_handler_;
- // Used to register for fullscreen change notifications.
- content::NotificationRegistrar registrar_;
-
DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleView);
};

Powered by Google App Engine
This is Rietveld 408576698