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/callback.h" | 10 #include "base/callback.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 #include "chrome/browser/ui/webui/options/chromeos/pointer_handler.h" | 81 #include "chrome/browser/ui/webui/options/chromeos/pointer_handler.h" |
82 #include "chrome/browser/ui/webui/options/chromeos/proxy_handler.h" | 82 #include "chrome/browser/ui/webui/options/chromeos/proxy_handler.h" |
83 #include "chrome/browser/ui/webui/options/chromeos/stats_options_handler.h" | 83 #include "chrome/browser/ui/webui/options/chromeos/stats_options_handler.h" |
84 #include "chrome/browser/ui/webui/options/chromeos/user_image_source.h" | 84 #include "chrome/browser/ui/webui/options/chromeos/user_image_source.h" |
85 #endif | 85 #endif |
86 | 86 |
87 #if defined(USE_NSS) | 87 #if defined(USE_NSS) |
88 #include "chrome/browser/ui/webui/options/certificate_manager_handler.h" | 88 #include "chrome/browser/ui/webui/options/certificate_manager_handler.h" |
89 #endif | 89 #endif |
90 | 90 |
| 91 #if defined(ENABLE_GOOGLE_NOW) |
| 92 #include "chrome/browser/ui/webui/options/geolocation_options_handler.h" |
| 93 #endif |
| 94 |
91 using content::RenderViewHost; | 95 using content::RenderViewHost; |
92 | 96 |
93 namespace { | 97 namespace { |
94 | 98 |
95 const char kLocalizedStringsFile[] = "strings.js"; | 99 const char kLocalizedStringsFile[] = "strings.js"; |
96 const char kOptionsBundleJsFile[] = "options_bundle.js"; | 100 const char kOptionsBundleJsFile[] = "options_bundle.js"; |
97 | 101 |
98 } // namespace | 102 } // namespace |
99 | 103 |
100 namespace options { | 104 namespace options { |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 253 |
250 AddOptionsPageUIHandler(localized_strings, new AutofillOptionsHandler()); | 254 AddOptionsPageUIHandler(localized_strings, new AutofillOptionsHandler()); |
251 | 255 |
252 BrowserOptionsHandler* browser_options_handler = new BrowserOptionsHandler(); | 256 BrowserOptionsHandler* browser_options_handler = new BrowserOptionsHandler(); |
253 AddOptionsPageUIHandler(localized_strings, browser_options_handler); | 257 AddOptionsPageUIHandler(localized_strings, browser_options_handler); |
254 | 258 |
255 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); | 259 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); |
256 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); | 260 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); |
257 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); | 261 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); |
258 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); | 262 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); |
| 263 #if defined(ENABLE_GOOGLE_NOW) |
| 264 AddOptionsPageUIHandler(localized_strings, new GeolocationOptionsHandler()); |
| 265 #endif |
259 AddOptionsPageUIHandler(localized_strings, new HomePageOverlayHandler()); | 266 AddOptionsPageUIHandler(localized_strings, new HomePageOverlayHandler()); |
260 AddOptionsPageUIHandler(localized_strings, | 267 AddOptionsPageUIHandler(localized_strings, |
261 new MediaDevicesSelectionHandler()); | 268 new MediaDevicesSelectionHandler()); |
262 AddOptionsPageUIHandler(localized_strings, new MediaGalleriesHandler()); | 269 AddOptionsPageUIHandler(localized_strings, new MediaGalleriesHandler()); |
263 #if defined(OS_CHROMEOS) | 270 #if defined(OS_CHROMEOS) |
264 AddOptionsPageUIHandler(localized_strings, | 271 AddOptionsPageUIHandler(localized_strings, |
265 new chromeos::options::CrosLanguageOptionsHandler()); | 272 new chromeos::options::CrosLanguageOptionsHandler()); |
266 #else | 273 #else |
267 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); | 274 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); |
268 #endif | 275 #endif |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 // Add only if handler's service is enabled. | 431 // Add only if handler's service is enabled. |
425 if (handler->IsEnabled()) { | 432 if (handler->IsEnabled()) { |
426 // Add handler to the list and also pass the ownership. | 433 // Add handler to the list and also pass the ownership. |
427 web_ui()->AddMessageHandler(handler.release()); | 434 web_ui()->AddMessageHandler(handler.release()); |
428 handler_raw->GetLocalizedValues(localized_strings); | 435 handler_raw->GetLocalizedValues(localized_strings); |
429 handlers_.push_back(handler_raw); | 436 handlers_.push_back(handler_raw); |
430 } | 437 } |
431 } | 438 } |
432 | 439 |
433 } // namespace options | 440 } // namespace options |
OLD | NEW |