Index: chrome/browser/ui/search/instant_page.h |
diff --git a/chrome/browser/ui/search/instant_page.h b/chrome/browser/ui/search/instant_page.h |
index 8bb5f2c426db24f8ab2cb9936f98e61d1751bd3f..3bb7270e5093848b7a3704dcb973adbac7b98178 100644 |
--- a/chrome/browser/ui/search/instant_page.h |
+++ b/chrome/browser/ui/search/instant_page.h |
@@ -11,6 +11,7 @@ |
#include "base/compiler_specific.h" |
#include "base/string16.h" |
#include "chrome/common/instant_types.h" |
+#include "chrome/common/omnibox_focus_state.h" |
#include "content/public/browser/web_contents_observer.h" |
#include "content/public/common/page_transition_types.h" |
@@ -65,19 +66,10 @@ class InstantPage : public content::WebContentsObserver { |
int height, |
InstantSizeUnits units) = 0; |
- // Called when the page wants the omnibox to be focused. |
- virtual void FocusOmnibox(const content::WebContents* contents) = 0; |
- |
- // Called when the page wants the omnibox to start capturing user key |
- // strokes. If this call is processed successfully, the omnibox will not |
- // look focused visibly but any user key strokes will go to the omnibox. |
- // Currently, this is implemented by focusing the omnibox invisibly. |
- virtual void StartCapturingKeyStrokes( |
- const content::WebContents* contents) = 0; |
- |
- // Called when the page wants the omnibox to stop capturing user key |
- // strokes. |
- virtual void StopCapturingKeyStrokes(content::WebContents* contents) = 0; |
+ // Called when the page wants the omnibox to be focused. |state| specifies |
+ // the omnibox focus state. |
+ virtual void FocusOmnibox(const content::WebContents* contents, |
+ OmniboxFocusState state) = 0; |
// Called when the page wants to navigate to |url|. Usually used by the |
// page to navigate to privileged destinations (e.g. chrome:// URLs) or to |
@@ -204,8 +196,6 @@ class InstantPage : public content::WebContentsObserver { |
virtual bool ShouldProcessSetSuggestions(); |
virtual bool ShouldProcessShowInstantOverlay(); |
virtual bool ShouldProcessFocusOmnibox(); |
- virtual bool ShouldProcessStartCapturingKeyStrokes(); |
- virtual bool ShouldProcessStopCapturingKeyStrokes(); |
virtual bool ShouldProcessNavigateToURL(); |
private: |
@@ -232,9 +222,7 @@ class InstantPage : public content::WebContentsObserver { |
void OnShowInstantOverlay(int page_id, |
int height, |
InstantSizeUnits units); |
- void OnFocusOmnibox(int page_id); |
- void OnStartCapturingKeyStrokes(int page_id); |
- void OnStopCapturingKeyStrokes(int page_id); |
+ void OnFocusOmnibox(int page_id, OmniboxFocusState state); |
void OnSearchBoxNavigate(int page_id, |
const GURL& url, |
content::PageTransition transition, |