| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_INSTANT_INSTANT_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 const string16& full_text, | 103 const string16& full_text, |
| 104 bool verbatim); | 104 bool verbatim); |
| 105 | 105 |
| 106 // Sets the bounds of the omnibox dropdown, in screen coordinates. | 106 // Sets the bounds of the omnibox dropdown, in screen coordinates. |
| 107 void SetOmniboxBounds(const gfx::Rect& bounds); | 107 void SetOmniboxBounds(const gfx::Rect& bounds); |
| 108 | 108 |
| 109 // Send autocomplete results from |providers| to the preview page. | 109 // Send autocomplete results from |providers| to the preview page. |
| 110 void HandleAutocompleteResults( | 110 void HandleAutocompleteResults( |
| 111 const std::vector<AutocompleteProvider*>& providers); | 111 const std::vector<AutocompleteProvider*>& providers); |
| 112 | 112 |
| 113 // Called when the user presses up or down. |count| is a repeat count, |
| 114 // negative for moving up, positive for moving down. Returns true if Instant |
| 115 // handled the key press. |
| 116 bool OnUpOrDownKeyPressed(int count); |
| 117 |
| 113 // The preview TabContents. May be NULL if ReleasePreviewContents() has been | 118 // The preview TabContents. May be NULL if ReleasePreviewContents() has been |
| 114 // called, with no subsequent successful call to Update(). InstantController | 119 // called, with no subsequent successful call to Update(). InstantController |
| 115 // retains ownership of the object. | 120 // retains ownership of the object. |
| 116 TabContents* GetPreviewContents() const; | 121 TabContents* GetPreviewContents() const; |
| 117 | 122 |
| 118 // Hides the preview, but doesn't destroy it, in hopes it can be subsequently | 123 // Hides the preview, but doesn't destroy it, in hopes it can be subsequently |
| 119 // reused. The preview will not be used until a call to Update() succeeds. | 124 // reused. The preview will not be used until a call to Update() succeeds. |
| 120 void Hide(); | 125 void Hide(); |
| 121 | 126 |
| 122 // Returns true if the Instant preview can be committed now. This can be true | 127 // Returns true if the Instant preview can be committed now. This can be true |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 // Search terms extraction (for autocomplete history matches) doesn't work | 277 // Search terms extraction (for autocomplete history matches) doesn't work |
| 273 // on Instant URLs. So, whenever the user commits an Instant search, we add | 278 // on Instant URLs. So, whenever the user commits an Instant search, we add |
| 274 // an equivalent non-Instant search URL to history, so that the search shows | 279 // an equivalent non-Instant search URL to history, so that the search shows |
| 275 // up in autocomplete history matches. | 280 // up in autocomplete history matches. |
| 276 GURL url_for_history_; | 281 GURL url_for_history_; |
| 277 | 282 |
| 278 DISALLOW_COPY_AND_ASSIGN(InstantController); | 283 DISALLOW_COPY_AND_ASSIGN(InstantController); |
| 279 }; | 284 }; |
| 280 | 285 |
| 281 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 286 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
| OLD | NEW |