| Index: chrome/browser/ui/search/search_ipc_router.cc
|
| diff --git a/chrome/browser/ui/search/search_ipc_router.cc b/chrome/browser/ui/search/search_ipc_router.cc
|
| index 18de36433ac9b8ebd33a1c4cf12ea955f2e99aca..72598b24e363ebc75b62b4870f63050fb80fafbb 100644
|
| --- a/chrome/browser/ui/search/search_ipc_router.cc
|
| +++ b/chrome/browser/ui/search/search_ipc_router.cc
|
| @@ -137,6 +137,13 @@
|
| Send(new ChromeViewMsg_SearchBoxThemeChanged(routing_id(), theme_info));
|
| }
|
|
|
| +void SearchIPCRouter::ToggleVoiceSearch() {
|
| + if (!policy_->ShouldSendToggleVoiceSearch())
|
| + return;
|
| +
|
| + Send(new ChromeViewMsg_SearchBoxToggleVoiceSearch(routing_id()));
|
| +}
|
| +
|
| void SearchIPCRouter::Submit(const base::string16& text,
|
| const EmbeddedSearchRequestParams& params) {
|
| if (!policy_->ShouldSubmitQuery())
|
| @@ -166,6 +173,8 @@
|
| IPC_BEGIN_MESSAGE_MAP(SearchIPCRouter, message)
|
| IPC_MESSAGE_HANDLER(ChromeViewHostMsg_InstantSupportDetermined,
|
| OnInstantSupportDetermined)
|
| + IPC_MESSAGE_HANDLER(ChromeViewHostMsg_SetVoiceSearchSupported,
|
| + OnVoiceSearchSupportDetermined)
|
| IPC_MESSAGE_HANDLER(ChromeViewHostMsg_FocusOmnibox, OnFocusOmnibox);
|
| IPC_MESSAGE_HANDLER(ChromeViewHostMsg_SearchBoxNavigate,
|
| OnSearchBoxNavigate);
|
| @@ -199,6 +208,19 @@
|
| delegate_->OnInstantSupportDetermined(instant_support);
|
| }
|
|
|
| +void SearchIPCRouter::OnVoiceSearchSupportDetermined(
|
| + int page_seq_no,
|
| + bool supports_voice_search) const {
|
| + if (page_seq_no != commit_counter_)
|
| + return;
|
| +
|
| + delegate_->OnInstantSupportDetermined(true);
|
| + if (!policy_->ShouldProcessSetVoiceSearchSupport())
|
| + return;
|
| +
|
| + delegate_->OnSetVoiceSearchSupport(supports_voice_search);
|
| +}
|
| +
|
| void SearchIPCRouter::OnFocusOmnibox(int page_seq_no,
|
| OmniboxFocusState state) const {
|
| if (page_seq_no != commit_counter_)
|
|
|