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_OPTIONS2_HANDLER_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_HANDLER_OPTIONS_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_HANDLER_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_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/options2/options_ui.h" | 11 #include "chrome/browser/ui/webui/options2/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 //////////////////////////////////////////////////////////////////////////////// | 15 //////////////////////////////////////////////////////////////////////////////// |
16 // HandlerOptionsHandler | 16 // HandlerOptionsHandler |
17 | 17 |
18 // Listen for changes to protocol handlers (i.e. registerProtocolHandler()). | 18 // Listen for changes to protocol handlers (i.e. registerProtocolHandler()). |
19 // This get triggered whenever a user allows a specific website or application | 19 // This get triggered whenever a user allows a specific website or application |
20 // to handle clicks on a link with a specified protocol (i.e. mailto: -> Gmail). | 20 // to handle clicks on a link with a specified protocol (i.e. mailto: -> Gmail). |
21 | 21 |
22 namespace base { | 22 namespace base { |
23 class DictionaryValue; | 23 class DictionaryValue; |
24 } | 24 } |
25 | 25 |
26 namespace options2 { | 26 namespace options { |
27 | 27 |
28 class HandlerOptionsHandler : public OptionsPageUIHandler { | 28 class HandlerOptionsHandler : public OptionsPageUIHandler { |
29 public: | 29 public: |
30 HandlerOptionsHandler(); | 30 HandlerOptionsHandler(); |
31 virtual ~HandlerOptionsHandler(); | 31 virtual ~HandlerOptionsHandler(); |
32 | 32 |
33 // OptionsPageUIHandler implementation. | 33 // OptionsPageUIHandler implementation. |
34 virtual void GetLocalizedValues( | 34 virtual void GetLocalizedValues( |
35 base::DictionaryValue* localized_strings) OVERRIDE; | 35 base::DictionaryValue* localized_strings) OVERRIDE; |
36 virtual void InitializeHandler() OVERRIDE; | 36 virtual void InitializeHandler() OVERRIDE; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // |args| is a list of [protocol, url, title]. | 76 // |args| is a list of [protocol, url, title]. |
77 void RemoveIgnoredHandler(const ListValue* args); | 77 void RemoveIgnoredHandler(const ListValue* args); |
78 | 78 |
79 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); | 79 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); |
80 | 80 |
81 content::NotificationRegistrar notification_registrar_; | 81 content::NotificationRegistrar notification_registrar_; |
82 | 82 |
83 DISALLOW_COPY_AND_ASSIGN(HandlerOptionsHandler); | 83 DISALLOW_COPY_AND_ASSIGN(HandlerOptionsHandler); |
84 }; | 84 }; |
85 | 85 |
86 } // namespace options2 | 86 } // namespace options |
87 | 87 |
88 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_HANDLER_OPTIONS_HANDLER_H_ | 88 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_HANDLER_OPTIONS_HANDLER_H_ |
OLD | NEW |