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

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

Issue 7794023: Convert chrome://extensions to a settings page within the options pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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) 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 #include "chrome/browser/ui/webui/options/options_ui.h" 5 #include "chrome/browser/ui/webui/options/options_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/memory/singleton.h" 12 #include "base/memory/singleton.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "base/string_piece.h" 14 #include "base/string_piece.h"
15 #include "base/string_util.h" 15 #include "base/string_util.h"
16 #include "base/threading/thread.h" 16 #include "base/threading/thread.h"
17 #include "base/time.h" 17 #include "base/time.h"
18 #include "base/values.h" 18 #include "base/values.h"
19 #include "chrome/browser/browser_about_handler.h" 19 #include "chrome/browser/browser_about_handler.h"
20 #include "chrome/browser/profiles/profile.h" 20 #include "chrome/browser/profiles/profile.h"
21 #include "chrome/browser/ui/webui/options/advanced_options_handler.h" 21 #include "chrome/browser/ui/webui/options/advanced_options_handler.h"
22 #include "chrome/browser/ui/webui/options/autofill_options_handler.h" 22 #include "chrome/browser/ui/webui/options/autofill_options_handler.h"
23 #include "chrome/browser/ui/webui/options/browser_options_handler.h" 23 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
24 #include "chrome/browser/ui/webui/options/clear_browser_data_handler.h" 24 #include "chrome/browser/ui/webui/options/clear_browser_data_handler.h"
25 #include "chrome/browser/ui/webui/options/content_settings_handler.h" 25 #include "chrome/browser/ui/webui/options/content_settings_handler.h"
26 #include "chrome/browser/ui/webui/options/handler_options_handler.h" 26 #include "chrome/browser/ui/webui/options/handler_options_handler.h"
27 #include "chrome/browser/ui/webui/options/cookies_view_handler.h" 27 #include "chrome/browser/ui/webui/options/cookies_view_handler.h"
28 #include "chrome/browser/ui/webui/options/core_options_handler.h" 28 #include "chrome/browser/ui/webui/options/core_options_handler.h"
29 #include "chrome/browser/ui/webui/options/extension_settings_handler.h"
29 #include "chrome/browser/ui/webui/options/font_settings_handler.h" 30 #include "chrome/browser/ui/webui/options/font_settings_handler.h"
30 #include "chrome/browser/ui/webui/options/import_data_handler.h" 31 #include "chrome/browser/ui/webui/options/import_data_handler.h"
31 #include "chrome/browser/ui/webui/options/intents_settings_handler.h" 32 #include "chrome/browser/ui/webui/options/intents_settings_handler.h"
32 #include "chrome/browser/ui/webui/options/language_options_handler.h" 33 #include "chrome/browser/ui/webui/options/language_options_handler.h"
33 #include "chrome/browser/ui/webui/options/manage_profile_handler.h" 34 #include "chrome/browser/ui/webui/options/manage_profile_handler.h"
34 #include "chrome/browser/ui/webui/options/options_sync_setup_handler.h" 35 #include "chrome/browser/ui/webui/options/options_sync_setup_handler.h"
36 #include "chrome/browser/ui/webui/options/pack_extension_handler.h"
35 #include "chrome/browser/ui/webui/options/password_manager_handler.h" 37 #include "chrome/browser/ui/webui/options/password_manager_handler.h"
36 #include "chrome/browser/ui/webui/options/personal_options_handler.h" 38 #include "chrome/browser/ui/webui/options/personal_options_handler.h"
37 #include "chrome/browser/ui/webui/options/search_engine_manager_handler.h" 39 #include "chrome/browser/ui/webui/options/search_engine_manager_handler.h"
38 #include "chrome/browser/ui/webui/options/stop_syncing_handler.h" 40 #include "chrome/browser/ui/webui/options/stop_syncing_handler.h"
39 #include "chrome/browser/ui/webui/theme_source.h" 41 #include "chrome/browser/ui/webui/theme_source.h"
40 #include "chrome/common/jstemplate_builder.h" 42 #include "chrome/common/jstemplate_builder.h"
41 #include "chrome/common/time_format.h" 43 #include "chrome/common/time_format.h"
42 #include "chrome/common/url_constants.h" 44 #include "chrome/common/url_constants.h"
43 #include "content/browser/browser_thread.h" 45 #include "content/browser/browser_thread.h"
44 #include "content/browser/renderer_host/render_view_host.h" 46 #include "content/browser/renderer_host/render_view_host.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 #endif 205 #endif
204 core_handler->set_handlers_host(this); 206 core_handler->set_handlers_host(this);
205 AddOptionsPageUIHandler(localized_strings, core_handler); 207 AddOptionsPageUIHandler(localized_strings, core_handler);
206 208
207 AddOptionsPageUIHandler(localized_strings, new AdvancedOptionsHandler()); 209 AddOptionsPageUIHandler(localized_strings, new AdvancedOptionsHandler());
208 AddOptionsPageUIHandler(localized_strings, new AutofillOptionsHandler()); 210 AddOptionsPageUIHandler(localized_strings, new AutofillOptionsHandler());
209 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler()); 211 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler());
210 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); 212 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler());
211 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); 213 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler());
212 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); 214 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler());
215 AddOptionsPageUIHandler(localized_strings, new ExtensionSettingsHandler());
213 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); 216 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler());
214 AddOptionsPageUIHandler(localized_strings, new IntentsSettingsHandler()); 217 AddOptionsPageUIHandler(localized_strings, new IntentsSettingsHandler());
215 #if defined(OS_CHROMEOS) 218 #if defined(OS_CHROMEOS)
216 AddOptionsPageUIHandler(localized_strings, 219 AddOptionsPageUIHandler(localized_strings,
217 new chromeos::CrosLanguageOptionsHandler()); 220 new chromeos::CrosLanguageOptionsHandler());
218 #else 221 #else
219 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); 222 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler());
220 #endif 223 #endif
221 AddOptionsPageUIHandler(localized_strings, new ManageProfileHandler()); 224 AddOptionsPageUIHandler(localized_strings, new ManageProfileHandler());
225 AddOptionsPageUIHandler(localized_strings, new PackExtensionHandler());
222 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); 226 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler());
223 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); 227 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler());
224 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); 228 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler());
225 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); 229 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler());
226 AddOptionsPageUIHandler(localized_strings, new StopSyncingHandler()); 230 AddOptionsPageUIHandler(localized_strings, new StopSyncingHandler());
227 AddOptionsPageUIHandler(localized_strings, new OptionsSyncSetupHandler()); 231 AddOptionsPageUIHandler(localized_strings, new OptionsSyncSetupHandler());
228 #if defined(OS_CHROMEOS) 232 #if defined(OS_CHROMEOS)
229 AddOptionsPageUIHandler(localized_strings, 233 AddOptionsPageUIHandler(localized_strings,
230 new chromeos::AboutPageHandler()); 234 new chromeos::AboutPageHandler());
231 AddOptionsPageUIHandler(localized_strings, 235 AddOptionsPageUIHandler(localized_strings,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 OptionsPageUIHandler* handler_raw) { 345 OptionsPageUIHandler* handler_raw) {
342 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); 346 scoped_ptr<OptionsPageUIHandler> handler(handler_raw);
343 DCHECK(handler.get()); 347 DCHECK(handler.get());
344 // Add only if handler's service is enabled. 348 // Add only if handler's service is enabled.
345 if (handler->IsEnabled()) { 349 if (handler->IsEnabled()) {
346 handler->GetLocalizedValues(localized_strings); 350 handler->GetLocalizedValues(localized_strings);
347 // Add handler to the list and also pass the ownership. 351 // Add handler to the list and also pass the ownership.
348 AddMessageHandler(handler.release()->Attach(this)); 352 AddMessageHandler(handler.release()->Attach(this));
349 } 353 }
350 } 354 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698