OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_BUBBLE_DELEGATE_VIEW_H
_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_BUBBLE_DELEGATE_VIEW_H
_ |
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_BUBBLE_DELEGATE_VIEW_H
_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_BUBBLE_DELEGATE_VIEW_H
_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "content/public/browser/notification_observer.h" | 9 #include "content/public/browser/notification_observer.h" |
10 #include "content/public/browser/notification_registrar.h" | 10 #include "content/public/browser/notification_registrar.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 // The bubble appears as a direct result of a user action (clicking on the | 27 // The bubble appears as a direct result of a user action (clicking on the |
28 // location bar icon). | 28 // location bar icon). |
29 USER_GESTURE, | 29 USER_GESTURE, |
30 | 30 |
31 // The bubble appears spontaneously over the course of the user's | 31 // The bubble appears spontaneously over the course of the user's |
32 // interaction with Chrome (e.g. due to some change in the feature's | 32 // interaction with Chrome (e.g. due to some change in the feature's |
33 // status). | 33 // status). |
34 AUTOMATIC, | 34 AUTOMATIC, |
35 }; | 35 }; |
36 | 36 |
| 37 // Constructs LocationBarBubbleDelegateView. Anchors the bubble to |
| 38 // |anchor_view| when it is not nullptr or alternatively, to |anchor_point|. |
| 39 // Registers with a fullscreen controller identified by |web_contents| to |
| 40 // close the bubble if the fullscreen state changes. |
| 41 LocationBarBubbleDelegateView(views::View* anchor_view, |
| 42 const gfx::Point& anchor_point, |
| 43 content::WebContents* web_contents); |
| 44 |
| 45 // TODO(varkha): Delete this override and use the constructor above. |
37 LocationBarBubbleDelegateView(views::View* anchor_view, | 46 LocationBarBubbleDelegateView(views::View* anchor_view, |
38 content::WebContents* web_contents); | 47 content::WebContents* web_contents); |
39 ~LocationBarBubbleDelegateView() override; | 48 ~LocationBarBubbleDelegateView() override; |
40 | 49 |
41 // Displays the bubble with appearance and behavior tailored for |reason|. | 50 // Displays the bubble with appearance and behavior tailored for |reason|. |
42 void ShowForReason(DisplayReason reason); | 51 void ShowForReason(DisplayReason reason); |
43 | 52 |
44 // views::BubbleDialogDelegateView: | 53 // views::BubbleDialogDelegateView: |
45 int GetDialogButtons() const override; | 54 int GetDialogButtons() const override; |
46 | 55 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 void AdjustForFullscreen(const gfx::Rect& screen_bounds); | 90 void AdjustForFullscreen(const gfx::Rect& screen_bounds); |
82 | 91 |
83 private: | 92 private: |
84 // Used to register for fullscreen change notifications. | 93 // Used to register for fullscreen change notifications. |
85 content::NotificationRegistrar registrar_; | 94 content::NotificationRegistrar registrar_; |
86 | 95 |
87 DISALLOW_COPY_AND_ASSIGN(LocationBarBubbleDelegateView); | 96 DISALLOW_COPY_AND_ASSIGN(LocationBarBubbleDelegateView); |
88 }; | 97 }; |
89 | 98 |
90 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_BUBBLE_DELEGATE_VIE
W_H_ | 99 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_BUBBLE_DELEGATE_VIE
W_H_ |
OLD | NEW |