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

Unified Diff: chrome/common/instant_types.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: No assignment in conditionals. Created 8 years 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
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_win.cc ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/instant_types.h
diff --git a/chrome/common/instant_types.h b/chrome/common/instant_types.h
index 90a77ac44233334dd14601d60053d759bf3daea2..e3f7aad86861bd7f69cc0866e51a20a2c9477875 100644
--- a/chrome/common/instant_types.h
+++ b/chrome/common/instant_types.h
@@ -143,4 +143,25 @@ struct ThemeBackgroundInfo {
uint16 image_height;
};
+// Omnibox focus state as tracked by InstantController.
+enum OmniboxFocusState {
+ FOCUS_NONE, // Not focused.
sky 2012/12/10 15:15:39 Name this enums more specifically, eg OMNIBOX_FOCU
samarth 2012/12/10 23:45:00 Done.
sky 2012/12/11 00:12:45 This is specific to the omnibox, it should be in t
+ FOCUS_VISIBLE, // Visibily focused.
+ FOCUS_INVISIBLE, // Invisibly focused, i.e. focused with a hidden caret.
+};
+
+// Reasons why focus state could change.
+enum OmniboxFocusChangeReason {
+ // Includes any explicit changes to focus. (e.g. user clicking to change
+ // focus, user tabbing to change focus, any explicit calls to SetFocus, etc.)
+ FOCUS_CHANGE_EXPLICIT,
+
+ // Focus changed to restore state from a tab the user switched to.
+ FOCUS_CHANGE_TAB_SWITCH,
+
+ // Focus changed because user started typing. This only happens when focus
+ // state is INVISIBLE (and this results in a change to VISIBLE).
+ FOCUS_CHANGE_TYPING,
+};
+
#endif // CHROME_COMMON_INSTANT_TYPES_H_
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_win.cc ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698