OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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" |
(...skipping 12 matching lines...) Expand all Loading... |
23 namespace base { | 23 namespace base { |
24 class DictionaryValue; | 24 class DictionaryValue; |
25 } | 25 } |
26 | 26 |
27 namespace options { | 27 namespace options { |
28 | 28 |
29 class HandlerOptionsHandler : public OptionsPageUIHandler, | 29 class HandlerOptionsHandler : public OptionsPageUIHandler, |
30 public content::NotificationObserver { | 30 public content::NotificationObserver { |
31 public: | 31 public: |
32 HandlerOptionsHandler(); | 32 HandlerOptionsHandler(); |
33 virtual ~HandlerOptionsHandler(); | 33 ~HandlerOptionsHandler() override; |
34 | 34 |
35 // OptionsPageUIHandler implementation. | 35 // OptionsPageUIHandler implementation. |
36 virtual void GetLocalizedValues( | 36 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; |
37 base::DictionaryValue* localized_strings) override; | 37 void InitializeHandler() override; |
38 virtual void InitializeHandler() override; | 38 void InitializePage() override; |
39 virtual void InitializePage() override; | 39 void RegisterMessages() override; |
40 virtual void RegisterMessages() override; | |
41 | 40 |
42 // content::NotificationObserver implementation. | 41 // content::NotificationObserver implementation. |
43 virtual void Observe(int type, | 42 void Observe(int type, |
44 const content::NotificationSource& source, | 43 const content::NotificationSource& source, |
45 const content::NotificationDetails& details) override; | 44 const content::NotificationDetails& details) override; |
46 | 45 |
47 private: | 46 private: |
48 // Called when the user toggles whether custom handlers are enabled. | 47 // Called when the user toggles whether custom handlers are enabled. |
49 void SetHandlersEnabled(const base::ListValue* args); | 48 void SetHandlersEnabled(const base::ListValue* args); |
50 | 49 |
51 // Called when the user sets a new default handler for a protocol. | 50 // Called when the user sets a new default handler for a protocol. |
52 void SetDefault(const base::ListValue* args); | 51 void SetDefault(const base::ListValue* args); |
53 | 52 |
54 // Called when the user clears the default handler for a protocol. | 53 // Called when the user clears the default handler for a protocol. |
55 // |args| is the string name of the protocol to clear. | 54 // |args| is the string name of the protocol to clear. |
(...skipping 25 matching lines...) Expand all Loading... |
81 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); | 80 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); |
82 | 81 |
83 content::NotificationRegistrar notification_registrar_; | 82 content::NotificationRegistrar notification_registrar_; |
84 | 83 |
85 DISALLOW_COPY_AND_ASSIGN(HandlerOptionsHandler); | 84 DISALLOW_COPY_AND_ASSIGN(HandlerOptionsHandler); |
86 }; | 85 }; |
87 | 86 |
88 } // namespace options | 87 } // namespace options |
89 | 88 |
90 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_HANDLER_OPTIONS_HANDLER_H_ | 89 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_HANDLER_OPTIONS_HANDLER_H_ |
OLD | NEW |