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 3f77b87c17383018f30bb64433abb9607f5d3ed1..3f26a3d750c5e5186f96fda91f7f9f2917417014 100644 |
--- a/chrome/browser/ui/search/search_model.h |
+++ b/chrome/browser/ui/search/search_model.h |
@@ -16,20 +16,21 @@ class SearchModelObserver; |
class SearchModel { |
public: |
struct State { |
- State() : top_bars_visible(true) {} |
- State(const SearchMode& mode, bool top_bars_visible) |
- : mode(mode), |
- top_bars_visible(top_bars_visible) {} |
+ State(); |
+ State(const SearchMode& mode, |
+ bool top_bars_visible, |
+ bool voice_search_supported); |
- bool operator==(const State& rhs) const { |
- return mode == rhs.mode && top_bars_visible == rhs.top_bars_visible; |
- } |
+ bool operator==(const State& rhs) const; |
// The display mode of UI elements such as the toolbar, the tab strip, etc. |
SearchMode mode; |
// The visibility of top bars such as bookmark and info bars. |
bool top_bars_visible; |
+ |
+ // Whether the page supports voice search. |
+ bool voice_search_supported; |
}; |
SearchModel(); |
@@ -58,6 +59,13 @@ class SearchModel { |
// Get the visibility of top bars. |
bool top_bars_visible() const { return state_.top_bars_visible; } |
+ // 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); |