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

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: Rebase and refactor. 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
Index: chrome/common/instant_types.h
diff --git a/chrome/common/instant_types.h b/chrome/common/instant_types.h
index 90a77ac44233334dd14601d60053d759bf3daea2..e562364f0dd0908a8492f74cf5ed57142c193f61 100644
--- a/chrome/common/instant_types.h
+++ b/chrome/common/instant_types.h
@@ -143,4 +143,23 @@ struct ThemeBackgroundInfo {
uint16 image_height;
};
+// Omnibox focus state as tracked by InstantController.
+enum OmniboxFocusState {
+ FOCUS_NONE, // Not focused.
+ FOCUS_VISIBLE, // Visibily focused.
+ FOCUS_INVISIBLE, // Invisibly focused, i.e. focused with with a hidden caret.
+};
+
+// Reason 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,
sreeram 2012/12/05 19:48:24 Add line breaks for clarity (a la InstantShownReas
samarth 2012/12/08 00:55:47 Done.
+ // Focus changed to restore state from a tab the user swtched to.
sreeram 2012/12/05 19:48:24 Nit: swtched -> switched
samarth 2012/12/08 00:55:47 Done.
+ 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_

Powered by Google App Engine
This is Rietveld 408576698