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