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

Side by Side Diff: chrome/browser/ui/search/search_tab_helper.h

Issue 1436583002: Revert of Remove setVoiceSearchSupported part of EmbeddedSearch SearchBox API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_
6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // Tells the page that the user pressed Enter in the omnibox. 83 // Tells the page that the user pressed Enter in the omnibox.
84 void Submit(const base::string16& text, 84 void Submit(const base::string16& text,
85 const EmbeddedSearchRequestParams& params); 85 const EmbeddedSearchRequestParams& params);
86 86
87 // Called when the tab corresponding to |this| instance is activated. 87 // Called when the tab corresponding to |this| instance is activated.
88 void OnTabActivated(); 88 void OnTabActivated();
89 89
90 // Called when the tab corresponding to |this| instance is deactivated. 90 // Called when the tab corresponding to |this| instance is deactivated.
91 void OnTabDeactivated(); 91 void OnTabDeactivated();
92 92
93 // Tells the page to toggle voice search.
94 void ToggleVoiceSearch();
95
93 // Returns true if the underlying page is a search results page. 96 // Returns true if the underlying page is a search results page.
94 bool IsSearchResultsPage(); 97 bool IsSearchResultsPage();
95 98
96 void set_delegate(SearchTabHelperDelegate* delegate) { delegate_ = delegate; } 99 void set_delegate(SearchTabHelperDelegate* delegate) { delegate_ = delegate; }
97 100
98 private: 101 private:
99 friend class content::WebContentsUserData<SearchTabHelper>; 102 friend class content::WebContentsUserData<SearchTabHelper>;
100 friend class InstantPageTest; 103 friend class InstantPageTest;
101 friend class SearchIPCRouterPolicyTest; 104 friend class SearchIPCRouterPolicyTest;
102 friend class SearchIPCRouterTest; 105 friend class SearchIPCRouterTest;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 void DidNavigateMainFrame( 151 void DidNavigateMainFrame(
149 const content::LoadCommittedDetails& details, 152 const content::LoadCommittedDetails& details,
150 const content::FrameNavigateParams& params) override; 153 const content::FrameNavigateParams& params) override;
151 void DidFinishLoad(content::RenderFrameHost* render_frame_host, 154 void DidFinishLoad(content::RenderFrameHost* render_frame_host,
152 const GURL& validated_url) override; 155 const GURL& validated_url) override;
153 void NavigationEntryCommitted( 156 void NavigationEntryCommitted(
154 const content::LoadCommittedDetails& load_details) override; 157 const content::LoadCommittedDetails& load_details) override;
155 158
156 // Overridden from SearchIPCRouter::Delegate: 159 // Overridden from SearchIPCRouter::Delegate:
157 void OnInstantSupportDetermined(bool supports_instant) override; 160 void OnInstantSupportDetermined(bool supports_instant) override;
161 void OnSetVoiceSearchSupport(bool supports_voice_search) override;
158 void FocusOmnibox(OmniboxFocusState state) override; 162 void FocusOmnibox(OmniboxFocusState state) override;
159 void NavigateToURL(const GURL& url, 163 void NavigateToURL(const GURL& url,
160 WindowOpenDisposition disposition, 164 WindowOpenDisposition disposition,
161 bool is_most_visited_item_url) override; 165 bool is_most_visited_item_url) override;
162 void OnDeleteMostVisitedItem(const GURL& url) override; 166 void OnDeleteMostVisitedItem(const GURL& url) override;
163 void OnUndoMostVisitedDeletion(const GURL& url) override; 167 void OnUndoMostVisitedDeletion(const GURL& url) override;
164 void OnUndoAllMostVisitedDeletions() override; 168 void OnUndoAllMostVisitedDeletions() override;
165 void OnLogEvent(NTPLoggingEventType event, base::TimeDelta time) override; 169 void OnLogEvent(NTPLoggingEventType event, base::TimeDelta time) override;
166 void OnLogMostVisitedImpression(int position, 170 void OnLogMostVisitedImpression(int position,
167 const base::string16& provider) override; 171 const base::string16& provider) override;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 SearchTabHelperDelegate* delegate_; 228 SearchTabHelperDelegate* delegate_;
225 229
226 // Function to check if the omnibox has focus. Tests use this to modify the 230 // Function to check if the omnibox has focus. Tests use this to modify the
227 // default behavior. 231 // default behavior.
228 OmniboxHasFocusFn omnibox_has_focus_fn_; 232 OmniboxHasFocusFn omnibox_has_focus_fn_;
229 233
230 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); 234 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper);
231 }; 235 };
232 236
233 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ 237 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_model_unittest.cc ('k') | chrome/browser/ui/search/search_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698