OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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_WEBUI_OPTIONS_WEBSITE_SETTINGS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_WEBSITE_SETTINGS_HANDLER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/macros.h" |
| 12 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 13 #include "chrome/browser/ui/webui/options/options_ui.h" |
| 14 #include "content/public/browser/notification_observer.h" |
| 15 #include "content/public/browser/notification_registrar.h" |
| 16 |
| 17 namespace options { |
| 18 |
| 19 class WebsiteSettingsHandler : public OptionsPageUIHandler { |
| 20 public: |
| 21 WebsiteSettingsHandler(); |
| 22 virtual ~WebsiteSettingsHandler(); |
| 23 |
| 24 // OptionsPageUIHandler implementation. |
| 25 virtual void GetLocalizedValues( |
| 26 base::DictionaryValue* localized_strings) OVERRIDE; |
| 27 virtual void RegisterMessages() OVERRIDE; |
| 28 |
| 29 private: |
| 30 // Update the page with all origins for a given content setting. |
| 31 // |args| is the string name of the content setting. |
| 32 void HandleUpdateOrigins(const base::ListValue* args); |
| 33 |
| 34 // Update the page with all origins given a filter string. |
| 35 // |args| is the filter string. |
| 36 void HandleUpdateSearchResults(const base::ListValue* args); |
| 37 |
| 38 // Get all origins with Content Settings for the last given content setting, |
| 39 // filter them by |filter|, and update the page. |
| 40 void UpdateOrigins(const std::string& filter); |
| 41 |
| 42 ContentSettingsType last_setting_; |
| 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsHandler); |
| 45 }; |
| 46 |
| 47 } // namespace options |
| 48 |
| 49 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_WEBSITE_SETTINGS_HANDLER_H_ |
OLD | NEW |