OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 struct SecurityInfo; | 36 struct SecurityInfo; |
37 } // namespace security_state | 37 } // namespace security_state |
38 | 38 |
39 namespace test { | 39 namespace test { |
40 class WebsiteSettingsPopupViewTestApi; | 40 class WebsiteSettingsPopupViewTestApi; |
41 } | 41 } |
42 | 42 |
43 namespace views { | 43 namespace views { |
44 class Link; | 44 class Link; |
45 class Widget; | 45 class Widget; |
| 46 class WidgetObserver; |
46 } | 47 } |
47 | 48 |
48 enum : int { | 49 enum : int { |
49 // Left icon margin. | 50 // Left icon margin. |
50 kPermissionIconMarginLeft = 6, | 51 kPermissionIconMarginLeft = 6, |
51 // The width of the column that contains the permissions icons. | 52 // The width of the column that contains the permissions icons. |
52 kPermissionIconColumnWidth = 16, | 53 kPermissionIconColumnWidth = 16, |
53 }; | 54 }; |
54 | 55 |
55 // The views implementation of the website settings UI. | 56 // The views implementation of the website settings UI. |
(...skipping 12 matching lines...) Expand all Loading... |
68 enum PopupType { | 69 enum PopupType { |
69 POPUP_NONE, | 70 POPUP_NONE, |
70 // Usual page info bubble for websites. | 71 // Usual page info bubble for websites. |
71 POPUP_WEBSITE_SETTINGS, | 72 POPUP_WEBSITE_SETTINGS, |
72 // Custom bubble for internal pages like chrome:// and chrome-extensions://. | 73 // Custom bubble for internal pages like chrome:// and chrome-extensions://. |
73 POPUP_INTERNAL_PAGE | 74 POPUP_INTERNAL_PAGE |
74 }; | 75 }; |
75 | 76 |
76 // If |anchor_view| is null, |anchor_rect| is used to anchor the bubble. | 77 // If |anchor_view| is null, |anchor_rect| is used to anchor the bubble. |
77 static void ShowPopup(views::View* anchor_view, | 78 static void ShowPopup(views::View* anchor_view, |
| 79 views::WidgetObserver* widget_observer, |
78 const gfx::Rect& anchor_rect, | 80 const gfx::Rect& anchor_rect, |
79 Profile* profile, | 81 Profile* profile, |
80 content::WebContents* web_contents, | 82 content::WebContents* web_contents, |
81 const GURL& url, | 83 const GURL& url, |
82 const security_state::SecurityInfo& security_info); | 84 const security_state::SecurityInfo& security_info); |
83 | 85 |
84 // Returns the type of the popup bubble being shown. | 86 // Returns the type of the popup bubble being shown. |
85 static PopupType GetShownPopupType(); | 87 static PopupType GetShownPopupType(); |
86 | 88 |
87 private: | 89 private: |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 173 |
172 // The certificate provided by the site, if one exists. | 174 // The certificate provided by the site, if one exists. |
173 scoped_refptr<net::X509Certificate> certificate_; | 175 scoped_refptr<net::X509Certificate> certificate_; |
174 | 176 |
175 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; | 177 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; |
176 | 178 |
177 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); | 179 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); |
178 }; | 180 }; |
179 | 181 |
180 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_
H_ | 182 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_
H_ |
OLD | NEW |