Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Unified Diff: chrome/browser/instant/instant_controller.h

Issue 11413217: Instant API: tell page whether the browser is capturing key strokes. (Closed) Base URL: http://git.chromium.org/chromium/src.git@focus
Patch Set: Finish renaming. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/instant/instant_controller.h
diff --git a/chrome/browser/instant/instant_controller.h b/chrome/browser/instant/instant_controller.h
index f3448cd557667c6f429a69a8d7c9578ee9a5356c..ea908698a758806338495dbfedd914d4142bff0e 100644
--- a/chrome/browser/instant/instant_controller.h
+++ b/chrome/browser/instant/instant_controller.h
@@ -86,7 +86,7 @@ class InstantController {
// The omnibox has gained focus. Preload the default search engine, in
// anticipation of the user typing a query.
- void OmniboxGotFocus();
+ void OmniboxGotFocus(bool focus_is_visible);
// The search mode in the active tab has changed. Pass the message down to
// the loader which will notify the renderer.
@@ -183,6 +183,9 @@ class InstantController {
// Send the omnibox dropdown bounds to the page.
void SendBoundsToPage();
+ // Helper to send key capture mode to the page.
+ void SendKeyCaptureModeToPage();
+
// If |template_url| is a valid TemplateURL for use with Instant, fills in
// |instant_url| and returns true; returns false otherwise.
// Note: If the command-line switch kInstantURL is set, this method uses its
@@ -220,8 +223,13 @@ class InstantController {
// True if the last match passed to Update() was a search (versus a URL).
bool last_match_was_search_;
- // True if the omnibox is focused, false otherwise.
- bool is_omnibox_focused_;
+ // Omnibox focus state.
+ enum OmniboxFocusState {
+ NONE = 0, // Not focused
+ VISIBLE = 1, // Visibly focused
+ INVISIBLE = 2 // Invisibly focused
+ };
+ OmniboxFocusState omnibox_focus_state_;
// The search model mode for the active tab.
chrome::search::Mode search_mode_;
« no previous file with comments | « no previous file | chrome/browser/instant/instant_controller.cc » ('j') | chrome/browser/instant/instant_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698