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.h" | 10 #include "chrome/browser/custom_handlers/protocol_handler.h" |
11 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 11 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
12 #include "chrome/browser/ui/webui/options/options_ui.h" | 12 #include "chrome/browser/ui/webui/options/options_ui.h" |
13 #include "content/common/notification_registrar.h" | 13 #include "content/common/notification_registrar.h" |
14 | 14 |
15 class DictionaryValue; | 15 class DictionaryValue; |
16 | 16 |
17 class HandlerOptionsHandler : public OptionsPageUIHandler { | 17 class HandlerOptionsHandler : public OptionsPageUIHandler { |
18 public: | 18 public: |
19 HandlerOptionsHandler(); | 19 HandlerOptionsHandler(); |
20 virtual ~HandlerOptionsHandler(); | 20 virtual ~HandlerOptionsHandler(); |
21 | 21 |
22 // OptionsPageUIHandler implementation. | 22 // OptionsPageUIHandler implementation. |
23 virtual void GetLocalizedValues(DictionaryValue* localized_strings); | 23 virtual void GetLocalizedValues(DictionaryValue* localized_strings); |
24 virtual void Initialize(); | 24 virtual void Initialize(); |
25 virtual void RegisterMessages(); | 25 virtual void RegisterMessages(); |
26 | 26 |
27 // NotificationObserver implementation. | 27 // NotificationObserver implementation. |
28 virtual void Observe(NotificationType type, | 28 virtual void Observe(int type, |
29 const NotificationSource& source, | 29 const NotificationSource& source, |
30 const NotificationDetails& details); | 30 const NotificationDetails& details); |
31 | 31 |
32 private: | 32 private: |
33 // Called when the user toggles whether custom handlers are enabled. | 33 // Called when the user toggles whether custom handlers are enabled. |
34 void SetHandlersEnabled(const ListValue* args); | 34 void SetHandlersEnabled(const ListValue* args); |
35 | 35 |
36 // Called when the user sets a new default handler for a protocol. | 36 // Called when the user sets a new default handler for a protocol. |
37 void SetDefault(const ListValue* args); | 37 void SetDefault(const ListValue* args); |
38 | 38 |
(...skipping 17 matching lines...) Expand all Loading... |
56 void RemoveHandler(const ListValue* args); | 56 void RemoveHandler(const ListValue* args); |
57 | 57 |
58 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); | 58 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); |
59 | 59 |
60 NotificationRegistrar notification_registrar_; | 60 NotificationRegistrar notification_registrar_; |
61 | 61 |
62 DISALLOW_COPY_AND_ASSIGN(HandlerOptionsHandler); | 62 DISALLOW_COPY_AND_ASSIGN(HandlerOptionsHandler); |
63 }; | 63 }; |
64 | 64 |
65 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_HANDLER_OPTIONS_HANDLER_H_ | 65 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_HANDLER_OPTIONS_HANDLER_H_ |
OLD | NEW |