| 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 "base/basictypes.h" | |
| 9 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 12 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 13 #include "chrome/browser/ui/views/website_settings/permission_selector_view_obse
rver.h" | 12 #include "chrome/browser/ui/views/website_settings/permission_selector_view_obse
rver.h" |
| 14 #include "chrome/browser/ui/website_settings/website_settings_ui.h" | 13 #include "chrome/browser/ui/website_settings/website_settings_ui.h" |
| 15 #include "ui/views/bubble/bubble_delegate.h" | 14 #include "ui/views/bubble/bubble_delegate.h" |
| 16 #include "ui/views/controls/button/button.h" | 15 #include "ui/views/controls/button/button.h" |
| 17 #include "ui/views/controls/button/label_button.h" | |
| 18 #include "ui/views/controls/link_listener.h" | 16 #include "ui/views/controls/link_listener.h" |
| 19 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h" | 17 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h" |
| 20 | 18 |
| 21 class Browser; | |
| 22 class GURL; | 19 class GURL; |
| 23 class PermissionSelectorView; | |
| 24 class PopupHeaderView; | 20 class PopupHeaderView; |
| 25 class Profile; | 21 class Profile; |
| 26 | 22 |
| 27 namespace content { | 23 namespace content { |
| 28 struct SSLStatus; | 24 struct SSLStatus; |
| 29 class WebContents; | 25 class WebContents; |
| 30 } | 26 } |
| 31 | 27 |
| 32 namespace views { | 28 namespace views { |
| 33 class LabelButton; | 29 class LabelButton; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 44 public views::LinkListener, | 40 public views::LinkListener, |
| 45 public views::TabbedPaneListener, | 41 public views::TabbedPaneListener, |
| 46 public WebsiteSettingsUI { | 42 public WebsiteSettingsUI { |
| 47 public: | 43 public: |
| 48 ~WebsiteSettingsPopupView() override; | 44 ~WebsiteSettingsPopupView() override; |
| 49 | 45 |
| 50 static void ShowPopup(views::View* anchor_view, | 46 static void ShowPopup(views::View* anchor_view, |
| 51 Profile* profile, | 47 Profile* profile, |
| 52 content::WebContents* web_contents, | 48 content::WebContents* web_contents, |
| 53 const GURL& url, | 49 const GURL& url, |
| 54 const content::SSLStatus& ssl, | 50 const content::SSLStatus& ssl); |
| 55 Browser* browser); | |
| 56 | 51 |
| 57 static bool IsPopupShowing(); | 52 static bool IsPopupShowing(); |
| 58 | 53 |
| 59 private: | 54 private: |
| 60 WebsiteSettingsPopupView(views::View* anchor_view, | 55 WebsiteSettingsPopupView(views::View* anchor_view, |
| 61 Profile* profile, | 56 Profile* profile, |
| 62 content::WebContents* web_contents, | 57 content::WebContents* web_contents, |
| 63 const GURL& url, | 58 const GURL& url, |
| 64 const content::SSLStatus& ssl, | 59 const content::SSLStatus& ssl); |
| 65 Browser* browser); | |
| 66 | 60 |
| 67 // PermissionSelectorViewObserver implementation. | 61 // PermissionSelectorViewObserver implementation. |
| 68 void OnPermissionChanged( | 62 void OnPermissionChanged( |
| 69 const WebsiteSettingsUI::PermissionInfo& permission) override; | 63 const WebsiteSettingsUI::PermissionInfo& permission) override; |
| 70 | 64 |
| 71 // views::BubbleDelegateView implementation. | 65 // views::BubbleDelegateView implementation. |
| 72 void OnWidgetDestroying(views::Widget* widget) override; | 66 void OnWidgetDestroying(views::Widget* widget) override; |
| 73 | 67 |
| 74 // views::ButtonListener implementation. | 68 // views::ButtonListener implementation. |
| 75 void ButtonPressed(views::Button* button, const ui::Event& event) override; | 69 void ButtonPressed(views::Button* button, const ui::Event& event) override; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 115 |
| 122 // Used to asynchronously handle clicks since these calls may cause the | 116 // Used to asynchronously handle clicks since these calls may cause the |
| 123 // destruction of the settings view and the base class window still needs to | 117 // destruction of the settings view and the base class window still needs to |
| 124 // be alive to finish handling the mouse or keyboard click. | 118 // be alive to finish handling the mouse or keyboard click. |
| 125 void HandleLinkClickedAsync(views::Link* source); | 119 void HandleLinkClickedAsync(views::Link* source); |
| 126 | 120 |
| 127 // The web contents of the current tab. The popup can't live longer than a | 121 // The web contents of the current tab. The popup can't live longer than a |
| 128 // tab. | 122 // tab. |
| 129 content::WebContents* web_contents_; | 123 content::WebContents* web_contents_; |
| 130 | 124 |
| 131 // The Browser is used to load the help center page. | |
| 132 Browser* browser_; | |
| 133 | |
| 134 // The presenter that controls the Website Settings UI. | 125 // The presenter that controls the Website Settings UI. |
| 135 scoped_ptr<WebsiteSettings> presenter_; | 126 scoped_ptr<WebsiteSettings> presenter_; |
| 136 | 127 |
| 137 PopupHeaderView* header_; // Owned by views hierarchy. | 128 PopupHeaderView* header_; // Owned by views hierarchy. |
| 138 | 129 |
| 139 // The |TabbedPane| that contains the tabs of the Website Settings UI. | 130 // The |TabbedPane| that contains the tabs of the Website Settings UI. |
| 140 views::TabbedPane* tabbed_pane_; | 131 views::TabbedPane* tabbed_pane_; |
| 141 | 132 |
| 142 // The view that contains the permissions tab contents. | 133 // The view that contains the permissions tab contents. |
| 143 views::View* permissions_tab_; | 134 views::View* permissions_tab_; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 views::Link* site_settings_link_; | 170 views::Link* site_settings_link_; |
| 180 | 171 |
| 181 views::View* connection_info_content_; | 172 views::View* connection_info_content_; |
| 182 | 173 |
| 183 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; | 174 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; |
| 184 | 175 |
| 185 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); | 176 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); |
| 186 }; | 177 }; |
| 187 | 178 |
| 188 #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 |