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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_MANAGED_FULL_SCREEN_BUBBLE_DELEGATE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_MANAGED_FULL_SCREEN_BUBBLE_DELEGATE_VIEW_H_
7
8 #include "content/public/browser/notification_observer.h"
9 #include "content/public/browser/notification_registrar.h"
10 #include "ui/views/bubble/bubble_delegate.h"
11
12 class ManagePasswordsIconView;
vasilii 2014/12/17 13:40:12 unused.
Pritam Nikam 2014/12/17 16:06:26 Done.
13
14 namespace content {
15 class NotificationDetails;
16 class NotificationObserver;
17 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.
18 class NotificationSource;
19 class WebContents;
20 };
21
22 namespace views {
23 class BubbleDelegateView;
24 class View;
vasilii 2014/12/17 13:40:12 The same as above.
Pritam Nikam 2014/12/17 16:06:26 Done.
25 }
26
27 class ManagedFullScreenBubbleDelegateView
vasilii 2014/12/17 13:40:12 Add a comment.
Pritam Nikam 2014/12/17 16:06:26 Done.
28 : public views::BubbleDelegateView,
29 public content::NotificationObserver {
30 public:
31 ManagedFullScreenBubbleDelegateView(views::View* anchor_view,
32 content::WebContents* web_contents);
33 ~ManagedFullScreenBubbleDelegateView() override;
34
35 // Close the buuble.
vasilii 2014/12/17 13:40:12 bubble
Pritam Nikam 2014/12/17 16:06:26 Done.
36 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
37
38 // content::NotificationObserver:
39 void Observe(int type,
40 const content::NotificationSource& source,
41 const content::NotificationDetails& details) override;
42
43 protected:
44 // If the bubble is not anchored to a view, places the bubble in the top
45 // right (left in RTL) of the |screen_bounds| that contain |web_contents_|'s
46 // browser window. Because the positioning is based on the size of the
47 // bubble, this must be called after the bubble is created.
48 void AdjustForFullscreen(const gfx::Rect& screen_bounds);
49
50 // views::View:
51 bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
52
53 private:
54 // Used to register for fullscreen change notifications.
55 content::NotificationRegistrar registrar_;
56
57 DISALLOW_COPY_AND_ASSIGN(ManagedFullScreenBubbleDelegateView);
58 };
59
60 #endif // CHROME_BROWSER_UI_VIEWS_MANAGED_FULL_SCREEN_BUBBLE_DELEGATE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698