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

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

Issue 136693013: [Hotword] Remove unneeded preferences. Cleaning up look of settings. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: removing a few mroe instances of prefs Created 6 years, 11 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
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/shell_window.h" 10 #include "apps/shell_window.h"
(...skipping 27 matching lines...) Expand all
38 #include "chrome/browser/profile_resetter/automatic_profile_resetter.h" 38 #include "chrome/browser/profile_resetter/automatic_profile_resetter.h"
39 #include "chrome/browser/profile_resetter/automatic_profile_resetter_factory.h" 39 #include "chrome/browser/profile_resetter/automatic_profile_resetter_factory.h"
40 #include "chrome/browser/profiles/profile.h" 40 #include "chrome/browser/profiles/profile.h"
41 #include "chrome/browser/profiles/profile_info_cache.h" 41 #include "chrome/browser/profiles/profile_info_cache.h"
42 #include "chrome/browser/profiles/profile_info_util.h" 42 #include "chrome/browser/profiles/profile_info_util.h"
43 #include "chrome/browser/profiles/profile_manager.h" 43 #include "chrome/browser/profiles/profile_manager.h"
44 #include "chrome/browser/profiles/profile_metrics.h" 44 #include "chrome/browser/profiles/profile_metrics.h"
45 #include "chrome/browser/profiles/profile_shortcut_manager.h" 45 #include "chrome/browser/profiles/profile_shortcut_manager.h"
46 #include "chrome/browser/profiles/profile_window.h" 46 #include "chrome/browser/profiles/profile_window.h"
47 #include "chrome/browser/profiles/profiles_state.h" 47 #include "chrome/browser/profiles/profiles_state.h"
48 #include "chrome/browser/search/hotword_service.h"
49 #include "chrome/browser/search/hotword_service_factory.h"
48 #include "chrome/browser/search/search.h" 50 #include "chrome/browser/search/search.h"
49 #include "chrome/browser/search_engines/template_url.h" 51 #include "chrome/browser/search_engines/template_url.h"
50 #include "chrome/browser/search_engines/template_url_service.h" 52 #include "chrome/browser/search_engines/template_url_service.h"
51 #include "chrome/browser/search_engines/template_url_service_factory.h" 53 #include "chrome/browser/search_engines/template_url_service_factory.h"
52 #include "chrome/browser/signin/signin_manager.h" 54 #include "chrome/browser/signin/signin_manager.h"
53 #include "chrome/browser/signin/signin_manager_factory.h" 55 #include "chrome/browser/signin/signin_manager_factory.h"
54 #include "chrome/browser/sync/profile_sync_service.h" 56 #include "chrome/browser/sync/profile_sync_service.h"
55 #include "chrome/browser/sync/profile_sync_service_factory.h" 57 #include "chrome/browser/sync/profile_sync_service_factory.h"
56 #include "chrome/browser/sync/sync_ui_util.h" 58 #include "chrome/browser/sync/sync_ui_util.h"
57 #include "chrome/browser/themes/theme_service.h" 59 #include "chrome/browser/themes/theme_service.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 { "fontSizeLabelMedium", IDS_OPTIONS_FONT_SIZE_LABEL_MEDIUM }, 254 { "fontSizeLabelMedium", IDS_OPTIONS_FONT_SIZE_LABEL_MEDIUM },
253 { "fontSizeLabelSmall", IDS_OPTIONS_FONT_SIZE_LABEL_SMALL }, 255 { "fontSizeLabelSmall", IDS_OPTIONS_FONT_SIZE_LABEL_SMALL },
254 { "fontSizeLabelVeryLarge", IDS_OPTIONS_FONT_SIZE_LABEL_VERY_LARGE }, 256 { "fontSizeLabelVeryLarge", IDS_OPTIONS_FONT_SIZE_LABEL_VERY_LARGE },
255 { "fontSizeLabelVerySmall", IDS_OPTIONS_FONT_SIZE_LABEL_VERY_SMALL }, 257 { "fontSizeLabelVerySmall", IDS_OPTIONS_FONT_SIZE_LABEL_VERY_SMALL },
256 { "hideAdvancedSettings", IDS_SETTINGS_HIDE_ADVANCED_SETTINGS }, 258 { "hideAdvancedSettings", IDS_SETTINGS_HIDE_ADVANCED_SETTINGS },
257 { "homePageNtp", IDS_OPTIONS_HOMEPAGE_NTP }, 259 { "homePageNtp", IDS_OPTIONS_HOMEPAGE_NTP },
258 { "homePageShowHomeButton", IDS_OPTIONS_TOOLBAR_SHOW_HOME_BUTTON }, 260 { "homePageShowHomeButton", IDS_OPTIONS_TOOLBAR_SHOW_HOME_BUTTON },
259 { "homePageUseNewTab", IDS_OPTIONS_HOMEPAGE_USE_NEWTAB }, 261 { "homePageUseNewTab", IDS_OPTIONS_HOMEPAGE_USE_NEWTAB },
260 { "homePageUseURL", IDS_OPTIONS_HOMEPAGE_USE_URL }, 262 { "homePageUseURL", IDS_OPTIONS_HOMEPAGE_USE_URL },
261 { "hotwordSearchDescription", IDS_HOTWORD_SEARCH_PREF_DESCRIPTION }, 263 { "hotwordSearchDescription", IDS_HOTWORD_SEARCH_PREF_DESCRIPTION },
262 { "hotwordSearchIncognito", IDS_HOTWORD_SEARCH_INCOGNITO_PREF_CHKBOX },
263 { "hotwordSearchTimeout", IDS_HOTWORD_SEARCH_TIMEOUT_PREF_CHKBOX },
264 { "hotwordSearchTimeoutDescription",
265 IDS_HOTWORD_SEARCH_TIMEOUT_PREF_DESCRIPTION },
266 { "importData", IDS_OPTIONS_IMPORT_DATA_BUTTON }, 264 { "importData", IDS_OPTIONS_IMPORT_DATA_BUTTON },
267 { "improveBrowsingExperience", IDS_OPTIONS_IMPROVE_BROWSING_EXPERIENCE }, 265 { "improveBrowsingExperience", IDS_OPTIONS_IMPROVE_BROWSING_EXPERIENCE },
268 { "languageAndSpellCheckSettingsButton", 266 { "languageAndSpellCheckSettingsButton",
269 IDS_OPTIONS_SETTINGS_LANGUAGE_AND_INPUT_SETTINGS }, 267 IDS_OPTIONS_SETTINGS_LANGUAGE_AND_INPUT_SETTINGS },
270 { "linkDoctorPref", IDS_OPTIONS_LINKDOCTOR_PREF }, 268 { "linkDoctorPref", IDS_OPTIONS_LINKDOCTOR_PREF },
271 { "manageAutofillSettings", IDS_OPTIONS_MANAGE_AUTOFILL_SETTINGS_LINK }, 269 { "manageAutofillSettings", IDS_OPTIONS_MANAGE_AUTOFILL_SETTINGS_LINK },
272 { "manageLanguages", IDS_OPTIONS_TRANSLATE_MANAGE_LANGUAGES }, 270 { "manageLanguages", IDS_OPTIONS_TRANSLATE_MANAGE_LANGUAGES },
273 { "managePasswords", IDS_OPTIONS_PASSWORDS_MANAGE_PASSWORDS_LINK }, 271 { "managePasswords", IDS_OPTIONS_PASSWORDS_MANAGE_PASSWORDS_LINK },
274 { "networkPredictionEnabledDescription", 272 { "networkPredictionEnabledDescription",
275 IDS_NETWORK_PREDICTION_ENABLED_DESCRIPTION }, 273 IDS_NETWORK_PREDICTION_ENABLED_DESCRIPTION },
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1519 allowed); 1517 allowed);
1520 } 1518 }
1521 1519
1522 void BrowserOptionsHandler::RemoveCloudPrintConnectorSection() { 1520 void BrowserOptionsHandler::RemoveCloudPrintConnectorSection() {
1523 web_ui()->CallJavascriptFunction( 1521 web_ui()->CallJavascriptFunction(
1524 "BrowserOptions.removeCloudPrintConnectorSection"); 1522 "BrowserOptions.removeCloudPrintConnectorSection");
1525 } 1523 }
1526 #endif // defined(OS_CHROMEOS) 1524 #endif // defined(OS_CHROMEOS)
1527 #endif // defined(ENABLE_FULL_PRINTING) 1525 #endif // defined(ENABLE_FULL_PRINTING)
1528 1526
1529 void BrowserOptionsHandler::SendHotwordAvailable() { 1527 void BrowserOptionsHandler::HandleRequestHotwordAvailable(
1528 const base::ListValue* args) {
1530 std::string group = base::FieldTrialList::FindFullName("VoiceTrigger"); 1529 std::string group = base::FieldTrialList::FindFullName("VoiceTrigger");
1531 if (group != "" && group != "Disabled") 1530 if (group != "" && group != "Disabled")
1532 web_ui()->CallJavascriptFunction("BrowserOptions.showHotwordSection"); 1531 web_ui()->CallJavascriptFunction("BrowserOptions.showHotwordSection");
1533 } 1532 }
1534 1533
1535 void BrowserOptionsHandler::HandleRequestHotwordAvailable(
1536 const base::ListValue* args) {
1537 SendHotwordAvailable();
1538 }
1539
1540 #if defined(OS_CHROMEOS) 1534 #if defined(OS_CHROMEOS)
1541 void BrowserOptionsHandler::HandleOpenWallpaperManager( 1535 void BrowserOptionsHandler::HandleOpenWallpaperManager(
1542 const base::ListValue* args) { 1536 const base::ListValue* args) {
1543 wallpaper_manager_util::OpenWallpaperManager(); 1537 wallpaper_manager_util::OpenWallpaperManager();
1544 } 1538 }
1545 1539
1546 void BrowserOptionsHandler::VirtualKeyboardChangeCallback( 1540 void BrowserOptionsHandler::VirtualKeyboardChangeCallback(
1547 const base::ListValue* args) { 1541 const base::ListValue* args) {
1548 bool enabled = false; 1542 bool enabled = false;
1549 args->GetBoolean(0, &enabled); 1543 args->GetBoolean(0, &enabled);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 void BrowserOptionsHandler::SetupManagingSupervisedUsers() { 1711 void BrowserOptionsHandler::SetupManagingSupervisedUsers() {
1718 bool has_users = !Profile::FromWebUI(web_ui())-> 1712 bool has_users = !Profile::FromWebUI(web_ui())->
1719 GetPrefs()->GetDictionary(prefs::kManagedUsers)->empty(); 1713 GetPrefs()->GetDictionary(prefs::kManagedUsers)->empty();
1720 base::FundamentalValue has_users_value(has_users); 1714 base::FundamentalValue has_users_value(has_users);
1721 web_ui()->CallJavascriptFunction( 1715 web_ui()->CallJavascriptFunction(
1722 "BrowserOptions.updateManagesSupervisedUsers", 1716 "BrowserOptions.updateManagesSupervisedUsers",
1723 has_users_value); 1717 has_users_value);
1724 } 1718 }
1725 1719
1726 } // namespace options 1720 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698