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/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/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "chrome/browser/ui/webui/options/language_dictionary_overlay_handler.h" | 40 #include "chrome/browser/ui/webui/options/language_dictionary_overlay_handler.h" |
41 #include "chrome/browser/ui/webui/options/language_options_handler.h" | 41 #include "chrome/browser/ui/webui/options/language_options_handler.h" |
42 #include "chrome/browser/ui/webui/options/manage_profile_handler.h" | 42 #include "chrome/browser/ui/webui/options/manage_profile_handler.h" |
43 #include "chrome/browser/ui/webui/options/media_devices_selection_handler.h" | 43 #include "chrome/browser/ui/webui/options/media_devices_selection_handler.h" |
44 #include "chrome/browser/ui/webui/options/password_manager_handler.h" | 44 #include "chrome/browser/ui/webui/options/password_manager_handler.h" |
45 #include "chrome/browser/ui/webui/options/reset_profile_settings_handler.h" | 45 #include "chrome/browser/ui/webui/options/reset_profile_settings_handler.h" |
46 #include "chrome/browser/ui/webui/options/search_engine_manager_handler.h" | 46 #include "chrome/browser/ui/webui/options/search_engine_manager_handler.h" |
47 #include "chrome/browser/ui/webui/options/startup_pages_handler.h" | 47 #include "chrome/browser/ui/webui/options/startup_pages_handler.h" |
48 #include "chrome/browser/ui/webui/options/sync_setup_handler.h" | 48 #include "chrome/browser/ui/webui/options/sync_setup_handler.h" |
49 #include "chrome/browser/ui/webui/theme_source.h" | 49 #include "chrome/browser/ui/webui/theme_source.h" |
50 #include "chrome/common/features.h" | |
51 #include "chrome/common/url_constants.h" | 50 #include "chrome/common/url_constants.h" |
52 #include "chrome/grit/generated_resources.h" | 51 #include "chrome/grit/generated_resources.h" |
53 #include "chrome/grit/locale_settings.h" | 52 #include "chrome/grit/locale_settings.h" |
54 #include "components/omnibox/browser/autocomplete_match.h" | 53 #include "components/omnibox/browser/autocomplete_match.h" |
55 #include "components/omnibox/browser/autocomplete_result.h" | 54 #include "components/omnibox/browser/autocomplete_result.h" |
56 #include "content/public/browser/notification_types.h" | 55 #include "content/public/browser/notification_types.h" |
57 #include "content/public/browser/render_frame_host.h" | 56 #include "content/public/browser/render_frame_host.h" |
58 #include "content/public/browser/url_data_source.h" | 57 #include "content/public/browser/url_data_source.h" |
59 #include "content/public/browser/web_contents.h" | 58 #include "content/public/browser/web_contents.h" |
60 #include "content/public/browser/web_contents_delegate.h" | 59 #include "content/public/browser/web_contents_delegate.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 #include "chrome/browser/ui/webui/options/chromeos/power_handler.h" | 93 #include "chrome/browser/ui/webui/options/chromeos/power_handler.h" |
95 #include "chrome/browser/ui/webui/options/chromeos/proxy_handler.h" | 94 #include "chrome/browser/ui/webui/options/chromeos/proxy_handler.h" |
96 #include "chrome/browser/ui/webui/options/chromeos/stats_options_handler.h" | 95 #include "chrome/browser/ui/webui/options/chromeos/stats_options_handler.h" |
97 #include "chrome/browser/ui/webui/options/chromeos/user_image_source.h" | 96 #include "chrome/browser/ui/webui/options/chromeos/user_image_source.h" |
98 #endif | 97 #endif |
99 | 98 |
100 #if defined(USE_NSS_CERTS) | 99 #if defined(USE_NSS_CERTS) |
101 #include "chrome/browser/ui/webui/options/certificate_manager_handler.h" | 100 #include "chrome/browser/ui/webui/options/certificate_manager_handler.h" |
102 #endif | 101 #endif |
103 | 102 |
104 #if BUILDFLAG(ENABLE_GOOGLE_NOW) | 103 #if defined(ENABLE_GOOGLE_NOW) |
105 #include "chrome/browser/ui/webui/options/geolocation_options_handler.h" | 104 #include "chrome/browser/ui/webui/options/geolocation_options_handler.h" |
106 #endif | 105 #endif |
107 | 106 |
108 using content::RenderViewHost; | 107 using content::RenderViewHost; |
109 | 108 |
110 namespace { | 109 namespace { |
111 | 110 |
112 const char kLocalizedStringsFile[] = "strings.js"; | 111 const char kLocalizedStringsFile[] = "strings.js"; |
113 const char kOptionsBundleJsFile[] = "options_bundle.js"; | 112 const char kOptionsBundleJsFile[] = "options_bundle.js"; |
114 | 113 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 | 272 |
274 BrowserOptionsHandler* browser_options_handler = new BrowserOptionsHandler(); | 273 BrowserOptionsHandler* browser_options_handler = new BrowserOptionsHandler(); |
275 AddOptionsPageUIHandler(localized_strings, browser_options_handler); | 274 AddOptionsPageUIHandler(localized_strings, browser_options_handler); |
276 | 275 |
277 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); | 276 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); |
278 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); | 277 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); |
279 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); | 278 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); |
280 AddOptionsPageUIHandler(localized_strings, new CreateProfileHandler()); | 279 AddOptionsPageUIHandler(localized_strings, new CreateProfileHandler()); |
281 AddOptionsPageUIHandler(localized_strings, new EasyUnlockHandler()); | 280 AddOptionsPageUIHandler(localized_strings, new EasyUnlockHandler()); |
282 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); | 281 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); |
283 #if BUILDFLAG(ENABLE_GOOGLE_NOW) | 282 #if defined(ENABLE_GOOGLE_NOW) |
284 AddOptionsPageUIHandler(localized_strings, new GeolocationOptionsHandler()); | 283 AddOptionsPageUIHandler(localized_strings, new GeolocationOptionsHandler()); |
285 #endif | 284 #endif |
286 AddOptionsPageUIHandler(localized_strings, new options::HelpOverlayHandler()); | 285 AddOptionsPageUIHandler(localized_strings, new options::HelpOverlayHandler()); |
287 AddOptionsPageUIHandler(localized_strings, new HomePageOverlayHandler()); | 286 AddOptionsPageUIHandler(localized_strings, new HomePageOverlayHandler()); |
288 AddOptionsPageUIHandler(localized_strings, | 287 AddOptionsPageUIHandler(localized_strings, |
289 new MediaDevicesSelectionHandler()); | 288 new MediaDevicesSelectionHandler()); |
290 #if defined(OS_CHROMEOS) | 289 #if defined(OS_CHROMEOS) |
291 AddOptionsPageUIHandler(localized_strings, | 290 AddOptionsPageUIHandler(localized_strings, |
292 new chromeos::options::CrosLanguageOptionsHandler()); | 291 new chromeos::options::CrosLanguageOptionsHandler()); |
293 #else | 292 #else |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 // Add only if handler's service is enabled. | 476 // Add only if handler's service is enabled. |
478 if (handler->IsEnabled()) { | 477 if (handler->IsEnabled()) { |
479 // Add handler to the list and also pass the ownership. | 478 // Add handler to the list and also pass the ownership. |
480 web_ui()->AddMessageHandler(handler.release()); | 479 web_ui()->AddMessageHandler(handler.release()); |
481 handler_raw->GetLocalizedValues(localized_strings); | 480 handler_raw->GetLocalizedValues(localized_strings); |
482 handlers_.push_back(handler_raw); | 481 handlers_.push_back(handler_raw); |
483 } | 482 } |
484 } | 483 } |
485 | 484 |
486 } // namespace options | 485 } // namespace options |
OLD | NEW |