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 8927a04cb2eb45ce5711f3c13be29fcb06ef6697..38967e2d659763c4db13a2f50e42713f516989ff 100644 |
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.h |
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.h |
@@ -44,12 +44,13 @@ enum EnteredKeywordModeMethod { |
class OmniboxEditModel { |
public: |
- // Did the Omnibox focus originate via the user clicking on the Omnibox or on |
- // the Fakebox? |
+ // Did the Omnibox focus originate via the user clicking on the Omnibox, on |
+ // the Fakebox or on the location icon? |
enum FocusSource { |
INVALID = 0, |
OMNIBOX = 1, |
- FAKEBOX = 2 |
+ FAKEBOX = 2, |
+ LOCATION_ICON = 3 |
}; |
struct State { |
@@ -332,6 +333,11 @@ class OmniboxEditModel { |
// Sends the current SearchProvider suggestion to the Instant page if any. |
void SetSuggestionToPrefetch(const InstantSuggestion& suggestion); |
+ void set_focused_via_location_icon() { focus_source_ = LOCATION_ICON; } |
+ bool focused_via_location_icon() const { |
+ return focus_source_ == LOCATION_ICON; |
+ } |
+ |
// Name of the histogram tracking cut or copy omnibox commands. |
static const char kCutOrCopyAllTextHistogram[]; |