| 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 #include "chrome/browser/ui/webui/options/handler_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/handler_options_handler.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 | 26 |
| 27 HandlerOptionsHandler::~HandlerOptionsHandler() { | 27 HandlerOptionsHandler::~HandlerOptionsHandler() { |
| 28 } | 28 } |
| 29 | 29 |
| 30 void HandlerOptionsHandler::GetLocalizedValues( | 30 void HandlerOptionsHandler::GetLocalizedValues( |
| 31 base::DictionaryValue* localized_strings) { | 31 base::DictionaryValue* localized_strings) { |
| 32 DCHECK(localized_strings); | 32 DCHECK(localized_strings); |
| 33 | 33 |
| 34 static OptionsStringResource resources[] = { | 34 static OptionsStringResource resources[] = { |
| 35 { "handlers_tab_label", IDS_HANDLERS_TAB_LABEL }, | 35 { "handlersTabLabel", IDS_HANDLERS_TAB_LABEL }, |
| 36 { "handlers_allow", IDS_HANDLERS_ALLOW_RADIO }, | 36 { "handlersAllow", IDS_HANDLERS_ALLOW_RADIO }, |
| 37 { "handlers_block", IDS_HANDLERS_DONOTALLOW_RADIO }, | 37 { "handlersBlock", IDS_HANDLERS_DONOTALLOW_RADIO }, |
| 38 { "handlers_type_column_header", IDS_HANDLERS_TYPE_COLUMN_HEADER }, | 38 { "handlersTypeColumnHeader", IDS_HANDLERS_TYPE_COLUMN_HEADER }, |
| 39 { "handlers_site_column_header", IDS_HANDLERS_SITE_COLUMN_HEADER }, | 39 { "handlersSiteColumnHeader", IDS_HANDLERS_SITE_COLUMN_HEADER }, |
| 40 { "handlers_remove_link", IDS_HANDLERS_REMOVE_HANDLER_LINK }, | 40 { "handlersRemoveLink", IDS_HANDLERS_REMOVE_HANDLER_LINK }, |
| 41 { "handlers_none_handler", IDS_HANDLERS_NONE_HANDLER }, | 41 { "handlersNoneHandler", IDS_HANDLERS_NONE_HANDLER }, |
| 42 { "handlers_active_heading", IDS_HANDLERS_ACTIVE_HEADING }, | 42 { "handlersActiveHeading", IDS_HANDLERS_ACTIVE_HEADING }, |
| 43 { "handlers_ignored_heading", IDS_HANDLERS_IGNORED_HEADING }, | 43 { "handlersIgnoredHeading", IDS_HANDLERS_IGNORED_HEADING }, |
| 44 }; | 44 }; |
| 45 RegisterTitle(localized_strings, "handlersPage", | 45 RegisterTitle(localized_strings, "handlersPage", |
| 46 IDS_HANDLER_OPTIONS_WINDOW_TITLE); | 46 IDS_HANDLER_OPTIONS_WINDOW_TITLE); |
| 47 RegisterStrings(localized_strings, resources, arraysize(resources)); | 47 RegisterStrings(localized_strings, resources, arraysize(resources)); |
| 48 | 48 |
| 49 localized_strings->SetString("handlers_learn_more_url", | 49 localized_strings->SetString("handlersLearnMoreUrl", |
| 50 chrome::kLearnMoreRegisterProtocolHandlerURL); | 50 chrome::kLearnMoreRegisterProtocolHandlerURL); |
| 51 } | 51 } |
| 52 | 52 |
| 53 void HandlerOptionsHandler::InitializeHandler() { | 53 void HandlerOptionsHandler::InitializeHandler() { |
| 54 notification_registrar_.Add( | 54 notification_registrar_.Add( |
| 55 this, chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED, | 55 this, chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED, |
| 56 content::Source<Profile>(Profile::FromWebUI(web_ui()))); | 56 content::Source<Profile>(Profile::FromWebUI(web_ui()))); |
| 57 } | 57 } |
| 58 | 58 |
| 59 void HandlerOptionsHandler::InitializePage() { | 59 void HandlerOptionsHandler::InitializePage() { |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 int type, | 210 int type, |
| 211 const content::NotificationSource& source, | 211 const content::NotificationSource& source, |
| 212 const content::NotificationDetails& details) { | 212 const content::NotificationDetails& details) { |
| 213 if (type == chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED) | 213 if (type == chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED) |
| 214 UpdateHandlerList(); | 214 UpdateHandlerList(); |
| 215 else | 215 else |
| 216 NOTREACHED(); | 216 NOTREACHED(); |
| 217 } | 217 } |
| 218 | 218 |
| 219 } // namespace options | 219 } // namespace options |
| OLD | NEW |