| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 const std::vector<InstantMostVisitedItem>& items) override; | 156 const std::vector<InstantMostVisitedItem>& items) override; |
| 157 | 157 |
| 158 // Invoked to update the instant support state. | 158 // Invoked to update the instant support state. |
| 159 void InstantSupportChanged(bool supports_instant); | 159 void InstantSupportChanged(bool supports_instant); |
| 160 | 160 |
| 161 // Sets the mode of the model based on the current URL of web_contents(). | 161 // Sets the mode of the model based on the current URL of web_contents(). |
| 162 // Only updates the origin part of the mode if |update_origin| is true, | 162 // Only updates the origin part of the mode if |update_origin| is true, |
| 163 // otherwise keeps the current origin. | 163 // otherwise keeps the current origin. |
| 164 void UpdateMode(bool update_origin); | 164 void UpdateMode(bool update_origin); |
| 165 | 165 |
| 166 // Tells the renderer to determine if the page supports the Instant API, which | |
| 167 // results in a call to OnInstantSupportDetermined() when the reply is | |
| 168 // received. | |
| 169 void DetermineIfPageSupportsInstant(); | |
| 170 | |
| 171 OmniboxView* GetOmniboxView(); | 166 OmniboxView* GetOmniboxView(); |
| 172 const OmniboxView* GetOmniboxView() const; | 167 const OmniboxView* GetOmniboxView() const; |
| 173 | 168 |
| 174 Profile* profile() const; | 169 Profile* profile() const; |
| 175 | 170 |
| 176 // Returns whether input is in progress, i.e. if the omnibox has focus and the | 171 // Returns whether input is in progress, i.e. if the omnibox has focus and the |
| 177 // active tab is in mode SEARCH_SUGGESTIONS. | 172 // active tab is in mode SEARCH_SUGGESTIONS. |
| 178 bool IsInputInProgress() const; | 173 bool IsInputInProgress() const; |
| 179 | 174 |
| 180 const bool is_search_enabled_; | 175 const bool is_search_enabled_; |
| 181 | 176 |
| 182 // Model object for UI that cares about search state. | 177 // Model object for UI that cares about search state. |
| 183 SearchModel model_; | 178 SearchModel model_; |
| 184 | 179 |
| 185 content::WebContents* web_contents_; | 180 content::WebContents* web_contents_; |
| 186 | 181 |
| 187 SearchIPCRouter ipc_router_; | 182 SearchIPCRouter ipc_router_; |
| 188 | 183 |
| 189 InstantService* instant_service_; | 184 InstantService* instant_service_; |
| 190 | 185 |
| 191 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); | 186 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); |
| 192 }; | 187 }; |
| 193 | 188 |
| 194 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 189 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| OLD | NEW |