Index: trunk/src/chrome/browser/ui/search/search_model.h |
=================================================================== |
--- trunk/src/chrome/browser/ui/search/search_model.h (revision 204944) |
+++ trunk/src/chrome/browser/ui/search/search_model.h (working copy) |
@@ -11,36 +11,25 @@ |
class SearchModelObserver; |
-// Represents whether a page supports Instant. |
-enum InstantSupportState { |
- INSTANT_SUPPORT_NO, |
- INSTANT_SUPPORT_YES, |
- INSTANT_SUPPORT_UNKNOWN, |
-}; |
- |
// An observable model for UI components that care about search model state |
// changes. |
class SearchModel { |
public: |
struct State { |
- State(); |
- State(const SearchMode& mode, |
- bool top_bars_visible, |
- InstantSupportState instant_support); |
+ State() : top_bars_visible(true) {} |
+ State(const SearchMode& mode, bool top_bars_visible) |
+ : mode(mode), |
+ top_bars_visible(top_bars_visible) {} |
- bool operator==(const State& rhs) const; |
+ bool operator==(const State& rhs) const { |
+ return mode == rhs.mode && top_bars_visible == rhs.top_bars_visible; |
+ } |
// 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; |
- |
- // Does the current page support Instant? |
- // |
- // TODO(kmadhusu): Use bool instead of a tri-state variable. Refer to |
- // crbug.com/246323 for more details. |
- InstantSupportState instant_support; |
}; |
SearchModel(); |
@@ -69,15 +58,6 @@ |
// Get the visibility of top bars. |
bool top_bars_visible() const { return state_.top_bars_visible; } |
- // Set whether the page supports Instant. Change notifications are sent to |
- // observers. |
- void SetSupportsInstant(bool supports_instant); |
- |
- // Get whether the page supports Instant. |
- InstantSupportState instant_support() const { |
- return state_.instant_support; |
- } |
- |
// Add and remove observers. |
void AddObserver(SearchModelObserver* observer); |
void RemoveObserver(SearchModelObserver* observer); |