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

Side by Side Diff: chrome/browser/ui/website_settings_ui.h

Issue 10440092: Remove any platform specific code from the chrome/browser/website_settings.* . (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort includes 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_UI_H_
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_UI_H_
7 #pragma once
8
9 #include <string>
10 #include <vector>
11
12 #include "base/string16.h"
13 #include "chrome/browser/website_settings.h"
14 #include "chrome/common/content_settings.h"
15 #include "chrome/common/content_settings_types.h"
16 #include "ui/gfx/native_widget_types.h"
17
18 class CookieInfoList;
19 class GURL;
20 class PermissionInfoList;
21 class Profile;
22 class TabContentsWrapper;
23 class WebsiteSettings;
24
25 namespace content {
26 struct SSLStatus;
27 }
28
29 // The class |WebsiteSettingsUI| specifies the platform independent
30 // interface of the website settings UI. The website settings UI displays
31 // information and controls for site specific data (local stored objects like
32 // cookies), site specific permissions (location, popup, plugin, etc.
33 // permissions) and site specific information (identity, connection status,
34 // etc.).
35 class WebsiteSettingsUI {
36 public:
37 // |CookieInfo| contains information about the cookies from a specific source.
38 // A source can for example be a specific origin or an entire domain.
39 struct CookieInfo {
40 CookieInfo();
41
42 // String describing the cookie source.
43 std::string cookie_source;
44 // The number of allowed cookies.
45 int allowed;
46 // The number of blocked cookies.
47 int blocked;
48 };
49
50 // |PermissionInfo| contains information about a single permission |type| for
51 // the current website.
52 struct PermissionInfo {
53 PermissionInfo();
54
55 // Site permission |type|.
56 ContentSettingsType type;
57 // The current value for the permission |type| (e.g. ALLOW or BLOCK).
58 ContentSetting setting;
59 // The global default settings for this permission |type|.
60 ContentSetting default_setting;
61 };
62
63 // |IdentityInfo| contains information about the site's identity and
64 // connection.
65 struct IdentityInfo {
66 IdentityInfo();
67
68 // The site's identity.
69 std::string site_identity;
70 // Status of the site's identity.
71 WebsiteSettings::SiteIdentityStatus identity_status;
72 // Textual description of the site's identity status that is displayed to
73 // the user.
74 std::string identity_status_description;
75 // The ID is the server certificate of a secure connection or 0.
76 int cert_id;
77 // Status of the site's connection.
78 WebsiteSettings::SiteConnectionStatus connection_status;
79 // Textual description of the site's connection status that is displayed to
80 // the user.
81 std::string connection_status_description;
82 };
83
84 virtual ~WebsiteSettingsUI();
85
86 // Sets the |presenter| of the WebsiteSettingsUI that is responsible for
87 // setting the data to display in the UI.
88 virtual void SetPresenter(WebsiteSettings* presenter) = 0;
89
90 // Sets cookie information.
91 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) = 0;
92
93 // Sets permision information.
94 virtual void SetPermissionInfo(
95 const PermissionInfoList& permission_info_list) = 0;
96
97 // Sets site identity information.
98 virtual void SetIdentityInfo(const IdentityInfo& identity_info) = 0;
99
100 // Sets the first visited data. |first_visit| can be an empty string.
101 virtual void SetFirstVisit(const string16& first_visit) = 0;
102 };
103
104 class CookieInfoList : public std::vector<WebsiteSettingsUI::CookieInfo> {
105 };
106
107 class PermissionInfoList
108 : public std::vector<WebsiteSettingsUI::PermissionInfo> {
109 };
110
111 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/website_settings/website_settings_unittest.cc ('k') | chrome/browser/ui/website_settings_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698