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

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.h

Issue 20587003: InstantExtended: record initial focus state for omnibox interactions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months 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/metrics/metrics_log.cc ('k') | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/omnibox/omnibox_edit_model.h
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.h b/chrome/browser/ui/omnibox/omnibox_edit_model.h
index c2f780d40713eefc867882f490bd07906c559ce3..afc9be70815226472a54d287f691749d2cf92137 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.h
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.h
@@ -43,13 +43,22 @@ enum EnteredKeywordModeMethod {
class OmniboxEditModel {
public:
+ // Did the Omnibox focus originate via the user clicking on the Omnibox or on
+ // the Fakebox?
+ enum FocusSource {
+ INVALID = 0,
+ OMNIBOX = 1,
+ FAKEBOX = 2
+ };
+
struct State {
State(bool user_input_in_progress,
const string16& user_text,
const string16& gray_text,
const string16& keyword,
bool is_keyword_hint,
- OmniboxFocusState focus_state);
+ OmniboxFocusState focus_state,
+ FocusSource focus_source);
~State();
bool user_input_in_progress;
@@ -58,6 +67,7 @@ class OmniboxEditModel {
const string16 keyword;
const bool is_keyword_hint;
OmniboxFocusState focus_state;
+ FocusSource focus_source;
};
OmniboxEditModel(OmniboxView* view,
@@ -410,6 +420,11 @@ class OmniboxEditModel {
OmniboxFocusState focus_state_;
+ // Used to keep track whether the input currently in progress originated by
+ // focusing in the Omnibox or in the Fakebox. This will be INVALID if no input
+ // is in progress or the Omnibox is not focused.
+ FocusSource focus_source_;
+
// The URL of the currently displayed page.
string16 permanent_text_;
« no previous file with comments | « chrome/browser/metrics/metrics_log.cc ('k') | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698