Chromium Code Reviews| 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_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 } | 27 } |
| 28 | 28 |
| 29 // The class |WebsiteSettingsUI| specifies the platform independent | 29 // The class |WebsiteSettingsUI| specifies the platform independent |
| 30 // interface of the website settings UI. The website settings UI displays | 30 // interface of the website settings UI. The website settings UI displays |
| 31 // information and controls for site specific data (local stored objects like | 31 // information and controls for site specific data (local stored objects like |
| 32 // cookies), site specific permissions (location, popup, plugin, etc. | 32 // cookies), site specific permissions (location, popup, plugin, etc. |
| 33 // permissions) and site specific information (identity, connection status, | 33 // permissions) and site specific information (identity, connection status, |
| 34 // etc.). | 34 // etc.). |
| 35 class WebsiteSettingsUI { | 35 class WebsiteSettingsUI { |
| 36 public: | 36 public: |
| 37 // The Website Settings UI contains several tabs. Each tab is assiciated with | |
| 38 // a unique tab id. The enum |TabId| contains all the ids for the tabs. | |
| 39 enum TabId { | |
| 40 TAB_ID_PERMISSIONS, | |
|
msw
2012/08/23 01:01:35
nit: explicitly specify TAB_ID_PERMISSIONS = 0 (es
markusheintz_
2012/08/23 19:46:21
Done.
| |
| 41 TAB_ID_CONNECTION, | |
| 42 NUM_TAB_IDS | |
|
msw
2012/08/23 01:01:35
nit: always use trailing commas in enum decls.
markusheintz_
2012/08/23 19:46:21
Done
| |
| 43 }; | |
| 44 | |
| 37 // |CookieInfo| contains information about the cookies from a specific source. | 45 // |CookieInfo| contains information about the cookies from a specific source. |
| 38 // A source can for example be a specific origin or an entire domain. | 46 // A source can for example be a specific origin or an entire domain. |
| 39 struct CookieInfo { | 47 struct CookieInfo { |
| 40 CookieInfo(); | 48 CookieInfo(); |
| 41 | 49 |
| 42 // String describing the cookie source. | 50 // String describing the cookie source. |
| 43 std::string cookie_source; | 51 std::string cookie_source; |
| 44 // The number of allowed cookies. | 52 // The number of allowed cookies. |
| 45 int allowed; | 53 int allowed; |
| 46 // The number of blocked cookies. | 54 // The number of blocked cookies. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 126 | 134 |
| 127 // Sets permision information. | 135 // Sets permision information. |
| 128 virtual void SetPermissionInfo( | 136 virtual void SetPermissionInfo( |
| 129 const PermissionInfoList& permission_info_list) = 0; | 137 const PermissionInfoList& permission_info_list) = 0; |
| 130 | 138 |
| 131 // Sets site identity information. | 139 // Sets site identity information. |
| 132 virtual void SetIdentityInfo(const IdentityInfo& identity_info) = 0; | 140 virtual void SetIdentityInfo(const IdentityInfo& identity_info) = 0; |
| 133 | 141 |
| 134 // Sets the first visited data. |first_visit| can be an empty string. | 142 // Sets the first visited data. |first_visit| can be an empty string. |
| 135 virtual void SetFirstVisit(const string16& first_visit) = 0; | 143 virtual void SetFirstVisit(const string16& first_visit) = 0; |
| 144 | |
| 145 // Selects the tab with the given |tab_id|. | |
| 146 virtual void SetSelectedTab(TabId tab_id) = 0; | |
| 136 }; | 147 }; |
| 137 | 148 |
| 138 typedef WebsiteSettingsUI::CookieInfoList CookieInfoList; | 149 typedef WebsiteSettingsUI::CookieInfoList CookieInfoList; |
| 139 typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList; | 150 typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList; |
| 140 | 151 |
| 141 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ | 152 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ |
| OLD | NEW |