Skip to content

Commit

Permalink
Remove hotword related code
Browse files Browse the repository at this point in the history
Bug: 761426
Test: Build and run locally, used browser, settings, voice search
Test: on new tab and no feature seems broken.
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I647a19ec174442ddab5c4c322bfd34c8fc9a75bf
Reviewed-on: https://chromium-review.googlesource.com/740909
Commit-Queue: Xiaohui Chen <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Ben Wells <[email protected]>
Reviewed-by: Matt Giuca <[email protected]>
Reviewed-by: Xiyuan Xia <[email protected]>
Reviewed-by: Ilya Sherman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#519895}
  • Loading branch information
Xiaohui Chen authored and Commit Bot committed Nov 28, 2017
1 parent 141714f commit d693f0c
Show file tree
Hide file tree
Showing 179 changed files with 54 additions and 10,198 deletions.
8 changes: 0 additions & 8 deletions WATCHLISTS
Original file line number Diff line number Diff line change
Expand Up @@ -907,13 +907,6 @@
'filepath': 'chrome/browser/resources/(md_)?history|'\
'chrome/browser/ui/webui/.*history',
},
'hotword': {
'filepath': 'chrome/browser/extensions/api/hotword_private/'\
'|chrome/browser/resources/hotword_helper/'\
'|chrome/browser/resources/hotword/'\
'|chrome/browser/search/hotword*'\
'|chrome/test/data/extensions/api_test/hotword_private/',
},
'i18n': {
'filepath': 'base/i18n/|base/string|l10n|icu|'\
'locale_settings|encoding',
Expand Down Expand Up @@ -2049,7 +2042,6 @@
'gpu_passthrough_cmd_decoder': ['[email protected]',
'[email protected]'],
'history_ui': ['[email protected]'],
'hotword': ['[email protected]'],
'i18n': ['[email protected]'],
'importer': ['[email protected]'],
'incident_reporting': ['[email protected]'],
Expand Down
12 changes: 3 additions & 9 deletions ash/app_list/model/search_box_model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,10 @@
namespace app_list {

SearchBoxModel::SpeechButtonProperty::SpeechButtonProperty(
const gfx::ImageSkia& on_icon,
const base::string16& on_tooltip,
const gfx::ImageSkia& off_icon,
const base::string16& off_tooltip,
const gfx::ImageSkia& icon,
const base::string16& tooltip,
const base::string16& accessible_name)
: on_icon(on_icon),
on_tooltip(on_tooltip),
off_icon(off_icon),
off_tooltip(off_tooltip),
accessible_name(accessible_name) {}
: icon(icon), tooltip(tooltip), accessible_name(accessible_name) {}

SearchBoxModel::SpeechButtonProperty::~SpeechButtonProperty() = default;

Expand Down
17 changes: 6 additions & 11 deletions ash/app_list/model/search_box_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_APP_LIST_MODEL_SEARCH_BOX_MODEL_H_
#define ASH_APP_LIST_MODEL_SEARCH_BOX_MODEL_H_

#include <memory>

#include "ash/app_list/model/app_list_model_export.h"
#include "base/macros.h"
#include "base/observer_list.h"
Expand All @@ -25,20 +27,13 @@ class APP_LIST_MODEL_EXPORT SearchBoxModel {
public:
// The properties of the speech button.
struct APP_LIST_MODEL_EXPORT SpeechButtonProperty {
SpeechButtonProperty(const gfx::ImageSkia& on_icon,
const base::string16& on_tooltip,
const gfx::ImageSkia& off_icon,
const base::string16& off_tooltip,
SpeechButtonProperty(const gfx::ImageSkia& icon,
const base::string16& tooltip,
const base::string16& accessible_name);
~SpeechButtonProperty();

// The icon/tooltip when the hotword is on.
gfx::ImageSkia on_icon;
base::string16 on_tooltip;

// The icon/tooltip when the hotword is off.
gfx::ImageSkia off_icon;
base::string16 off_tooltip;
gfx::ImageSkia icon;
base::string16 tooltip;

// The accessibility name of the button.
base::string16 accessible_name;
Expand Down
134 changes: 0 additions & 134 deletions chrome/app/generated_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -4799,15 +4799,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
Set which search engine is used when searching from the
<ph name="BEGIN_LINK">&lt;a target="_blank" href="$1"&gt;</ph>omnibox<ph name="END_LINK">&lt;/a&gt;<ex>&lt;/a&gt;</ex></ph>.
</message>
<message name="IDS_HOTWORD_GENERIC_ERROR_MESSAGE" desc="The default error message text when no additional details are known.">
This feature is temporarily unavailable. <ph name="BEGIN_LINK">&lt;a target="_blank" href="$1"&gt;</ph>Help<ph name="END_LINK">&lt;/a&gt;<ex>&lt;/a&gt;</ex></ph>
</message>
<message name="IDS_HOTWORD_NACL_DISABLED_ERROR_MESSAGE" desc="The error message text when hotwording fails because NaCl is disabled.">
Native Client plugin needs to be enabled to use this feature.
</message>
<message name="IDS_HOTWORD_MICROPHONE_ERROR_MESSAGE" desc="The error message text when hotwording fails because the microphone isn't working.">
Microphone is currently unavailable. <ph name="BEGIN_LINK">&lt;a target="_blank" href="chrome://settings/content#media-stream-settings"&gt;</ph>Manage microphone<ph name="END_LINK">&lt;/a&gt;<ex>&lt;/a&gt;</ex></ph>
</message>
<if expr="is_win">
<!-- Conflicts page -->
<message name="IDS_CONFLICTS_CHECK_PAGE_TABLE_TITLE_SUFFIX_ONE" desc="What gets appended after the page title if no conflicts were found.">
Expand Down Expand Up @@ -5079,16 +5070,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
This page uses a Native Client app that doesn't work on your computer.
</message>

<!-- chrome://voicesearch strings -->
<if expr="chromeos">
<message name="IDS_VOICESEARCH_LOADING_MESSAGE" desc="Shown while loading until full list of modules is retrieved">
Loading...
</message>
<message name="IDS_VOICESEARCH_TITLE_MESSAGE" desc="Shown while loading until full list of modules is retrieved">
About Voice Search
</message>
</if>

<!-- About box strings -->
<if expr="is_win">
<message name="IDS_ABOUT_BOX_ERROR_DURING_UPDATE_CHECK" desc="The error label for errors that occurred while checking for updates in the About box.">
Expand Down Expand Up @@ -9882,9 +9863,6 @@ For more information, visit our <ph name="BEGIN_LINK">&lt;a target="_blank" href
<message name="IDS_APP_LIST_START_SPEECH_RECOGNITION" desc="Tooltip text for the button to start the speech recognition.">
Click to start voice search
</message>
<message name="IDS_APP_LIST_HOTWORD_LISTENING" desc="Tooltip text for the mic button when it waits for the hotword.">
Click, or say "Ok Google" to start voice search
</message>
<message name="IDS_SEARCH_BOX_ACCESSIBILITY_NAME" desc="Hint text for the search box in fullscreen app list window with additional instructions to use the arrow keys in Accessibility mode.">
Search your device, apps, and web. Use the arrow keys to navigate your apps.
</message>
Expand All @@ -9897,9 +9875,6 @@ For more information, visit our <ph name="BEGIN_LINK">&lt;a target="_blank" href
<message name="IDS_SEARCH_BOX_HINT_FULLSCREEN" desc="Hint text for the search box in fullscreen app list window.">
Search your device, apps, web...
</message>
<message name="IDS_SEARCH_BOX_HOTWORD_HINT" desc="Hint text for the search box in app list window when the hotword is enabled.">
Search, or say "Ok Google"
</message>
<if expr="not use_titlecase">
<message name="IDS_APP_LIST_CONTEXT_MENU_NEW_TAB" desc="Title text for the 'open new' context menu item of an app list item configured to open in a tab">
New tab
Expand Down Expand Up @@ -10536,115 +10511,6 @@ For more information, visit our <ph name="BEGIN_LINK">&lt;a target="_blank" href
Select
</message>

<!-- Hotword Audio Verification (opt-in) App strings. -->
<message name="IDS_HOTWORD_BROWSER_NAME" desc="Name of the device when we're not running in CrOS">
<ph name="IDS_SHORT_PRODUCT_NAME">$1<ex>Chromium</ex></ph> browser
</message>
<message name="IDS_HOTWORD_OPT_IN_CLOSE" desc="Label for the close button for the 'Ok Google' hotword opt-in dialog.">
Close
</message>
<message name="IDS_HOTWORD_OPT_IN_CANCEL" desc="Text on the cancel button for the 'Ok Google' hotword opt-in dialog.">
CANCEL
</message>
<message name="IDS_HOTWORD_OPT_IN_INTRO_TITLE" desc="Title of the intro page of the 'Ok Google' hotword opt-in dialog.">
Voice search at any time
</message>
<message name="IDS_HOTWORD_OPT_IN_INTRO_SUBTITLE" desc="Sub-title of the intro page of the 'Ok Google' hotword opt-in dialog.">
Say "Ok Google" when your screen is on and unlocked
</message>
<message name="IDS_HOTWORD_OPT_IN_INTRO_DESCRIPTION" desc="Description explaining the steps required to continue through the hotword opt-in process.">
To make this happen, you'll need to enable Voice &amp; Audio Activity and train your <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph> in the following steps.
</message>
<message name="IDS_HOTWORD_OPT_IN_INTRO_DESCRIPTION_AUDIO_HISTORY_ENABLED" desc="Description explaining the steps required to continue through the hotword opt-in process.">
To make this happen, you'll need to train your <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph> in the following step.
</message>
<message name="IDS_HOTWORD_OPT_IN_INTRO_START" desc="Text on the start button for the 'Ok Google' hotword opt-in dialog.">
Get Started
</message>
<message name="IDS_HOTWORD_OPT_IN_AUDIO_HISTORY_TITLE" desc="Title of the Audio History page of the 'Ok Google' hotword opt-in dialog.">
Enable Voice &amp; Audio Activity
</message>
<message name="IDS_HOTWORD_OPT_IN_AUDIO_HISTORY_DESCRIPTION_1" desc="Description of the Audio History page of the 'Ok Google' hotword opt-in dialog.">
When you use audio activation commands, such as "Ok Google" or touching a microphone icon, your private Voice &amp; Audio Activity stores some voice and other audio to your account. A recording of the following speech/audio, plus a few seconds before, will be stored.
</message>
<message name="IDS_HOTWORD_OPT_IN_AUDIO_HISTORY_DESCRIPTION_2" desc="Description of the Audio History page of the 'Ok Google' hotword opt-in dialog.">
This helps Google recognize your voice and improve speech and audio recognition in order to give you results faster and with fewer hassles. <ph name="BEGIN_LINK">&lt;a target="_blank" href="https://support.google.com/websearch?p=chromebook_audiohistory"&gt;</ph>Learn more<ph name="END_LINK">&lt;/a&gt;<ex>&lt;/a&gt;</ex></ph>
</message>
<message name="IDS_HOTWORD_OPT_IN_AUDIO_HISTORY_DESCRIPTION_3" desc="Description of the Audio History page of the 'Ok Google' hotword opt-in dialog.">
You can change this setting or <ph name="BEGIN_LINK">&lt;a target="_blank" href="https://history.google.com/history/audio"&gt;</ph>manage your private data<ph name="END_LINK">&lt;/a&gt;<ex>&lt;/a&gt;</ex></ph> whenever you like. Please remember that when Voice &amp; Audio Activity is on, this data may be saved from any of your signed-in devices.
</message>
<message name="IDS_HOTWORD_OPT_IN_AUDIO_HISTORY_AGREE" desc="Text on the agree button for the Audio History section of the 'Ok Google' hotword opt-in dialog.">
Enable
</message>
<message name="IDS_HOTWORD_OPT_IN_AUDIO_HISTORY_WAIT" desc="Text displayed when waiting for Audio History setting in the 'Ok Google' hotword opt-in dialog.">
Enabling Voice &amp; Audio Activity...
</message>
<message name="IDS_HOTWORD_OPT_IN_ERROR" desc="Text displayed on error setting Audio History and training in the 'Ok Google' hotword opt-in dialog.">
Something went wrong. Please try again.
</message>
<message name="IDS_HOTWORD_OPT_IN_TRAINING_TITLE" desc="Title of the voice model training page of the 'Ok Google' hotword opt-in dialog.">
Let's train your <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph>
</message>
<message name="IDS_HOTWORD_OPT_IN_TRAINING_DESCRIPTION" desc="Description on the voice model training page of the 'Ok Google' hotword opt-in dialog.">
To help your <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph> respond to you and for reliable and easy access to voice search, you need to teach Google the sound of your voice.
</message>
<message name="IDS_HOTWORD_OPT_IN_TRAINING_SPEAK" desc="The text describing the action the user should take on the voice model training page of the 'Ok Google' hotword opt-in dialog.">
Just say "Ok Google" three times
</message>
<message name="IDS_HOTWORD_OPT_IN_TRAINING_FIRST_PROMPT" desc="The first prompt text on the voice model training page of the 'Ok Google' hotword opt-in dialog.">
Say "Ok Google"
</message>
<message name="IDS_HOTWORD_OPT_IN_TRAINING_MIDDLE_PROMPT" desc="The middle prompt text on the voice model training page of the 'Ok Google' hotword opt-in dialog.">
Say "Ok Google" again
</message>
<message name="IDS_HOTWORD_OPT_IN_TRAINING_LAST_PROMPT" desc="The last prompt text on the voice model training page of the 'Ok Google' hotword opt-in dialog.">
Say "Ok Google" one last time
</message>
<message name="IDS_HOTWORD_OPT_IN_TRAINING_RECORDED" desc="The message displayed when an 'Ok Google' utterance has been completed.">
Complete
</message>
<message name="IDS_HOTWORD_OPT_IN_TRAINING_TIMEOUT" desc="The message displayed when an 'Ok Google' training has time out.">
Training timed out
</message>
<message name="IDS_HOTWORD_OPT_IN_TRAINING_RETRY" desc="Text on the retry button of the voice model training page of the 'Ok Google' hotword opt-in dialog.">
RETRY
</message>
<message name="IDS_HOTWORD_OPT_IN_FINISHED_TITLE" desc="Title of the finished page of the 'Ok Google' hotword opt-in dialog.">
You're all set!
</message>
<message name="IDS_HOTWORD_OPT_IN_FINISHED_LIST_INTRO" desc="The text at the beginning of the list describing the Chromebook's new abilities. ">
Your <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph> can now:
</message>
<message name="IDS_HOTWORD_OPT_IN_FINISHED_LIST_ITEM_1" desc="The text of the first item in the list of Chromebook abilities. ">
Recognize your voice when you say "Ok Google"
</message>
<message name="IDS_HOTWORD_OPT_IN_FINISHED_LIST_ITEM_2" desc="The text of the second item in the list of Chromebook abilities. ">
Respond to "Ok Google" when the screen is on and unlocked
</message>
<message name="IDS_HOTWORD_OPT_IN_FINISHED_SETTINGS" desc="The text indicating where the user can change their Chrome settings. ">
You can change this at any time in <ph name="BEGIN_LINK">&lt;a target="_blank" href="#" id="settings-link"&gt;</ph>Chrome Settings<ph name="END_LINK">&lt;/a&gt;<ex>&lt;/a&gt;</ex></ph>.
</message>
<message name="IDS_HOTWORD_OPT_IN_FINISHED_AUDIO_HISTORY" desc="The text indicating where the user can change their account history. ">
Search queries will be tied to your Google Account. You can view and delete them in your <ph name="BEGIN_LINK">&lt;a target="_blank" href="https://www.google.com/settings/accounthistory"&gt;</ph>Account History<ph name="END_LINK">&lt;/a&gt;<ex>&lt;/a&gt;</ex></ph>.
</message>
<message name="IDS_HOTWORD_OPT_IN_FINISH" desc="Text on the finish button for the 'Ok Google' hotword opt-in dialog.">
OK
</message>
<message name="IDS_HOTWORD_OPT_IN_FINISHED_WAIT" desc="The text displayed when waiting for the voice model training to complete.">
Processing...
</message>

<!-- Hotword Notification -->
<message name="IDS_HOTWORD_NOTIFICATION_TITLE" desc="The text displayed as the title for the hotword notification. ">
Voice search at any time
</message>
<message name="IDS_HOTWORD_NOTIFICATION_DESCRIPTION" desc="The text displayed as the description for the hotword notification. ">
Enable "Ok Google" to voice search when your screen is on and unlocked
</message>
<message name="IDS_HOTWORD_NOTIFICATION_BUTTON" desc="The text displayed on the button of the hotword notification. ">
Enable "Ok Google"
</message>

<!-- About device logs UI display strings -->
<message name="IDS_DEVICE_LOG_TITLE" desc="Title of the chrome://device-log page">
Device Log
Expand Down
30 changes: 0 additions & 30 deletions chrome/app/settings_strings.grdp
Original file line number Diff line number Diff line change
Expand Up @@ -2243,36 +2243,6 @@
<message name="IDS_SETTINGS_SEARCH_MANAGE_SEARCH_ENGINES" desc="Label for the Manage Search Engines button.">
Manage search engines
</message>
<message name="IDS_SETTINGS_SEARCH_OK_GOOGLE_LABEL" desc="Label for the checkbox which enables the OK Google hotword.">
Enable "Ok Google" to start a voice search
</message>
<if expr="chromeos">
<message name="IDS_SETTINGS_SEARCH_OK_GOOGLE_DISABLED" desc="Label to indicate to the user that the OK Google hotword has been disabled.">
"Ok Google" voice search has been removed from Chrome OS
</message>
</if>
<message name="IDS_SETTINGS_SEARCH_OK_GOOGLE_SUBTEXT_ALWAYS_ON" desc="Subtext describing when the OK Google hotword may be used.">
Say "Ok Google" when the screen is on and unlocked
</message>
<if expr="chromeos">
<message name="IDS_SETTINGS_SEARCH_OK_GOOGLE_SUBTEXT_NO_HARDWARE" desc="Subtext describing when the OK Google hotword may be used for devices without hardware support.">
Say "Ok Google" in a new tab, google.com, and the App Launcher
</message>
</if>
<if expr="not chromeos">
<message name="IDS_SETTINGS_SEARCH_OK_GOOGLE_SUBTEXT_NO_HARDWARE" desc="Subtext describing when the OK Google hotword may be used for devices with no hardware support.">
Say "Ok Google" in a new tab and google.com
</message>
</if>
<message name="IDS_SETTINGS_SEARCH_OK_GOOGLE_AUDIO_HISTORY_LABEL" desc="Text to display when the user has audio history enabled.">
Voice and Audio Activity for <ph name="USER_EMAIL">$1<ex>[email protected]</ex></ph>.
</message>
<message name="IDS_SETTINGS_SEARCH_OK_GOOGLE_AUDIO_HISTORY_SUBTEXT" desc="Subtext describing why audio history is enabled.">
Enabled (required to use "Ok Google")
</message>
<message name="IDS_SETTINGS_SEARCH_OK_GOOGLE_RETRAIN" desc="Text for button to retrain the OK Google hotword voice model.">
Retrain
</message>
<if expr="chromeos">
<message name="IDS_SETTINGS_SEARCH_GOOGLE_ASSISTANT" desc="Label for the Google Assistant button.">
Google Assistant
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 0 additions & 3 deletions chrome/app/theme/theme_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
</if>
<if expr="enable_app_list">
<structure type="chrome_scaled_image" name="IDR_APP_LIST_TAB_OVERLAY" file="common/app_list_v1_overlay.png" />
<structure type="chrome_scaled_image" name="IDR_APP_LIST_MIC_HOTWORD_OFF" file="common/app_list_mic_hotword_off.png" />
<structure type="chrome_scaled_image" name="IDR_APP_LIST_MIC_HOTWORD_ON" file="common/app_list_mic_hotword_on.png" />
</if>
<if expr="toolkit_views and not is_macosx">
<structure type="chrome_scaled_image" name="IDR_APP_WINDOW_CLOSE" file="common/app_window_close.png" />
Expand Down Expand Up @@ -200,7 +198,6 @@
<structure type="chrome_scaled_image" name="IDR_HIDE_PASSWORD" file="cros/hide_password.png" />
</if>
<structure type="chrome_scaled_image" name="IDR_HIDE_PASSWORD_HOVER" file="common/hide_password_hover.png" />
<structure type="chrome_scaled_image" name="IDR_HOTWORD_NOTIFICATION_ICON" file="common/notification_hotword_icon.png" />
<if expr="is_macosx">
<structure type="chrome_scaled_image" name="IDR_ICON_PROFILES_ACCOUNT_BUTTON_ERROR" file="legacy/avatar_menu_auth_error.png" />
</if>
Expand Down
11 changes: 0 additions & 11 deletions chrome/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3366,13 +3366,6 @@ split_static_library("browser") {
"renderer_context_menu/context_menu_content_type_platform_app.h",
"renderer_host/chrome_extension_message_filter.cc",
"renderer_host/chrome_extension_message_filter.h",
"search/hotword_audio_history_handler.cc",
"search/hotword_audio_history_handler.h",
"search/hotword_client.h",
"search/hotword_service.cc",
"search/hotword_service.h",
"search/hotword_service_factory.cc",
"search/hotword_service_factory.h",
"signin/chrome_proximity_auth_client.cc",
"signin/chrome_proximity_auth_client.h",
"signin/easy_unlock_app_manager.cc",
Expand Down Expand Up @@ -3542,10 +3535,6 @@ split_static_library("browser") {
]
}

if (enable_hotwording) {
defines += [ "ENABLE_HOTWORDING" ]
}

if (enable_mdns) {
sources += [
"local_discovery/service_discovery_client_impl.cc",
Expand Down
Loading

0 comments on commit d693f0c

Please sign in to comment.