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

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

Issue 2885853002: Instant: remove InstantSupportState (Closed)
Patch Set: Created 3 years, 7 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 | « chrome/browser/ui/search/search_delegate.cc ('k') | 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 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_;
« no previous file with comments | « chrome/browser/ui/search/search_delegate.cc ('k') | chrome/browser/ui/search/search_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698