Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 475483003: Wire easy unlock settings UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "apps/app_window.h" 10 #include "apps/app_window.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE }, 243 IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE },
244 { "downloadLocationChangeButton", 244 { "downloadLocationChangeButton",
245 IDS_OPTIONS_DOWNLOADLOCATION_CHANGE_BUTTON }, 245 IDS_OPTIONS_DOWNLOADLOCATION_CHANGE_BUTTON },
246 { "downloadLocationGroupName", IDS_OPTIONS_DOWNLOADLOCATION_GROUP_NAME }, 246 { "downloadLocationGroupName", IDS_OPTIONS_DOWNLOADLOCATION_GROUP_NAME },
247 { "enableLogging", IDS_OPTIONS_ENABLE_LOGGING }, 247 { "enableLogging", IDS_OPTIONS_ENABLE_LOGGING },
248 { "metricsReportingResetRestart", IDS_OPTIONS_ENABLE_LOGGING_RESTART }, 248 { "metricsReportingResetRestart", IDS_OPTIONS_ENABLE_LOGGING_RESTART },
249 { "easyUnlockDescription", IDS_OPTIONS_EASY_UNLOCK_DESCRIPTION }, 249 { "easyUnlockDescription", IDS_OPTIONS_EASY_UNLOCK_DESCRIPTION },
250 { "easyUnlockSectionTitle", IDS_OPTIONS_EASY_UNLOCK_SECTION_TITLE }, 250 { "easyUnlockSectionTitle", IDS_OPTIONS_EASY_UNLOCK_SECTION_TITLE },
251 { "easyUnlockSetupButton", IDS_OPTIONS_EASY_UNLOCK_SETUP_BUTTON }, 251 { "easyUnlockSetupButton", IDS_OPTIONS_EASY_UNLOCK_SETUP_BUTTON },
252 { "easyUnlockSetupIntro", IDS_OPTIONS_EASY_UNLOCK_SETUP_INTRO }, 252 { "easyUnlockSetupIntro", IDS_OPTIONS_EASY_UNLOCK_SETUP_INTRO },
253 { "easyUnlockTurnOffButton", IDS_OPTIONS_EASY_UNLOCK_TURN_OFF_BUTTON },
254 { "easyUnlockTurnOffTitle", IDS_OPTIONS_EASY_UNLOCK_TURN_OFF_TITLE },
255 { "easyUnlockTurnOffDescription",
256 IDS_OPTIONS_EASY_UNLOCK_TURN_OFF_DESCRIPTION },
257 { "easyUnlockTurnOffOfflineTitle",
258 IDS_OPTIONS_EASY_UNLOCK_TURN_OFF_OFFLINE_TITLE },
259 { "easyUnlockTurnOffOfflineMessage",
260 IDS_OPTIONS_EASY_UNLOCK_TURN_OFF_OFFLINE_MESSAGE },
261 { "easyUnlockTurnOffErrorTitle",
262 IDS_OPTIONS_EASY_UNLOCK_TURN_OFF_ERROR_TITLE },
263 { "easyUnlockTurnOffErrorMessage",
264 IDS_OPTIONS_EASY_UNLOCK_TURN_OFF_ERROR_MESSAGE },
265 { "easyUnlockTurnOffRetryButton",
266 IDS_OPTIONS_EASY_UNLOCK_TURN_OFF_RETRY_BUTTON },
267 { "extensionControlled", IDS_OPTIONS_TAB_EXTENSION_CONTROLLED }, 253 { "extensionControlled", IDS_OPTIONS_TAB_EXTENSION_CONTROLLED },
268 { "extensionDisable", IDS_OPTIONS_TAB_EXTENSION_CONTROLLED_DISABLE }, 254 { "extensionDisable", IDS_OPTIONS_TAB_EXTENSION_CONTROLLED_DISABLE },
269 { "fontSettingsCustomizeFontsButton", 255 { "fontSettingsCustomizeFontsButton",
270 IDS_OPTIONS_FONTSETTINGS_CUSTOMIZE_FONTS_BUTTON }, 256 IDS_OPTIONS_FONTSETTINGS_CUSTOMIZE_FONTS_BUTTON },
271 { "fontSizeLabelCustom", IDS_OPTIONS_FONT_SIZE_LABEL_CUSTOM }, 257 { "fontSizeLabelCustom", IDS_OPTIONS_FONT_SIZE_LABEL_CUSTOM },
272 { "fontSizeLabelLarge", IDS_OPTIONS_FONT_SIZE_LABEL_LARGE }, 258 { "fontSizeLabelLarge", IDS_OPTIONS_FONT_SIZE_LABEL_LARGE },
273 { "fontSizeLabelMedium", IDS_OPTIONS_FONT_SIZE_LABEL_MEDIUM }, 259 { "fontSizeLabelMedium", IDS_OPTIONS_FONT_SIZE_LABEL_MEDIUM },
274 { "fontSizeLabelSmall", IDS_OPTIONS_FONT_SIZE_LABEL_SMALL }, 260 { "fontSizeLabelSmall", IDS_OPTIONS_FONT_SIZE_LABEL_SMALL },
275 { "fontSizeLabelVeryLarge", IDS_OPTIONS_FONT_SIZE_LABEL_VERY_LARGE }, 261 { "fontSizeLabelVeryLarge", IDS_OPTIONS_FONT_SIZE_LABEL_VERY_LARGE },
276 { "fontSizeLabelVerySmall", IDS_OPTIONS_FONT_SIZE_LABEL_VERY_SMALL }, 262 { "fontSizeLabelVerySmall", IDS_OPTIONS_FONT_SIZE_LABEL_VERY_SMALL },
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1831 bool has_users = !Profile::FromWebUI(web_ui())-> 1817 bool has_users = !Profile::FromWebUI(web_ui())->
1832 GetPrefs()->GetDictionary(prefs::kSupervisedUsers)->empty(); 1818 GetPrefs()->GetDictionary(prefs::kSupervisedUsers)->empty();
1833 base::FundamentalValue has_users_value(has_users); 1819 base::FundamentalValue has_users_value(has_users);
1834 web_ui()->CallJavascriptFunction( 1820 web_ui()->CallJavascriptFunction(
1835 "BrowserOptions.updateManagesSupervisedUsers", 1821 "BrowserOptions.updateManagesSupervisedUsers",
1836 has_users_value); 1822 has_users_value);
1837 } 1823 }
1838 1824
1839 void BrowserOptionsHandler::SetupEasyUnlock() { 1825 void BrowserOptionsHandler::SetupEasyUnlock() {
1840 // TODO(xiyuan): Update when pairing data is really availble. 1826 // TODO(xiyuan): Update when pairing data is really availble.
1841 bool has_pairing = !Profile::FromWebUI(web_ui())->GetPrefs() 1827 const base::ListValue* devices =
1842 ->GetDictionary(prefs::kEasyUnlockPairing)->empty(); 1828 EasyUnlockService::Get(Profile::FromWebUI(web_ui()))->GetRemoteDevices();
1829 bool has_pairing = devices && !devices->empty();
1843 base::FundamentalValue has_pairing_value(has_pairing); 1830 base::FundamentalValue has_pairing_value(has_pairing);
1844 web_ui()->CallJavascriptFunction( 1831 web_ui()->CallJavascriptFunction(
1845 "BrowserOptions.updateEasyUnlock", 1832 "BrowserOptions.updateEasyUnlock",
1846 has_pairing_value); 1833 has_pairing_value);
1847 } 1834 }
1848 1835
1849 void BrowserOptionsHandler::SetupExtensionControlledIndicators() { 1836 void BrowserOptionsHandler::SetupExtensionControlledIndicators() {
1850 #if defined(OS_WIN) 1837 #if defined(OS_WIN)
1851 base::DictionaryValue extension_controlled; 1838 base::DictionaryValue extension_controlled;
1852 1839
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1887 extension = extensions::GetExtensionOverridingProxy( 1874 extension = extensions::GetExtensionOverridingProxy(
1888 Profile::FromWebUI(web_ui())); 1875 Profile::FromWebUI(web_ui()));
1889 AppendExtensionData("proxy", extension, &extension_controlled); 1876 AppendExtensionData("proxy", extension, &extension_controlled);
1890 1877
1891 web_ui()->CallJavascriptFunction("BrowserOptions.toggleExtensionIndicators", 1878 web_ui()->CallJavascriptFunction("BrowserOptions.toggleExtensionIndicators",
1892 extension_controlled); 1879 extension_controlled);
1893 #endif // defined(OS_WIN) 1880 #endif // defined(OS_WIN)
1894 } 1881 }
1895 1882
1896 } // namespace options 1883 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/signin/easy_unlock_toggle_flow.cc ('k') | chrome/browser/ui/webui/options/easy_unlock_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698