OLD | NEW |
(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 "chrome/common/content_settings.h" |
| 13 #include "chrome/common/content_settings_types.h" |
| 14 #include "ui/gfx/native_widget_types.h" |
| 15 |
| 16 class GURL; |
| 17 class Profile; |
| 18 class TabContentsWrapper; |
| 19 |
| 20 namespace content { |
| 21 struct SSLStatus; |
| 22 } |
| 23 |
| 24 class CookieInfoList; |
| 25 class PermissionInfoList; |
| 26 |
| 27 // Interface for the Website Settings UI |
| 28 class WebsiteSettingsUI { |
| 29 public: |
| 30 |
| 31 // |
| 32 struct CookieInfo { |
| 33 std::string text; |
| 34 int allowed; |
| 35 int blocked; |
| 36 }; |
| 37 |
| 38 // |
| 39 struct PermissionInfo { |
| 40 ContentSettingsType type; |
| 41 ContentSetting setting; |
| 42 }; |
| 43 |
| 44 // Shows the website settings ui. |
| 45 static void Show(gfx::NativeWindow parent, |
| 46 Profile* profile, |
| 47 TabContentsWrapper* tab_contents_wrapper, |
| 48 const GURL& url, |
| 49 const content::SSLStatus& ssl, |
| 50 bool show_history); |
| 51 |
| 52 WebsiteSettingsUI() {} |
| 53 virtual ~WebsiteSettingsUI() {} |
| 54 |
| 55 // Sets site information. |
| 56 virtual void SetSiteInfo(const std::string site_info) = 0; |
| 57 |
| 58 // Sets cookie information. |
| 59 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) = 0; |
| 60 |
| 61 // Sets permision information. |
| 62 virtual void SetPermissionInfo( |
| 63 const PermissionInfoList& permission_info_list) = 0; |
| 64 |
| 65 private: |
| 66 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsUI); |
| 67 }; |
| 68 |
| 69 class CookieInfoList : public std::vector<WebsiteSettingsUI::CookieInfo> { |
| 70 }; |
| 71 |
| 72 class PermissionInfoList |
| 73 : public std::vector<WebsiteSettingsUI::PermissionInfo> { |
| 74 }; |
| 75 |
| 76 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_UI_H_ |
OLD | NEW |