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/options/browser_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1360 } | 1360 } |
1361 | 1361 |
1362 void BrowserOptionsHandler::OnWallpaperManagedChanged(bool managed) { | 1362 void BrowserOptionsHandler::OnWallpaperManagedChanged(bool managed) { |
1363 web_ui()->CallJavascriptFunction("BrowserOptions.setWallpaperManaged", | 1363 web_ui()->CallJavascriptFunction("BrowserOptions.setWallpaperManaged", |
1364 base::FundamentalValue(managed)); | 1364 base::FundamentalValue(managed)); |
1365 } | 1365 } |
1366 #endif | 1366 #endif |
1367 | 1367 |
1368 scoped_ptr<base::DictionaryValue> | 1368 scoped_ptr<base::DictionaryValue> |
1369 BrowserOptionsHandler::GetSyncStateDictionary() { | 1369 BrowserOptionsHandler::GetSyncStateDictionary() { |
| 1370 // The items which are to be written into |sync_status| are also described in |
| 1371 // chrome/browser/resources/options/browser_options.js in @typedef |
| 1372 // for SyncStatus. Please update it whenever you add or remove any keys here. |
1370 scoped_ptr<base::DictionaryValue> sync_status(new base::DictionaryValue); | 1373 scoped_ptr<base::DictionaryValue> sync_status(new base::DictionaryValue); |
1371 Profile* profile = Profile::FromWebUI(web_ui()); | 1374 Profile* profile = Profile::FromWebUI(web_ui()); |
1372 if (profile->IsGuestSession()) { | 1375 if (profile->IsGuestSession()) { |
1373 // Cannot display signin status when running in guest mode on chromeos | 1376 // Cannot display signin status when running in guest mode on chromeos |
1374 // because there is no SigninManager. | 1377 // because there is no SigninManager. |
1375 sync_status->SetBoolean("signinAllowed", false); | 1378 sync_status->SetBoolean("signinAllowed", false); |
1376 return sync_status.Pass(); | 1379 return sync_status.Pass(); |
1377 } | 1380 } |
1378 | 1381 |
1379 sync_status->SetBoolean("supervisedUser", profile->IsSupervised()); | 1382 sync_status->SetBoolean("supervisedUser", profile->IsSupervised()); |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1922 | 1925 |
1923 void BrowserOptionsHandler::SetMetricsReportingCheckbox(bool checked, | 1926 void BrowserOptionsHandler::SetMetricsReportingCheckbox(bool checked, |
1924 bool disabled) { | 1927 bool disabled) { |
1925 web_ui()->CallJavascriptFunction( | 1928 web_ui()->CallJavascriptFunction( |
1926 "BrowserOptions.setMetricsReportingCheckboxState", | 1929 "BrowserOptions.setMetricsReportingCheckboxState", |
1927 base::FundamentalValue(checked), | 1930 base::FundamentalValue(checked), |
1928 base::FundamentalValue(disabled)); | 1931 base::FundamentalValue(disabled)); |
1929 } | 1932 } |
1930 | 1933 |
1931 } // namespace options | 1934 } // namespace options |
OLD | NEW |