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 "chrome/common/content_settings.h" | 9 #include "chrome/common/content_settings.h" |
10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 string16 GetWindowTitle() const OVERRIDE; | 48 virtual string16 GetWindowTitle() const OVERRIDE; |
49 virtual int GetDialogButtons() const OVERRIDE; | 49 virtual int GetDialogButtons() const OVERRIDE; |
50 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; | 50 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; |
51 virtual void DeleteDelegate() OVERRIDE; | 51 virtual void DeleteDelegate() OVERRIDE; |
| 52 virtual bool UseChromeStyle() const OVERRIDE; |
| 53 virtual void GetChromeStyleMargins(int* vertical_edge, |
| 54 int* horizontal_edge) const OVERRIDE; |
52 virtual bool Cancel() OVERRIDE; | 55 virtual bool Cancel() OVERRIDE; |
53 virtual views::View* GetContentsView() OVERRIDE; | 56 virtual views::View* GetContentsView() OVERRIDE; |
54 | 57 |
55 // views::ButtonListener: | 58 // views::ButtonListener: |
56 virtual void ButtonPressed(views::Button* sender, | 59 virtual void ButtonPressed(views::Button* sender, |
57 const ui::Event& event) OVERRIDE; | 60 const ui::Event& event) OVERRIDE; |
58 | 61 |
59 // views::TabbedPaneListener: | 62 // views::TabbedPaneListener: |
60 virtual void TabSelectedAt(int index) OVERRIDE; | 63 virtual void TabSelectedAt(int index) OVERRIDE; |
61 | 64 |
62 // views::TreeViewController: | 65 // views::TreeViewController: |
63 virtual void OnTreeViewSelectionChanged(views::TreeView* tree_view) OVERRIDE; | 66 virtual void OnTreeViewSelectionChanged(views::TreeView* tree_view) OVERRIDE; |
64 | 67 |
65 // views::View: | 68 // views::View: |
66 virtual void ViewHierarchyChanged(bool is_add, | 69 virtual void ViewHierarchyChanged(bool is_add, |
67 views::View* parent, | 70 views::View* parent, |
68 views::View* child) OVERRIDE; | 71 views::View* child) OVERRIDE; |
69 | 72 |
70 private: | 73 private: |
| 74 struct LayoutParams; |
| 75 static const LayoutParams standard_layout_params; |
| 76 static const LayoutParams chrome_style_layout_params; |
| 77 |
71 virtual ~CollectedCookiesViews(); | 78 virtual ~CollectedCookiesViews(); |
72 | 79 |
73 void Init(); | 80 void Init(); |
74 | 81 |
75 views::View* CreateAllowedPane(); | 82 views::View* CreateAllowedPane(); |
76 | 83 |
77 views::View* CreateBlockedPane(); | 84 views::View* CreateBlockedPane(); |
78 | 85 |
| 86 views::TextButton* CreateTextButton(const string16& text); |
| 87 |
79 void EnableControls(); | 88 void EnableControls(); |
80 | 89 |
81 void ShowCookieInfo(); | 90 void ShowCookieInfo(); |
82 | 91 |
83 void AddContentException(views::TreeView* tree_view, ContentSetting setting); | 92 void AddContentException(views::TreeView* tree_view, ContentSetting setting); |
84 | 93 |
85 // content::NotificationObserver: | 94 // content::NotificationObserver: |
86 virtual void Observe(int type, | 95 virtual void Observe(int type, |
87 const content::NotificationSource& source, | 96 const content::NotificationSource& source, |
88 const content::NotificationDetails& details) OVERRIDE; | 97 const content::NotificationDetails& details) OVERRIDE; |
(...skipping 18 matching lines...) Expand all Loading... |
107 | 116 |
108 scoped_ptr<CookiesTreeModel> allowed_cookies_tree_model_; | 117 scoped_ptr<CookiesTreeModel> allowed_cookies_tree_model_; |
109 scoped_ptr<CookiesTreeModel> blocked_cookies_tree_model_; | 118 scoped_ptr<CookiesTreeModel> blocked_cookies_tree_model_; |
110 | 119 |
111 CookieInfoView* cookie_info_view_; | 120 CookieInfoView* cookie_info_view_; |
112 | 121 |
113 InfobarView* infobar_; | 122 InfobarView* infobar_; |
114 | 123 |
115 bool status_changed_; | 124 bool status_changed_; |
116 | 125 |
| 126 const LayoutParams& layout_params_; |
| 127 |
117 DISALLOW_COPY_AND_ASSIGN(CollectedCookiesViews); | 128 DISALLOW_COPY_AND_ASSIGN(CollectedCookiesViews); |
118 }; | 129 }; |
119 | 130 |
120 #endif // CHROME_BROWSER_UI_VIEWS_COLLECTED_COOKIES_VIEWS_H_ | 131 #endif // CHROME_BROWSER_UI_VIEWS_COLLECTED_COOKIES_VIEWS_H_ |
OLD | NEW |