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

Unified Diff: chrome/browser/ui/search/search_model.h

Issue 17132011: Add setVoiceSearchSupported to the searchbox API. This will be used to determine whether to show a … (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebase past 16035020, add test. Created 7 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/search/search_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/search_model.h
diff --git a/chrome/browser/ui/search/search_model.h b/chrome/browser/ui/search/search_model.h
index 0ebee1006115bd9093b8e7fe9a78cfe3ae4cc415..b9a62fb4aa55636226a52c3b943dec052ea26908 100644
--- a/chrome/browser/ui/search/search_model.h
+++ b/chrome/browser/ui/search/search_model.h
@@ -26,7 +26,8 @@ class SearchModel {
State();
State(const SearchMode& mode,
bool top_bars_visible,
- InstantSupportState instant_support);
+ InstantSupportState instant_support,
+ bool voice_search_supported);
bool operator==(const State& rhs) const;
@@ -38,6 +39,9 @@ class SearchModel {
// Does the current page support Instant?
InstantSupportState instant_support;
+
+ // Does the current page support voice search?
+ bool voice_search_supported;
};
SearchModel();
@@ -75,6 +79,13 @@ class SearchModel {
return state_.instant_support;
}
+ // Sets the page voice search support state. Change notifications are sent to
+ // observers.
+ void SetVoiceSearchSupported(bool supported);
+
+ // Gets the voice search support state of the page.
+ bool voice_search_supported() const { return state_.voice_search_supported; }
+
// Add and remove observers.
void AddObserver(SearchModelObserver* observer);
void RemoveObserver(SearchModelObserver* observer);
« no previous file with comments | « no previous file | chrome/browser/ui/search/search_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698