| Index: chrome/browser/ui/search/search_model.cc
|
| diff --git a/chrome/browser/ui/search/search_model.cc b/chrome/browser/ui/search/search_model.cc
|
| index 53d0fcc9efd245bd685085d5c55051b98176cf6e..42cc4f9a896344ef372aaaf8fa541925d777ac7e 100644
|
| --- a/chrome/browser/ui/search/search_model.cc
|
| +++ b/chrome/browser/ui/search/search_model.cc
|
| @@ -77,6 +77,24 @@ void SearchModel::SetTopBarsVisible(bool visible) {
|
| ModelChanged(old_state, state_));
|
| }
|
|
|
| +void SearchModel::SetSupportsInstant(bool supports_instant) {
|
| + DCHECK(chrome::IsInstantExtendedAPIEnabled())
|
| + << "Please do not try to set the SearchModel mode without first "
|
| + << "checking if Search is enabled.";
|
| +
|
| + InstantSupportState new_instant_support = supports_instant ?
|
| + INSTANT_SUPPORT_YES : INSTANT_SUPPORT_NO;
|
| +
|
| + if (state_.instant_support == new_instant_support)
|
| + return;
|
| +
|
| + const State old_state = state_;
|
| + state_.instant_support = new_instant_support;
|
| +
|
| + FOR_EACH_OBSERVER(SearchModelObserver, observers_,
|
| + ModelChanged(old_state, state_));
|
| +}
|
| +
|
| void SearchModel::AddObserver(SearchModelObserver* observer) {
|
| observers_.AddObserver(observer);
|
| }
|
|
|