| 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 const std::vector<InstantMostVisitedItemIDPair>& items); | 371 const std::vector<InstantMostVisitedItemIDPair>& items); |
| 372 | 372 |
| 373 // If possible, tries to mutate |suggestion| to a valid suggestion. Returns | 373 // If possible, tries to mutate |suggestion| to a valid suggestion. Returns |
| 374 // true if successful. (Note that |suggestion| may be modified even if this | 374 // true if successful. (Note that |suggestion| may be modified even if this |
| 375 // returns false.) | 375 // returns false.) |
| 376 bool FixSuggestion(InstantSuggestion* suggestion) const; | 376 bool FixSuggestion(InstantSuggestion* suggestion) const; |
| 377 | 377 |
| 378 // Returns true if the local page is being used. | 378 // Returns true if the local page is being used. |
| 379 bool UsingLocalPage() const; | 379 bool UsingLocalPage() const; |
| 380 | 380 |
| 381 // Sends the Escape key press event to the InstantPage. |
| 382 void OnEscKeyPressed() const; |
| 383 |
| 381 BrowserInstantController* const browser_; | 384 BrowserInstantController* const browser_; |
| 382 | 385 |
| 383 // Whether the extended API and regular API are enabled. If both are false, | 386 // Whether the extended API and regular API are enabled. If both are false, |
| 384 // Instant is effectively disabled. | 387 // Instant is effectively disabled. |
| 385 const bool extended_enabled_; | 388 const bool extended_enabled_; |
| 386 bool instant_enabled_; | 389 bool instant_enabled_; |
| 387 | 390 |
| 388 // If true, the Instant URL is set to kChromeSearchLocalNtpUrl. | 391 // If true, the Instant URL is set to kChromeSearchLocalNtpUrl. |
| 389 bool use_local_page_only_; | 392 bool use_local_page_only_; |
| 390 | 393 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 // Used for Top Sites async retrieval. | 474 // Used for Top Sites async retrieval. |
| 472 base::WeakPtrFactory<InstantController> weak_ptr_factory_; | 475 base::WeakPtrFactory<InstantController> weak_ptr_factory_; |
| 473 | 476 |
| 474 // Used to get notifications about Most Visted changes. | 477 // Used to get notifications about Most Visted changes. |
| 475 content::NotificationRegistrar registrar_; | 478 content::NotificationRegistrar registrar_; |
| 476 | 479 |
| 477 DISALLOW_COPY_AND_ASSIGN(InstantController); | 480 DISALLOW_COPY_AND_ASSIGN(InstantController); |
| 478 }; | 481 }; |
| 479 | 482 |
| 480 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ | 483 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ |
| OLD | NEW |