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/options2/browser_options_handler2.h" | 5 #include "chrome/browser/ui/webui/options2/browser_options_handler2.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 #include "content/public/browser/web_contents.h" | 69 #include "content/public/browser/web_contents.h" |
70 #include "content/public/browser/web_contents_view.h" | 70 #include "content/public/browser/web_contents_view.h" |
71 #include "content/public/common/page_zoom.h" | 71 #include "content/public/common/page_zoom.h" |
72 #include "grit/chromium_strings.h" | 72 #include "grit/chromium_strings.h" |
73 #include "grit/generated_resources.h" | 73 #include "grit/generated_resources.h" |
74 #include "grit/locale_settings.h" | 74 #include "grit/locale_settings.h" |
75 #include "grit/theme_resources.h" | 75 #include "grit/theme_resources.h" |
76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
77 #include "ui/base/l10n/l10n_util.h" | 77 #include "ui/base/l10n/l10n_util.h" |
78 | 78 |
| 79 #if defined(USE_ASH) |
| 80 #include "ash/shell.h" |
| 81 #endif |
| 82 |
79 #if !defined(OS_CHROMEOS) | 83 #if !defined(OS_CHROMEOS) |
80 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" | 84 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" |
81 #include "chrome/browser/ui/webui/options2/advanced_options_utils2.h" | 85 #include "chrome/browser/ui/webui/options2/advanced_options_utils2.h" |
82 #endif | 86 #endif |
83 | 87 |
84 #if defined(OS_CHROMEOS) | 88 #if defined(OS_CHROMEOS) |
85 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 89 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
86 #include "chrome/browser/chromeos/cros_settings.h" | 90 #include "chrome/browser/chromeos/cros_settings.h" |
87 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 91 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
88 #include "chrome/browser/chromeos/dbus/power_manager_client.h" | 92 #include "chrome/browser/chromeos/dbus/power_manager_client.h" |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 { "sectionTitleInternet", IDS_OPTIONS_INTERNET_OPTIONS_GROUP_LABEL }, | 309 { "sectionTitleInternet", IDS_OPTIONS_INTERNET_OPTIONS_GROUP_LABEL }, |
306 { "timezone", IDS_OPTIONS_SETTINGS_TIMEZONE_DESCRIPTION }, | 310 { "timezone", IDS_OPTIONS_SETTINGS_TIMEZONE_DESCRIPTION }, |
307 { "use24HourClock", IDS_OPTIONS_SETTINGS_USE_24HOUR_CLOCK_DESCRIPTION }, | 311 { "use24HourClock", IDS_OPTIONS_SETTINGS_USE_24HOUR_CLOCK_DESCRIPTION }, |
308 #else | 312 #else |
309 { "cloudPrintConnectorEnabledManageButton", | 313 { "cloudPrintConnectorEnabledManageButton", |
310 IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLED_MANAGE_BUTTON}, | 314 IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLED_MANAGE_BUTTON}, |
311 { "cloudPrintConnectorEnablingButton", | 315 { "cloudPrintConnectorEnablingButton", |
312 IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLING_BUTTON }, | 316 IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLING_BUTTON }, |
313 { "proxiesConfigureButton", IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON }, | 317 { "proxiesConfigureButton", IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON }, |
314 #endif | 318 #endif |
| 319 #if defined(USE_ASH) |
| 320 { "setWallpaper", IDS_SET_WALLPAPER_BUTTON }, |
| 321 #endif |
315 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) | 322 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) |
316 { "advancedSectionTitleBackground", | 323 { "advancedSectionTitleBackground", |
317 IDS_OPTIONS_ADVANCED_SECTION_TITLE_BACKGROUND }, | 324 IDS_OPTIONS_ADVANCED_SECTION_TITLE_BACKGROUND }, |
318 { "backgroundModeCheckbox", IDS_OPTIONS_BACKGROUND_ENABLE_BACKGROUND_MODE }, | 325 { "backgroundModeCheckbox", IDS_OPTIONS_BACKGROUND_ENABLE_BACKGROUND_MODE }, |
319 #endif | 326 #endif |
320 }; | 327 }; |
321 | 328 |
322 RegisterStrings(localized_strings, resources, arraysize(resources)); | 329 RegisterStrings(localized_strings, resources, arraysize(resources)); |
323 RegisterCloudPrintStrings(localized_strings); | 330 RegisterCloudPrintStrings(localized_strings); |
324 RegisterTitle(localized_strings, "homePageOverlay", | 331 RegisterTitle(localized_strings, "homePageOverlay", |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 l10n_util::GetStringFUTF16(IDS_AUTOLAUNCH_TEXT, | 371 l10n_util::GetStringFUTF16(IDS_AUTOLAUNCH_TEXT, |
365 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); | 372 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); |
366 | 373 |
367 #if defined(OS_CHROMEOS) | 374 #if defined(OS_CHROMEOS) |
368 if (chromeos::UserManager::Get()->user_is_logged_in()) { | 375 if (chromeos::UserManager::Get()->user_is_logged_in()) { |
369 localized_strings->SetString("username", | 376 localized_strings->SetString("username", |
370 chromeos::UserManager::Get()->logged_in_user().email()); | 377 chromeos::UserManager::Get()->logged_in_user().email()); |
371 } | 378 } |
372 #endif | 379 #endif |
373 | 380 |
| 381 #if defined(USE_ASH) |
| 382 localized_strings->SetBoolean("compact_mode", |
| 383 ash::Shell::GetInstance()->IsWindowModeCompact()); |
| 384 #endif |
| 385 |
374 // Pass along sync status early so it will be available during page init. | 386 // Pass along sync status early so it will be available during page init. |
375 localized_strings->Set("syncData", GetSyncStateDictionary()); | 387 localized_strings->Set("syncData", GetSyncStateDictionary()); |
376 | 388 |
377 localized_strings->SetString("privacyLearnMoreURL", | 389 localized_strings->SetString("privacyLearnMoreURL", |
378 chrome::kPrivacyLearnMoreURL); | 390 chrome::kPrivacyLearnMoreURL); |
379 | 391 |
380 localized_strings->SetString( | 392 localized_strings->SetString( |
381 "languageSectionLabel", | 393 "languageSectionLabel", |
382 l10n_util::GetStringFUTF16( | 394 l10n_util::GetStringFUTF16( |
383 IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL, | 395 IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL, |
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1445 } | 1457 } |
1446 | 1458 |
1447 void BrowserOptionsHandler::SetupSSLConfigSettings() { | 1459 void BrowserOptionsHandler::SetupSSLConfigSettings() { |
1448 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); | 1460 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); |
1449 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); | 1461 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); |
1450 web_ui()->CallJavascriptFunction( | 1462 web_ui()->CallJavascriptFunction( |
1451 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); | 1463 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); |
1452 } | 1464 } |
1453 | 1465 |
1454 } // namespace options2 | 1466 } // namespace options2 |
OLD | NEW |