| 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_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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // negative for moving up, positive for moving down. Returns true if Instant | 75 // negative for moving up, positive for moving down. Returns true if Instant |
| 76 // handled the key press. | 76 // handled the key press. |
| 77 bool OnUpOrDownKeyPressed(int count); | 77 bool OnUpOrDownKeyPressed(int count); |
| 78 | 78 |
| 79 // The preview WebContents. May be NULL. InstantController retains ownership. | 79 // The preview WebContents. May be NULL. InstantController retains ownership. |
| 80 content::WebContents* GetPreviewContents() const; | 80 content::WebContents* GetPreviewContents() const; |
| 81 | 81 |
| 82 // Returns true if the Instant preview is showing a search results preview. | 82 // Returns true if the Instant preview is showing a search results preview. |
| 83 bool IsPreviewingSearchResults() const; | 83 bool IsPreviewingSearchResults() const; |
| 84 | 84 |
| 85 // Returns true if an Instant-extended search is currently being done. |
| 86 bool IsInstantExtendedSearch() const; |
| 87 |
| 85 // If the preview is showing search results, commits the preview, calling | 88 // If the preview is showing search results, commits the preview, calling |
| 86 // CommitInstant() on the browser, and returns true. Else, returns false. | 89 // CommitInstant() on the browser, and returns true. Else, returns false. |
| 87 bool CommitIfPossible(InstantCommitType type); | 90 bool CommitIfPossible(InstantCommitType type); |
| 88 | 91 |
| 89 // Called to indicate that the omnibox focus state changed with the given | 92 // Called to indicate that the omnibox focus state changed with the given |
| 90 // |reason|. If |focus_state| is FOCUS_NONE, |view_gaining_focus| is set to | 93 // |reason|. If |focus_state| is FOCUS_NONE, |view_gaining_focus| is set to |
| 91 // the view gaining focus. | 94 // the view gaining focus. |
| 92 void OmniboxFocusChanged(OmniboxFocusState focus_state, | 95 void OmniboxFocusChanged(OmniboxFocusState focus_state, |
| 93 OmniboxFocusChangeReason reason, | 96 OmniboxFocusChangeReason reason, |
| 94 gfx::NativeView view_gaining_focus); | 97 gfx::NativeView view_gaining_focus); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 | 294 |
| 292 // Whether to allow the preview to show search suggestions. In general, the | 295 // Whether to allow the preview to show search suggestions. In general, the |
| 293 // preview is allowed to show search suggestions whenever |search_mode_| is | 296 // preview is allowed to show search suggestions whenever |search_mode_| is |
| 294 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. | 297 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. |
| 295 bool allow_preview_to_show_search_suggestions_; | 298 bool allow_preview_to_show_search_suggestions_; |
| 296 | 299 |
| 297 DISALLOW_COPY_AND_ASSIGN(InstantController); | 300 DISALLOW_COPY_AND_ASSIGN(InstantController); |
| 298 }; | 301 }; |
| 299 | 302 |
| 300 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 303 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
| OLD | NEW |