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_ |