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_INSTANT_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 // Returns whether input is in progress, i.e. if the omnibox has focus and the | 263 // Returns whether input is in progress, i.e. if the omnibox has focus and the |
264 // active tab is in mode SEARCH_SUGGESTIONS. | 264 // active tab is in mode SEARCH_SUGGESTIONS. |
265 bool IsInputInProgress() const; | 265 bool IsInputInProgress() const; |
266 | 266 |
267 // Returns true if the local page is being used. | 267 // Returns true if the local page is being used. |
268 bool UsingLocalPage() const; | 268 bool UsingLocalPage() const; |
269 | 269 |
270 // Returns the InstantService for the browser profile. | 270 // Returns the InstantService for the browser profile. |
271 InstantService* GetInstantService() const; | 271 InstantService* GetInstantService() const; |
272 | 272 |
| 273 // Removes recommended URLs if a matching URL is already open in the Browser, |
| 274 // if the Most Visited Tile Placement experiment is enabled, and the client is |
| 275 // in the experiment group. |
| 276 void MaybeRemoveMostVisitedItems(std::vector<InstantMostVisitedItem>* items); |
| 277 |
273 BrowserInstantController* const browser_; | 278 BrowserInstantController* const browser_; |
274 | 279 |
275 // Whether the extended API and regular API are enabled. If both are false, | 280 // Whether the extended API and regular API are enabled. If both are false, |
276 // Instant is effectively disabled. | 281 // Instant is effectively disabled. |
277 const bool extended_enabled_; | 282 const bool extended_enabled_; |
278 | 283 |
279 // The instances of InstantPage maintained by InstantController. | 284 // The instances of InstantPage maintained by InstantController. |
280 scoped_ptr<InstantNTP> ntp_; | 285 scoped_ptr<InstantNTP> ntp_; |
281 scoped_ptr<InstantTab> instant_tab_; | 286 scoped_ptr<InstantTab> instant_tab_; |
282 | 287 |
(...skipping 10 matching lines...) Expand all Loading... |
293 // its suggestions with the omnibox. | 298 // its suggestions with the omnibox. |
294 gfx::Rect omnibox_bounds_; | 299 gfx::Rect omnibox_bounds_; |
295 | 300 |
296 // List of events and their timestamps, useful in debugging Instant behaviour. | 301 // List of events and their timestamps, useful in debugging Instant behaviour. |
297 mutable std::list<std::pair<int64, std::string> > debug_events_; | 302 mutable std::list<std::pair<int64, std::string> > debug_events_; |
298 | 303 |
299 DISALLOW_COPY_AND_ASSIGN(InstantController); | 304 DISALLOW_COPY_AND_ASSIGN(InstantController); |
300 }; | 305 }; |
301 | 306 |
302 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ | 307 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ |
OLD | NEW |