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_PAGE_INFO_WEBSITE_SETTINGS_POPUP_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAGE_INFO_WEBSITE_SETTINGS_POPUP_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_PAGE_INFO_WEBSITE_SETTINGS_POPUP_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAGE_INFO_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 26 matching lines...) Expand all Loading... |
37 struct SecurityInfo; | 37 struct SecurityInfo; |
38 } // namespace security_state | 38 } // namespace security_state |
39 | 39 |
40 namespace test { | 40 namespace test { |
41 class WebsiteSettingsPopupViewTestApi; | 41 class WebsiteSettingsPopupViewTestApi; |
42 } | 42 } |
43 | 43 |
44 namespace views { | 44 namespace views { |
45 class Link; | 45 class Link; |
46 class Widget; | 46 class Widget; |
| 47 class WidgetObserver; |
47 } | 48 } |
48 | 49 |
49 enum : int { | 50 enum : int { |
50 // Left icon margin. | 51 // Left icon margin. |
51 kPermissionIconMarginLeft = 6, | 52 kPermissionIconMarginLeft = 6, |
52 // The width of the column that contains the permissions icons. | 53 // The width of the column that contains the permissions icons. |
53 kPermissionIconColumnWidth = 16, | 54 kPermissionIconColumnWidth = 16, |
54 }; | 55 }; |
55 | 56 |
56 // The views implementation of the website settings UI. | 57 // The views implementation of the website settings UI. |
(...skipping 12 matching lines...) Expand all Loading... |
69 enum PopupType { | 70 enum PopupType { |
70 POPUP_NONE, | 71 POPUP_NONE, |
71 // Usual page info bubble for websites. | 72 // Usual page info bubble for websites. |
72 POPUP_WEBSITE_SETTINGS, | 73 POPUP_WEBSITE_SETTINGS, |
73 // Custom bubble for internal pages like chrome:// and chrome-extensions://. | 74 // Custom bubble for internal pages like chrome:// and chrome-extensions://. |
74 POPUP_INTERNAL_PAGE | 75 POPUP_INTERNAL_PAGE |
75 }; | 76 }; |
76 | 77 |
77 // If |anchor_view| is null, |anchor_rect| is used to anchor the bubble. | 78 // If |anchor_view| is null, |anchor_rect| is used to anchor the bubble. |
78 static void ShowPopup(views::View* anchor_view, | 79 static void ShowPopup(views::View* anchor_view, |
| 80 views::WidgetObserver* widget_observer, |
79 const gfx::Rect& anchor_rect, | 81 const gfx::Rect& anchor_rect, |
80 Profile* profile, | 82 Profile* profile, |
81 content::WebContents* web_contents, | 83 content::WebContents* web_contents, |
82 const GURL& url, | 84 const GURL& url, |
83 const security_state::SecurityInfo& security_info); | 85 const security_state::SecurityInfo& security_info); |
84 | 86 |
85 // Returns the type of the popup bubble being shown. | 87 // Returns the type of the popup bubble being shown. |
86 static PopupType GetShownPopupType(); | 88 static PopupType GetShownPopupType(); |
87 | 89 |
88 private: | 90 private: |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // permissions section, and keep those views updated when the underlying | 179 // permissions section, and keep those views updated when the underlying |
178 // |Permission| changes. | 180 // |Permission| changes. |
179 std::vector<std::unique_ptr<PermissionSelectorRow>> selector_rows_; | 181 std::vector<std::unique_ptr<PermissionSelectorRow>> selector_rows_; |
180 | 182 |
181 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; | 183 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; |
182 | 184 |
183 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); | 185 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); |
184 }; | 186 }; |
185 | 187 |
186 #endif // CHROME_BROWSER_UI_VIEWS_PAGE_INFO_WEBSITE_SETTINGS_POPUP_VIEW_H_ | 188 #endif // CHROME_BROWSER_UI_VIEWS_PAGE_INFO_WEBSITE_SETTINGS_POPUP_VIEW_H_ |
OLD | NEW |