Chromium Code Reviews| 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 "ash/shell.h" | |
| 9 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 11 #include "base/bind.h" |
| 11 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
| 12 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 13 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
| 14 #include "base/path_service.h" | 15 #include "base/path_service.h" |
| 15 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
| 16 #include "base/string_number_conversions.h" | 17 #include "base/string_number_conversions.h" |
| 17 #include "base/utf_string_conversions.h" | 18 #include "base/utf_string_conversions.h" |
| 18 #include "base/value_conversions.h" | 19 #include "base/value_conversions.h" |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 305 { "sectionTitleInternet", IDS_OPTIONS_INTERNET_OPTIONS_GROUP_LABEL }, | 306 { "sectionTitleInternet", IDS_OPTIONS_INTERNET_OPTIONS_GROUP_LABEL }, |
| 306 { "timezone", IDS_OPTIONS_SETTINGS_TIMEZONE_DESCRIPTION }, | 307 { "timezone", IDS_OPTIONS_SETTINGS_TIMEZONE_DESCRIPTION }, |
| 307 { "use24HourClock", IDS_OPTIONS_SETTINGS_USE_24HOUR_CLOCK_DESCRIPTION }, | 308 { "use24HourClock", IDS_OPTIONS_SETTINGS_USE_24HOUR_CLOCK_DESCRIPTION }, |
| 308 #else | 309 #else |
| 309 { "cloudPrintConnectorEnabledManageButton", | 310 { "cloudPrintConnectorEnabledManageButton", |
| 310 IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLED_MANAGE_BUTTON}, | 311 IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLED_MANAGE_BUTTON}, |
| 311 { "cloudPrintConnectorEnablingButton", | 312 { "cloudPrintConnectorEnablingButton", |
| 312 IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLING_BUTTON }, | 313 IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLING_BUTTON }, |
| 313 { "proxiesConfigureButton", IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON }, | 314 { "proxiesConfigureButton", IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON }, |
| 314 #endif | 315 #endif |
| 316 #if defined(USE_AURA) | |
|
flackr
2012/03/07 20:50:28
USE_ASH? For consistency.
bshe
2012/03/07 23:48:35
Done.
| |
| 317 { "setWallpaper", IDS_SET_WALLPAPER_BUTTON }, | |
| 318 #endif | |
| 315 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) | 319 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) |
| 316 { "advancedSectionTitleBackground", | 320 { "advancedSectionTitleBackground", |
| 317 IDS_OPTIONS_ADVANCED_SECTION_TITLE_BACKGROUND }, | 321 IDS_OPTIONS_ADVANCED_SECTION_TITLE_BACKGROUND }, |
| 318 { "backgroundModeCheckbox", IDS_OPTIONS_BACKGROUND_ENABLE_BACKGROUND_MODE }, | 322 { "backgroundModeCheckbox", IDS_OPTIONS_BACKGROUND_ENABLE_BACKGROUND_MODE }, |
| 319 #endif | 323 #endif |
| 320 }; | 324 }; |
| 321 | 325 |
| 322 RegisterStrings(localized_strings, resources, arraysize(resources)); | 326 RegisterStrings(localized_strings, resources, arraysize(resources)); |
| 323 RegisterCloudPrintStrings(localized_strings); | 327 RegisterCloudPrintStrings(localized_strings); |
| 324 RegisterTitle(localized_strings, "homePageOverlay", | 328 RegisterTitle(localized_strings, "homePageOverlay", |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 364 l10n_util::GetStringFUTF16(IDS_AUTOLAUNCH_TEXT, | 368 l10n_util::GetStringFUTF16(IDS_AUTOLAUNCH_TEXT, |
| 365 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); | 369 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); |
| 366 | 370 |
| 367 #if defined(OS_CHROMEOS) | 371 #if defined(OS_CHROMEOS) |
| 368 if (chromeos::UserManager::Get()->user_is_logged_in()) { | 372 if (chromeos::UserManager::Get()->user_is_logged_in()) { |
| 369 localized_strings->SetString("username", | 373 localized_strings->SetString("username", |
| 370 chromeos::UserManager::Get()->logged_in_user().email()); | 374 chromeos::UserManager::Get()->logged_in_user().email()); |
| 371 } | 375 } |
| 372 #endif | 376 #endif |
| 373 | 377 |
| 378 localized_strings->SetBoolean("compact_mode", | |
| 379 ash::Shell::GetInstance()->IsWindowModeCompact()); | |
|
flackr
2012/03/07 20:50:28
This (and the include of ash above) has to be in a
bshe
2012/03/07 23:48:35
Done.
| |
| 380 | |
| 374 // Pass along sync status early so it will be available during page init. | 381 // Pass along sync status early so it will be available during page init. |
| 375 localized_strings->Set("syncData", GetSyncStateDictionary()); | 382 localized_strings->Set("syncData", GetSyncStateDictionary()); |
| 376 | 383 |
| 377 localized_strings->SetString("privacyLearnMoreURL", | 384 localized_strings->SetString("privacyLearnMoreURL", |
| 378 chrome::kPrivacyLearnMoreURL); | 385 chrome::kPrivacyLearnMoreURL); |
| 379 | 386 |
| 380 localized_strings->SetString( | 387 localized_strings->SetString( |
| 381 "languageSectionLabel", | 388 "languageSectionLabel", |
| 382 l10n_util::GetStringFUTF16( | 389 l10n_util::GetStringFUTF16( |
| 383 IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL, | 390 IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL, |
| (...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1445 } | 1452 } |
| 1446 | 1453 |
| 1447 void BrowserOptionsHandler::SetupSSLConfigSettings() { | 1454 void BrowserOptionsHandler::SetupSSLConfigSettings() { |
| 1448 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); | 1455 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); |
| 1449 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); | 1456 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); |
| 1450 web_ui()->CallJavascriptFunction( | 1457 web_ui()->CallJavascriptFunction( |
| 1451 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); | 1458 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); |
| 1452 } | 1459 } |
| 1453 | 1460 |
| 1454 } // namespace options2 | 1461 } // namespace options2 |
| OLD | NEW |