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

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

Issue 10534138: Add icons to the views Website Settings UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 8 years, 6 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 | Annotate | Revision Log
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_POPUP_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_POPUP_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_POPUP_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_POPUP_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 10 matching lines...) Expand all
21 class PopupHeader; 21 class PopupHeader;
22 class Profile; 22 class Profile;
23 class TabContents; 23 class TabContents;
24 24
25 namespace content { 25 namespace content {
26 struct SSLStatus; 26 struct SSLStatus;
27 } 27 }
28 28
29 namespace views { 29 namespace views {
30 class Combobox; 30 class Combobox;
31 class ImageView;
31 class Link; 32 class Link;
32 class Label; 33 class Label;
33 class TabbedPane; 34 class TabbedPane;
34 class View; 35 class View;
35 } 36 }
36 37
37 namespace website_settings { 38 namespace website_settings {
38 class PermissionComboboxModel; 39 class PermissionComboboxModel;
39 } 40 }
40 41
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // LinkListener implementation. 81 // LinkListener implementation.
81 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; 82 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
82 83
83 // views::TabbedPaneListener implementations. 84 // views::TabbedPaneListener implementations.
84 virtual void TabSelectedAt(int index) OVERRIDE; 85 virtual void TabSelectedAt(int index) OVERRIDE;
85 86
86 // views::ButtonListener implementation. 87 // views::ButtonListener implementation.
87 virtual void ButtonPressed(views::Button* button, 88 virtual void ButtonPressed(views::Button* button,
88 const views::Event& event) OVERRIDE; 89 const views::Event& event) OVERRIDE;
89 90
91 // Creates the contents of the "Permissions" tab. The ownership of the
92 // returned view is transferred to the caller.
93 views::View* CreatePermissionsTab() WARN_UNUSED_RESULT;
94
95 // Creates the contents of the "Identity" tab. The ownership of the returned
96 // view is transferred to the caller.
97 views::View* CreateIdentityTab() WARN_UNUSED_RESULT;
98
90 // Each tab contains several sections with a |headline| followed by the 99 // Each tab contains several sections with a |headline| followed by the
91 // section |contents| and an optional |link|. This method creates a section 100 // section |contents| and an optional |link|. This method creates a section
92 // for the given |headline|, |contents| and |link|. |link| can be NULL if the 101 // for the given |headline|, |contents| and |link|. |link| can be NULL if the
93 // section should not contain a link. 102 // section should not contain a link.
94 views::View* CreateSection(const string16& headline, 103 views::View* CreateSection(const string16& headline,
95 views::View* contents, 104 views::View* contents,
96 views::Link* link) WARN_UNUSED_RESULT; 105 views::Link* link) WARN_UNUSED_RESULT;
97 106
107 // Resets the |content_container| and adds the passed |icon| and |text| to
108 // it. All existing child views of the |content_container| are cleared and
109 // destroyed. The |icon| and |text| are added to the |content_container|
110 // using a two column layout that is common to all sections on the identity
111 // tab.
112 void ResetContentContainer(views::View* content_container,
113 gfx::Image* icon,
114 string16 text);
115
98 // Creates a single row for the "Permissions" section from the "Permissions" 116 // Creates a single row for the "Permissions" section from the "Permissions"
99 // tab. Such a row contains a |permissions_label| with the name of the 117 // tab. Such a row contains a |permissions_label| with the name of the
100 // permission and a |combobox| that allows to select setting for the given 118 // permission and a |combobox| that allows to select setting for the given
101 // permission. The ownership of the returned view is transferred to the 119 // permission. The ownership of the returned view is transferred to the
102 // caller. 120 // caller.
103 views::View* CreatePermissionRow( 121 views::View* CreatePermissionRow(
122 views::ImageView* icon,
104 views::Label* permission_label, 123 views::Label* permission_label,
105 views::Combobox* combobox) WARN_UNUSED_RESULT; 124 views::Combobox* combobox) WARN_UNUSED_RESULT;
106 125
107 // Creates the contents of the "Permissions" tab. The ownership of the
108 // returned view is transferred to the caller.
109 views::View* CreatePermissionsTab() WARN_UNUSED_RESULT;
110
111 // Creates the contents of the "Identity" tab. The ownership of the returned
112 // view is transferred to the caller.
113 views::View* CreateIdentityTab() WARN_UNUSED_RESULT;
114
115 // Creates a multiline text label that is initialized with the given |text|.
116 // The ownership of the returned label is transferred to the caller.
117 views::Label* CreateTextLabel(const string16& text) WARN_UNUSED_RESULT;
118
119 // The tab contents of the current tab. The popup can't live longer than a 126 // The tab contents of the current tab. The popup can't live longer than a
120 // tab. 127 // tab.
121 TabContents* tab_contents_; // Weak pointer. 128 TabContents* tab_contents_; // Weak pointer.
122 129
123 // The presenter that controlls the Website Settings UI. 130 // The presenter that controlls the Website Settings UI.
124 scoped_ptr<WebsiteSettings> presenter_; 131 scoped_ptr<WebsiteSettings> presenter_;
125 132
126 // The view |PopupHeader| is owned by the popup contents view. 133 // The view |PopupHeader| is owned by the popup contents view.
127 PopupHeader* header_; 134 PopupHeader* header_;
128 135
129 // The |TabbedPane| that contains the tabs of the Website Settings UI. 136 // The |TabbedPane| that contains the tabs of the Website Settings UI.
130 views::TabbedPane* tabbed_pane_; 137 views::TabbedPane* tabbed_pane_;
131 138
132 // The view that contains the contents of the "Cookies and Site data" section 139 // The view that contains the contents of the "Cookies and Site data" section
133 // from the "Permissions" tab. 140 // from the "Permissions" tab.
134 views::View* site_data_content_; 141 views::View* site_data_content_;
135 // The link that opend the "Cookies" dialog. 142 // The link that opend the "Cookies" dialog.
136 views::Link* cookie_dialog_link_; 143 views::Link* cookie_dialog_link_;
137 // The view that contains the contents of the "Permissions" section from the 144 // The view that contains the contents of the "Permissions" section from the
138 // "Permissions" tab. 145 // "Permissions" tab.
139 views::View* permissions_content_; 146 views::View* permissions_content_;
140 147
141 views::Label* identity_info_text_; 148 views::View* identity_info_content_;
142 views::Label* connection_info_text_; 149 views::View* connection_info_content_;
143 views::Label* page_info_text_; 150 views::View* page_info_content_;
144 151
145 // A |ComboboxModel| is not owned by a |Combobox|. Therefor the popup owns 152 // A |ComboboxModel| is not owned by a |Combobox|. Therefor the popup owns
146 // all |PermissionComboboxModels| and deletes them when it is destroyed. 153 // all |PermissionComboboxModels| and deletes them when it is destroyed.
147 ScopedVector<website_settings::PermissionComboboxModel> combobox_models_; 154 ScopedVector<website_settings::PermissionComboboxModel> combobox_models_;
148 155
149 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); 156 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView);
150 }; 157 };
151 158
152 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_POPUP_VIEW_H_ 159 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_POPUP_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698