| 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 462f6c4de163257c1da8de36378901c0b976919f..1be3ad3e48fba1f3469b4589a45eb327a5948f60 100644
|
| --- a/chrome/browser/ui/search/search_model.h
|
| +++ b/chrome/browser/ui/search/search_model.h
|
| @@ -11,52 +11,18 @@
|
|
|
| class SearchModelObserver;
|
|
|
| -// Represents whether a page supports Instant.
|
| -enum InstantSupportState {
|
| - INSTANT_SUPPORT_NO,
|
| - INSTANT_SUPPORT_YES,
|
| -};
|
| -
|
| // An observable model for UI components that care about search model state
|
| // changes.
|
| class SearchModel {
|
| public:
|
| - struct State {
|
| - State();
|
| - State(const SearchMode& mode, InstantSupportState instant_support);
|
| -
|
| - bool operator==(const State& rhs) const;
|
| -
|
| - // The display mode of UI elements such as the toolbar, the tab strip, etc.
|
| - SearchMode mode;
|
| -
|
| - // Does the current page support Instant?
|
| - InstantSupportState instant_support;
|
| - };
|
| -
|
| SearchModel();
|
| ~SearchModel();
|
|
|
| - // Change the state. Change notifications are sent to observers.
|
| - void SetState(const State& state);
|
| -
|
| - // Get the current state.
|
| - const State& state() const { return state_; }
|
| -
|
| // Change the mode. Change notifications are sent to observers.
|
| void SetMode(const SearchMode& mode);
|
|
|
| // Get the active mode.
|
| - const SearchMode& mode() const { return state_.mode; }
|
| -
|
| - // Sets the page instant support state. Change notifications are sent to
|
| - // observers.
|
| - void SetInstantSupportState(InstantSupportState instant_support);
|
| -
|
| - // Gets the instant support state of the page.
|
| - InstantSupportState instant_support() const {
|
| - return state_.instant_support;
|
| - }
|
| + const SearchMode& mode() const { return mode_; }
|
|
|
| // Add and remove observers.
|
| void AddObserver(SearchModelObserver* observer);
|
| @@ -64,7 +30,7 @@ class SearchModel {
|
|
|
| private:
|
| // Current state of model.
|
| - State state_;
|
| + SearchMode mode_;
|
|
|
| // Observers.
|
| base::ObserverList<SearchModelObserver> observers_;
|
|
|