| Index: chrome/browser/instant/instant_controller.h
|
| diff --git a/chrome/browser/instant/instant_controller.h b/chrome/browser/instant/instant_controller.h
|
| index 5661ba1cac97046f4c2e227e8beee17abb1e9a1d..42256c99fb8e599e21787380a13e87c06a613e67 100644
|
| --- a/chrome/browser/instant/instant_controller.h
|
| +++ b/chrome/browser/instant/instant_controller.h
|
| @@ -84,12 +84,12 @@ class InstantController {
|
| // CommitInstant() on the browser, and returns true. Else, returns false.
|
| bool CommitIfCurrent(InstantCommitType type);
|
|
|
| - // The omnibox has lost focus. Commit or discard the preview accordingly.
|
| - void OmniboxLostFocus(gfx::NativeView view_gaining_focus);
|
| -
|
| - // The omnibox has gained focus. Preload the default search engine, in
|
| - // anticipation of the user typing a query.
|
| - void OmniboxGotFocus();
|
| + // Called to indicate that the omnibox focus state changed with the given
|
| + // |reason|. If |focus_state| is FOCUS_NONE, |view_gaining_focus| is set to
|
| + // the view gaining focus.
|
| + void OmniboxFocusChanged(OmniboxFocusState focus_state,
|
| + OmniboxFocusChangeReason reason,
|
| + gfx::NativeView view_gaining_focus);
|
|
|
| // The search mode in the active tab has changed. Pass the message down to
|
| // the loader which will notify the renderer. Create |instant_tab_| if the
|
| @@ -150,6 +150,9 @@ class InstantController {
|
| FRIEND_TEST_ALL_PREFIXES(InstantTest, NonInstantSearchProvider);
|
| FRIEND_TEST_ALL_PREFIXES(InstantTest, InstantLoaderRefresh);
|
|
|
| + // Helper for OmniboxFocusChanged. Commit or discard the preview.
|
| + void OmniboxLostFocus(gfx::NativeView view_gaining_focus);
|
| +
|
| // Creates a new loader if necessary, using the instant_url property of the
|
| // |template_url| (for example, if the Instant URL has changed since the last
|
| // time the loader was created). Returns false if the |template_url| doesn't
|
| @@ -240,8 +243,8 @@ class InstantController {
|
| // Used to ensure that the preview page is committable.
|
| bool last_match_was_search_;
|
|
|
| - // True if the omnibox is focused, false otherwise.
|
| - bool is_omnibox_focused_;
|
| + // Omnibox focus state.
|
| + OmniboxFocusState omnibox_focus_state_;
|
|
|
| // The search model mode for the active tab.
|
| chrome::search::Mode search_mode_;
|
|
|