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

Unified Diff: chrome/browser/ui/views/managed_full_screen_bubble_delegate_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: 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/managed_full_screen_bubble_delegate_view.h
diff --git a/chrome/browser/ui/views/managed_full_screen_bubble_delegate_view.h b/chrome/browser/ui/views/managed_full_screen_bubble_delegate_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..1821b4c3b38578558ffff6788d9df9f0b0aafe5c
--- /dev/null
+++ b/chrome/browser/ui/views/managed_full_screen_bubble_delegate_view.h
@@ -0,0 +1,60 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_VIEWS_MANAGED_FULL_SCREEN_BUBBLE_DELEGATE_VIEW_H_
+#define CHROME_BROWSER_UI_VIEWS_MANAGED_FULL_SCREEN_BUBBLE_DELEGATE_VIEW_H_
+
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+#include "ui/views/bubble/bubble_delegate.h"
+
+class ManagePasswordsIconView;
vasilii 2014/12/17 13:40:12 unused.
Pritam Nikam 2014/12/17 16:06:26 Done.
+
+namespace content {
+class NotificationDetails;
+class NotificationObserver;
+class NotificationRegistrar;
vasilii 2014/12/17 13:40:12 No need to forward declare classes which you alrea
Pritam Nikam 2014/12/17 16:06:26 Done.
+class NotificationSource;
+class WebContents;
+};
+
+namespace views {
+class BubbleDelegateView;
+class View;
vasilii 2014/12/17 13:40:12 The same as above.
Pritam Nikam 2014/12/17 16:06:26 Done.
+}
+
+class ManagedFullScreenBubbleDelegateView
vasilii 2014/12/17 13:40:12 Add a comment.
Pritam Nikam 2014/12/17 16:06:26 Done.
+ : public views::BubbleDelegateView,
+ public content::NotificationObserver {
+ public:
+ ManagedFullScreenBubbleDelegateView(views::View* anchor_view,
+ content::WebContents* web_contents);
+ ~ManagedFullScreenBubbleDelegateView() override;
+
+ // Close the buuble.
vasilii 2014/12/17 13:40:12 bubble
Pritam Nikam 2014/12/17 16:06:26 Done.
+ virtual void Close();
vasilii 2014/12/17 13:40:12 This method should be neither public nor virtual.
Pritam Nikam 2014/12/17 16:06:26 subclasses having specific implementations hence n
+
+ // content::NotificationObserver:
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
+
+ protected:
+ // 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);
+
+ // views::View:
+ bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
+
+ private:
+ // Used to register for fullscreen change notifications.
+ content::NotificationRegistrar registrar_;
+
+ DISALLOW_COPY_AND_ASSIGN(ManagedFullScreenBubbleDelegateView);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_MANAGED_FULL_SCREEN_BUBBLE_DELEGATE_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698