OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WEBUI_OPTIONS_HANDLER_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_HANDLER_OPTIONS_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_HANDLER_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_HANDLER_OPTIONS_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 10 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
11 #include "chrome/browser/ui/webui/options/options_ui.h" | 11 #include "chrome/browser/ui/webui/options/options_ui.h" |
12 #include "chrome/common/custom_handlers/protocol_handler.h" | 12 #include "chrome/common/custom_handlers/protocol_handler.h" |
13 #include "content/public/browser/notification_registrar.h" | 13 #include "content/public/browser/notification_registrar.h" |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 class DictionaryValue; | 16 class DictionaryValue; |
17 } | 17 } |
18 | 18 |
19 class HandlerOptionsHandler : public OptionsPageUIHandler { | 19 class HandlerOptionsHandler : public OptionsPageUIHandler { |
20 public: | 20 public: |
21 HandlerOptionsHandler(); | 21 HandlerOptionsHandler(); |
22 virtual ~HandlerOptionsHandler(); | 22 virtual ~HandlerOptionsHandler(); |
23 | 23 |
24 // OptionsPageUIHandler implementation. | 24 // OptionsPageUIHandler implementation. |
25 virtual void GetLocalizedValues( | 25 virtual void GetLocalizedValues( |
26 base::DictionaryValue* localized_strings) OVERRIDE; | 26 base::DictionaryValue* localized_strings) OVERRIDE; |
27 virtual void Initialize() OVERRIDE; | 27 virtual void InitializeHandler() OVERRIDE; |
28 virtual void RegisterMessages() OVERRIDE; | 28 virtual void RegisterMessages() OVERRIDE; |
29 | 29 |
30 // content::NotificationObserver implementation. | 30 // content::NotificationObserver implementation. |
31 virtual void Observe(int type, | 31 virtual void Observe(int type, |
32 const content::NotificationSource& source, | 32 const content::NotificationSource& source, |
33 const content::NotificationDetails& details) OVERRIDE; | 33 const content::NotificationDetails& details) OVERRIDE; |
34 | 34 |
35 private: | 35 private: |
36 // Called when the user toggles whether custom handlers are enabled. | 36 // Called when the user toggles whether custom handlers are enabled. |
37 void SetHandlersEnabled(const ListValue* args); | 37 void SetHandlersEnabled(const ListValue* args); |
(...skipping 29 matching lines...) Expand all Loading... |
67 void RemoveIgnoredHandler(const ListValue* args); | 67 void RemoveIgnoredHandler(const ListValue* args); |
68 | 68 |
69 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); | 69 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); |
70 | 70 |
71 content::NotificationRegistrar notification_registrar_; | 71 content::NotificationRegistrar notification_registrar_; |
72 | 72 |
73 DISALLOW_COPY_AND_ASSIGN(HandlerOptionsHandler); | 73 DISALLOW_COPY_AND_ASSIGN(HandlerOptionsHandler); |
74 }; | 74 }; |
75 | 75 |
76 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_HANDLER_OPTIONS_HANDLER_H_ | 76 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_HANDLER_OPTIONS_HANDLER_H_ |
OLD | NEW |