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 LocationBarBubbleDelegateView(views::View* anchor_view, | 37 LocationBarBubbleDelegateView(views::View* anchor_view, |
msw
2017/04/19 18:23:17
nit: add a comment
varkha
2017/04/20 04:14:20
Done.
| |
38 const gfx::Point& anchor_point, | |
39 content::WebContents* web_contents); | |
40 | |
41 // TODO(varkha): Delete this override and use the constructor above. | |
42 LocationBarBubbleDelegateView(views::View* anchor_view, | |
38 content::WebContents* web_contents); | 43 content::WebContents* web_contents); |
39 ~LocationBarBubbleDelegateView() override; | 44 ~LocationBarBubbleDelegateView() override; |
40 | 45 |
41 // Displays the bubble with appearance and behavior tailored for |reason|. | 46 // Displays the bubble with appearance and behavior tailored for |reason|. |
42 void ShowForReason(DisplayReason reason); | 47 void ShowForReason(DisplayReason reason); |
43 | 48 |
44 // views::BubbleDialogDelegateView: | 49 // views::BubbleDialogDelegateView: |
45 int GetDialogButtons() const override; | 50 int GetDialogButtons() const override; |
46 | 51 |
47 // content::NotificationObserver: | 52 // content::NotificationObserver: |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 void AdjustForFullscreen(const gfx::Rect& screen_bounds); | 86 void AdjustForFullscreen(const gfx::Rect& screen_bounds); |
82 | 87 |
83 private: | 88 private: |
84 // Used to register for fullscreen change notifications. | 89 // Used to register for fullscreen change notifications. |
85 content::NotificationRegistrar registrar_; | 90 content::NotificationRegistrar registrar_; |
86 | 91 |
87 DISALLOW_COPY_AND_ASSIGN(LocationBarBubbleDelegateView); | 92 DISALLOW_COPY_AND_ASSIGN(LocationBarBubbleDelegateView); |
88 }; | 93 }; |
89 | 94 |
90 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_BUBBLE_DELEGATE_VIE W_H_ | 95 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_BUBBLE_DELEGATE_VIE W_H_ |
OLD | NEW |