| 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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 } | 995 } |
| 996 | 996 |
| 997 profile_info_list.Append(profile_value); | 997 profile_info_list.Append(profile_value); |
| 998 } | 998 } |
| 999 | 999 |
| 1000 web_ui()->CallJavascriptFunction("BrowserOptions.setProfilesInfo", | 1000 web_ui()->CallJavascriptFunction("BrowserOptions.setProfilesInfo", |
| 1001 profile_info_list); | 1001 profile_info_list); |
| 1002 } | 1002 } |
| 1003 | 1003 |
| 1004 void BrowserOptionsHandler::CreateProfile(const ListValue* args) { | 1004 void BrowserOptionsHandler::CreateProfile(const ListValue* args) { |
| 1005 // This handler could have been called in managed mode, for example because |
| 1006 // the user fiddled with the web inspector. Silently return in this case. |
| 1007 if (!ProfileManager::IsMultipleProfilesEnabled()) |
| 1008 return; |
| 1005 ProfileManager::CreateMultiProfileAsync(); | 1009 ProfileManager::CreateMultiProfileAsync(); |
| 1006 } | 1010 } |
| 1007 | 1011 |
| 1008 void BrowserOptionsHandler::ObserveThemeChanged() { | 1012 void BrowserOptionsHandler::ObserveThemeChanged() { |
| 1009 Profile* profile = Profile::FromWebUI(web_ui()); | 1013 Profile* profile = Profile::FromWebUI(web_ui()); |
| 1010 #if defined(TOOLKIT_GTK) | 1014 #if defined(TOOLKIT_GTK) |
| 1011 ThemeServiceGtk* theme_service = ThemeServiceGtk::GetFrom(profile); | 1015 ThemeServiceGtk* theme_service = ThemeServiceGtk::GetFrom(profile); |
| 1012 bool is_gtk_theme = theme_service->UsingNativeTheme(); | 1016 bool is_gtk_theme = theme_service->UsingNativeTheme(); |
| 1013 base::FundamentalValue gtk_enabled(!is_gtk_theme); | 1017 base::FundamentalValue gtk_enabled(!is_gtk_theme); |
| 1014 web_ui()->CallJavascriptFunction("BrowserOptions.setGtkThemeButtonEnabled", | 1018 web_ui()->CallJavascriptFunction("BrowserOptions.setGtkThemeButtonEnabled", |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1446 } | 1450 } |
| 1447 | 1451 |
| 1448 void BrowserOptionsHandler::SetupSSLConfigSettings() { | 1452 void BrowserOptionsHandler::SetupSSLConfigSettings() { |
| 1449 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); | 1453 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); |
| 1450 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); | 1454 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); |
| 1451 web_ui()->CallJavascriptFunction( | 1455 web_ui()->CallJavascriptFunction( |
| 1452 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); | 1456 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); |
| 1453 } | 1457 } |
| 1454 | 1458 |
| 1455 } // namespace options2 | 1459 } // namespace options2 |
| OLD | NEW |