| 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_COLLECTED_COOKIES_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_COLLECTED_COOKIES_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_COLLECTED_COOKIES_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_COLLECTED_COOKIES_VIEWS_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "components/content_settings/core/common/content_settings.h" | 9 #include "components/content_settings/core/common/content_settings.h" |
| 10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 class CollectedCookiesViews : public views::DialogDelegateView, | 38 class CollectedCookiesViews : public views::DialogDelegateView, |
| 39 public content::NotificationObserver, | 39 public content::NotificationObserver, |
| 40 public views::ButtonListener, | 40 public views::ButtonListener, |
| 41 public views::TabbedPaneListener, | 41 public views::TabbedPaneListener, |
| 42 public views::TreeViewController { | 42 public views::TreeViewController { |
| 43 public: | 43 public: |
| 44 // Use BrowserWindow::ShowCollectedCookiesDialog to show. | 44 // Use BrowserWindow::ShowCollectedCookiesDialog to show. |
| 45 explicit CollectedCookiesViews(content::WebContents* web_contents); | 45 explicit CollectedCookiesViews(content::WebContents* web_contents); |
| 46 | 46 |
| 47 // views::DialogDelegate: | 47 // views::DialogDelegate: |
| 48 virtual base::string16 GetWindowTitle() const override; | 48 base::string16 GetWindowTitle() const override; |
| 49 virtual int GetDialogButtons() const override; | 49 int GetDialogButtons() const override; |
| 50 virtual base::string16 GetDialogButtonLabel( | 50 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; |
| 51 ui::DialogButton button) const override; | 51 bool Cancel() override; |
| 52 virtual bool Cancel() override; | 52 ui::ModalType GetModalType() const override; |
| 53 virtual ui::ModalType GetModalType() const override; | |
| 54 | 53 |
| 55 // views::ButtonListener: | 54 // views::ButtonListener: |
| 56 virtual void ButtonPressed(views::Button* sender, | 55 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 57 const ui::Event& event) override; | |
| 58 | 56 |
| 59 // views::TabbedPaneListener: | 57 // views::TabbedPaneListener: |
| 60 virtual void TabSelectedAt(int index) override; | 58 void TabSelectedAt(int index) override; |
| 61 | 59 |
| 62 // views::TreeViewController: | 60 // views::TreeViewController: |
| 63 virtual void OnTreeViewSelectionChanged(views::TreeView* tree_view) override; | 61 void OnTreeViewSelectionChanged(views::TreeView* tree_view) override; |
| 64 | 62 |
| 65 // views::View: | 63 // views::View: |
| 66 virtual gfx::Size GetMinimumSize() const override; | 64 gfx::Size GetMinimumSize() const override; |
| 67 virtual void ViewHierarchyChanged( | 65 void ViewHierarchyChanged( |
| 68 const ViewHierarchyChangedDetails& details) override; | 66 const ViewHierarchyChangedDetails& details) override; |
| 69 | 67 |
| 70 private: | 68 private: |
| 71 virtual ~CollectedCookiesViews(); | 69 ~CollectedCookiesViews() override; |
| 72 | 70 |
| 73 void Init(); | 71 void Init(); |
| 74 | 72 |
| 75 views::View* CreateAllowedPane(); | 73 views::View* CreateAllowedPane(); |
| 76 | 74 |
| 77 views::View* CreateBlockedPane(); | 75 views::View* CreateBlockedPane(); |
| 78 | 76 |
| 79 // Creates and returns a containing ScrollView around the given tree view. | 77 // Creates and returns a containing ScrollView around the given tree view. |
| 80 views::View* CreateScrollView(views::TreeView* pane); | 78 views::View* CreateScrollView(views::TreeView* pane); |
| 81 | 79 |
| 82 void EnableControls(); | 80 void EnableControls(); |
| 83 | 81 |
| 84 void ShowCookieInfo(); | 82 void ShowCookieInfo(); |
| 85 | 83 |
| 86 void AddContentException(views::TreeView* tree_view, ContentSetting setting); | 84 void AddContentException(views::TreeView* tree_view, ContentSetting setting); |
| 87 | 85 |
| 88 // content::NotificationObserver: | 86 // content::NotificationObserver: |
| 89 virtual void Observe(int type, | 87 void Observe(int type, |
| 90 const content::NotificationSource& source, | 88 const content::NotificationSource& source, |
| 91 const content::NotificationDetails& details) override; | 89 const content::NotificationDetails& details) override; |
| 92 | 90 |
| 93 content::NotificationRegistrar registrar_; | 91 content::NotificationRegistrar registrar_; |
| 94 | 92 |
| 95 // The web contents. | 93 // The web contents. |
| 96 content::WebContents* web_contents_; | 94 content::WebContents* web_contents_; |
| 97 | 95 |
| 98 // Assorted views. | 96 // Assorted views. |
| 99 views::Label* allowed_label_; | 97 views::Label* allowed_label_; |
| 100 views::Label* blocked_label_; | 98 views::Label* blocked_label_; |
| 101 | 99 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 113 CookieInfoView* cookie_info_view_; | 111 CookieInfoView* cookie_info_view_; |
| 114 | 112 |
| 115 InfobarView* infobar_; | 113 InfobarView* infobar_; |
| 116 | 114 |
| 117 bool status_changed_; | 115 bool status_changed_; |
| 118 | 116 |
| 119 DISALLOW_COPY_AND_ASSIGN(CollectedCookiesViews); | 117 DISALLOW_COPY_AND_ASSIGN(CollectedCookiesViews); |
| 120 }; | 118 }; |
| 121 | 119 |
| 122 #endif // CHROME_BROWSER_UI_VIEWS_COLLECTED_COOKIES_VIEWS_H_ | 120 #endif // CHROME_BROWSER_UI_VIEWS_COLLECTED_COOKIES_VIEWS_H_ |
| OLD | NEW |