| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 public PermissionSelectorRowObserver, | 57 public PermissionSelectorRowObserver, |
| 58 public ChosenObjectRowObserver, | 58 public ChosenObjectRowObserver, |
| 59 public views::BubbleDialogDelegateView, | 59 public views::BubbleDialogDelegateView, |
| 60 public views::ButtonListener, | 60 public views::ButtonListener, |
| 61 public views::LinkListener, | 61 public views::LinkListener, |
| 62 public views::StyledLabelListener, | 62 public views::StyledLabelListener, |
| 63 public WebsiteSettingsUI { | 63 public WebsiteSettingsUI { |
| 64 public: | 64 public: |
| 65 ~WebsiteSettingsPopupView() override; | 65 ~WebsiteSettingsPopupView() override; |
| 66 | 66 |
| 67 // Type of the popup being displayed. |
| 68 enum PopupType { |
| 69 POPUP_NONE, |
| 70 // Usual page info bubble for websites. |
| 71 POPUP_WEBSITE_SETTINGS, |
| 72 // Custom bubble for internal pages like chrome:// and chrome-extensions://. |
| 73 POPUP_INTERNAL_PAGE |
| 74 }; |
| 75 |
| 67 // If |anchor_view| is null, |anchor_rect| is used to anchor the bubble. | 76 // If |anchor_view| is null, |anchor_rect| is used to anchor the bubble. |
| 68 static void ShowPopup( | 77 static void ShowPopup( |
| 69 views::View* anchor_view, | 78 views::View* anchor_view, |
| 70 const gfx::Rect& anchor_rect, | 79 const gfx::Rect& anchor_rect, |
| 71 Profile* profile, | 80 Profile* profile, |
| 72 content::WebContents* web_contents, | 81 content::WebContents* web_contents, |
| 73 const GURL& url, | 82 const GURL& url, |
| 74 const security_state::SecurityStateModel::SecurityInfo& security_info); | 83 const security_state::SecurityStateModel::SecurityInfo& security_info); |
| 75 | 84 |
| 76 static bool IsPopupShowing(); | 85 // Returns the type of the popup bubble being shown. |
| 86 static PopupType GetShownPopupType(); |
| 77 | 87 |
| 78 private: | 88 private: |
| 79 friend class test::WebsiteSettingsPopupViewTestApi; | 89 friend class test::WebsiteSettingsPopupViewTestApi; |
| 80 | 90 |
| 81 WebsiteSettingsPopupView( | 91 WebsiteSettingsPopupView( |
| 82 views::View* anchor_view, | 92 views::View* anchor_view, |
| 83 gfx::NativeView parent_window, | 93 gfx::NativeView parent_window, |
| 84 Profile* profile, | 94 Profile* profile, |
| 85 content::WebContents* web_contents, | 95 content::WebContents* web_contents, |
| 86 const GURL& url, | 96 const GURL& url, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 170 |
| 161 // The certificate provided by the site, if one exists. | 171 // The certificate provided by the site, if one exists. |
| 162 scoped_refptr<net::X509Certificate> certificate_; | 172 scoped_refptr<net::X509Certificate> certificate_; |
| 163 | 173 |
| 164 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; | 174 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; |
| 165 | 175 |
| 166 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); | 176 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); |
| 167 }; | 177 }; |
| 168 | 178 |
| 169 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_
H_ | 179 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_
H_ |
| OLD | NEW |