Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Side by Side Diff: chrome/browser/ui/webui/options/handler_options_handler.cc

Issue 9693032: [uber page] Split up initialization of handlers from initialization of webui pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright bumps Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
(...skipping 24 matching lines...) Expand all
36 { "handlers_remove_link", IDS_HANDLERS_REMOVE_HANDLER_LINK }, 36 { "handlers_remove_link", IDS_HANDLERS_REMOVE_HANDLER_LINK },
37 { "handlers_none_handler", IDS_HANDLERS_NONE_HANDLER }, 37 { "handlers_none_handler", IDS_HANDLERS_NONE_HANDLER },
38 { "handlers_active_heading", IDS_HANDLERS_ACTIVE_HEADING }, 38 { "handlers_active_heading", IDS_HANDLERS_ACTIVE_HEADING },
39 { "handlers_ignored_heading", IDS_HANDLERS_IGNORED_HEADING }, 39 { "handlers_ignored_heading", IDS_HANDLERS_IGNORED_HEADING },
40 }; 40 };
41 RegisterTitle(localized_strings, "handlersPage", 41 RegisterTitle(localized_strings, "handlersPage",
42 IDS_HANDLER_OPTIONS_WINDOW_TITLE); 42 IDS_HANDLER_OPTIONS_WINDOW_TITLE);
43 RegisterStrings(localized_strings, resources, arraysize(resources)); 43 RegisterStrings(localized_strings, resources, arraysize(resources));
44 } 44 }
45 45
46 void HandlerOptionsHandler::Initialize() { 46 void HandlerOptionsHandler::InitializeHandler() {
47 UpdateHandlerList(); 47 UpdateHandlerList();
48 notification_registrar_.Add( 48 notification_registrar_.Add(
49 this, chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED, 49 this, chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED,
50 content::Source<Profile>(Profile::FromWebUI(web_ui()))); 50 content::Source<Profile>(Profile::FromWebUI(web_ui())));
51 } 51 }
52 52
53 void HandlerOptionsHandler::RegisterMessages() { 53 void HandlerOptionsHandler::RegisterMessages() {
54 web_ui()->RegisterMessageCallback("clearDefault", 54 web_ui()->RegisterMessageCallback("clearDefault",
55 base::Bind(&HandlerOptionsHandler::ClearDefault, 55 base::Bind(&HandlerOptionsHandler::ClearDefault,
56 base::Unretained(this))); 56 base::Unretained(this)));
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 void HandlerOptionsHandler::Observe( 197 void HandlerOptionsHandler::Observe(
198 int type, 198 int type,
199 const content::NotificationSource& source, 199 const content::NotificationSource& source,
200 const content::NotificationDetails& details) { 200 const content::NotificationDetails& details) {
201 if (type == chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED) 201 if (type == chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED)
202 UpdateHandlerList(); 202 UpdateHandlerList();
203 else 203 else
204 NOTREACHED(); 204 NOTREACHED();
205 } 205 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/handler_options_handler.h ('k') | chrome/browser/ui/webui/options/import_data_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698