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" | |
flackr
2012/03/08 01:19:59
This too ^
bshe
2012/03/08 03:19:24
Done.
| |
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_ASH) | |
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 #if defined(USE_ASH) | |
379 localized_strings->SetBoolean("compact_mode", | |
380 ash::Shell::GetInstance()->IsWindowModeCompact()); | |
381 #endif | |
382 | |
374 // Pass along sync status early so it will be available during page init. | 383 // Pass along sync status early so it will be available during page init. |
375 localized_strings->Set("syncData", GetSyncStateDictionary()); | 384 localized_strings->Set("syncData", GetSyncStateDictionary()); |
376 | 385 |
377 localized_strings->SetString("privacyLearnMoreURL", | 386 localized_strings->SetString("privacyLearnMoreURL", |
378 chrome::kPrivacyLearnMoreURL); | 387 chrome::kPrivacyLearnMoreURL); |
379 | 388 |
380 localized_strings->SetString( | 389 localized_strings->SetString( |
381 "languageSectionLabel", | 390 "languageSectionLabel", |
382 l10n_util::GetStringFUTF16( | 391 l10n_util::GetStringFUTF16( |
383 IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL, | 392 IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL, |
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1445 } | 1454 } |
1446 | 1455 |
1447 void BrowserOptionsHandler::SetupSSLConfigSettings() { | 1456 void BrowserOptionsHandler::SetupSSLConfigSettings() { |
1448 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); | 1457 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); |
1449 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); | 1458 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); |
1450 web_ui()->CallJavascriptFunction( | 1459 web_ui()->CallJavascriptFunction( |
1451 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); | 1460 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); |
1452 } | 1461 } |
1453 | 1462 |
1454 } // namespace options2 | 1463 } // namespace options2 |
OLD | NEW |