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_handler.h" | 5 #include "chrome/browser/ui/webui/options2/browser_options_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 DictionaryValue* profile_info = new DictionaryValue(); | 964 DictionaryValue* profile_info = new DictionaryValue(); |
965 ProfileInfoCache& cache = | 965 ProfileInfoCache& cache = |
966 g_browser_process->profile_manager()->GetProfileInfoCache(); | 966 g_browser_process->profile_manager()->GetProfileInfoCache(); |
967 | 967 |
968 size_t icon_index = cache.ChooseAvatarIconIndexForNewProfile(); | 968 size_t icon_index = cache.ChooseAvatarIconIndexForNewProfile(); |
969 | 969 |
970 profile_info->SetString("name", cache.ChooseNameForNewProfile(icon_index)); | 970 profile_info->SetString("name", cache.ChooseNameForNewProfile(icon_index)); |
971 profile_info->SetString("iconURL", cache.GetDefaultAvatarIconUrl( | 971 profile_info->SetString("iconURL", cache.GetDefaultAvatarIconUrl( |
972 icon_index)); | 972 icon_index)); |
973 | 973 |
974 web_ui()->CallJavascriptFunction("ManageProfileOverlay.showCreateDialog", | 974 base::StringValue section("create"); |
975 *profile_info); | 975 web_ui()->CallJavascriptFunction("ManageProfileOverlay.setProfileInfo", |
| 976 *profile_info, section); |
976 } | 977 } |
977 | 978 |
978 void BrowserOptionsHandler::ObserveThemeChanged() { | 979 void BrowserOptionsHandler::ObserveThemeChanged() { |
979 Profile* profile = Profile::FromWebUI(web_ui()); | 980 Profile* profile = Profile::FromWebUI(web_ui()); |
980 #if defined(TOOLKIT_GTK) | 981 #if defined(TOOLKIT_GTK) |
981 GtkThemeService* theme_service = GtkThemeService::GetFrom(profile); | 982 GtkThemeService* theme_service = GtkThemeService::GetFrom(profile); |
982 bool is_gtk_theme = theme_service->UsingNativeTheme(); | 983 bool is_gtk_theme = theme_service->UsingNativeTheme(); |
983 base::FundamentalValue gtk_enabled(!is_gtk_theme); | 984 base::FundamentalValue gtk_enabled(!is_gtk_theme); |
984 web_ui()->CallJavascriptFunction("BrowserOptions.setGtkThemeButtonEnabled", | 985 web_ui()->CallJavascriptFunction("BrowserOptions.setGtkThemeButtonEnabled", |
985 gtk_enabled); | 986 gtk_enabled); |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1450 } | 1451 } |
1451 | 1452 |
1452 void BrowserOptionsHandler::SetupSSLConfigSettings() { | 1453 void BrowserOptionsHandler::SetupSSLConfigSettings() { |
1453 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); | 1454 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); |
1454 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); | 1455 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); |
1455 web_ui()->CallJavascriptFunction( | 1456 web_ui()->CallJavascriptFunction( |
1456 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); | 1457 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); |
1457 } | 1458 } |
1458 | 1459 |
1459 } // namespace options2 | 1460 } // namespace options2 |
OLD | NEW |