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

Unified Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 460113005: Adds the audio history and always on hotwording settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed errors 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/browser_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index 5f6285b191c8f56231ec6a6df1f536f1a50b0544..57f0ce888964bc1be6373d4cf9f1f86bb48beece 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -277,6 +277,12 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
{ "homePageShowHomeButton", IDS_OPTIONS_TOOLBAR_SHOW_HOME_BUTTON },
{ "homePageUseNewTab", IDS_OPTIONS_HOMEPAGE_USE_NEWTAB },
{ "homePageUseURL", IDS_OPTIONS_HOMEPAGE_USE_URL },
+ { "hotwordAlwaysOnSearchEnable", IDS_HOTWORD_ALWAYS_ON_SEARCH_PREF_CHKBOX },
+ { "hotwordAlwaysOnSearchDescription",
+ IDS_HOTWORD_ALWAYS_ON_SEARCH_PREF_DESCRIPTION },
+ { "hotwordAudioHistoryEnable", IDS_HOTWORD_AUDIO_HISTORY_PREF_CHKBOX },
+ { "hotwordAudioHistoryDescription",
+ IDS_HOTWORD_AUDIO_HISTORY_PREF_DESCRIPTION },
{ "hotwordSearchEnable", IDS_HOTWORD_SEARCH_PREF_CHKBOX },
{ "hotwordConfirmEnable", IDS_HOTWORD_CONFIRM_BUBBLE_ENABLE },
{ "hotwordConfirmDisable", IDS_HOTWORD_CONFIRM_BUBBLE_DISABLE },
@@ -1593,6 +1599,11 @@ void BrowserOptionsHandler::HandleRequestHotwordAvailable(
int error = HotwordServiceFactory::GetCurrentError(profile);
if (!error) {
web_ui()->CallJavascriptFunction("BrowserOptions.showHotwordSection");
Matt Giuca 2014/08/12 08:37:39 While you're here: there's a little "bug" here tha
kcarattini 2014/08/13 03:51:53 Done.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
Matt Giuca 2014/08/12 08:37:39 This should not be here -- move it after this if/e
kcarattini 2014/08/13 03:51:54 Done.
+ switches::kEnableExperimentalHotwording)) {
+ web_ui()->CallJavascriptFunction(
+ "BrowserOptions.showHotwordAlwaysOnSection");
+ }
} else {
base::FundamentalValue enabled(
profile->GetPrefs()->GetBoolean(prefs::kHotwordSearchEnabled));

Powered by Google App Engine
This is Rietveld 408576698