Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Side by Side Diff: chrome/browser/ui/views/website_settings/website_settings_popup_view.h

Issue 2397273002: Show a custom page info bubble for chrome-devtools:// URLs (Closed)
Patch Set: Fix mac build Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 public PermissionSelectorRowObserver, 58 public PermissionSelectorRowObserver,
59 public ChosenObjectRowObserver, 59 public ChosenObjectRowObserver,
60 public views::BubbleDialogDelegateView, 60 public views::BubbleDialogDelegateView,
61 public views::ButtonListener, 61 public views::ButtonListener,
62 public views::LinkListener, 62 public views::LinkListener,
63 public views::StyledLabelListener, 63 public views::StyledLabelListener,
64 public WebsiteSettingsUI { 64 public WebsiteSettingsUI {
65 public: 65 public:
66 ~WebsiteSettingsPopupView() override; 66 ~WebsiteSettingsPopupView() override;
67 67
68 // Type of the popup being displayed.
69 enum PopupType {
70 POPUP_NONE,
71 // Usual page info bubble for websites.
72 POPUP_WEBSITE_SETTINGS,
73 // Custom bubble for internal pages like chrome:// and chrome-extensions://.
74 POPUP_INTERNAL_PAGE
75 };
76
68 // 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.
69 static void ShowPopup( 78 static void ShowPopup(
70 views::View* anchor_view, 79 views::View* anchor_view,
71 const gfx::Rect& anchor_rect, 80 const gfx::Rect& anchor_rect,
72 Profile* profile, 81 Profile* profile,
73 content::WebContents* web_contents, 82 content::WebContents* web_contents,
74 const GURL& url, 83 const GURL& url,
75 const security_state::SecurityStateModel::SecurityInfo& security_info); 84 const security_state::SecurityStateModel::SecurityInfo& security_info);
76 85
77 static bool IsPopupShowing(); 86 // Returns the type of the popup bubble being shown.
87 static PopupType GetShownPopupType();
78 88
79 private: 89 private:
80 friend class test::WebsiteSettingsPopupViewTestApi; 90 friend class test::WebsiteSettingsPopupViewTestApi;
81 91
82 WebsiteSettingsPopupView( 92 WebsiteSettingsPopupView(
83 views::View* anchor_view, 93 views::View* anchor_view,
84 gfx::NativeView parent_window, 94 gfx::NativeView parent_window,
85 Profile* profile, 95 Profile* profile,
86 content::WebContents* web_contents, 96 content::WebContents* web_contents,
87 const GURL& url, 97 const GURL& url,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // The link to open the site settings page that provides full control over 182 // The link to open the site settings page that provides full control over
173 // the origin's permissions. 183 // the origin's permissions.
174 views::Link* site_settings_link_; 184 views::Link* site_settings_link_;
175 185
176 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; 186 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_;
177 187
178 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); 188 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView);
179 }; 189 };
180 190
181 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_ H_ 191 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698