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

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

Issue 11369137: Implement {Start,Stop}CapturingKeyStrokes for Instant. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Save focus visibility state per tab. Created 8 years, 1 month 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/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 6caf62f542932a94b4d3cbe564454c88cc6574c4..6d2da23fbc27543220e3c93435d5275890ee6e09 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.h
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.h
@@ -191,6 +191,8 @@ class OmniboxEditModel : public AutocompleteControllerDelegate {
bool has_focus() const { return has_focus_; }
+ bool is_focus_visible() const { return is_focus_visible_; }
+
// Accessors for keyword-related state (see comments on keyword_ and
// is_keyword_hint_).
const string16& keyword() const { return keyword_; }
@@ -213,6 +215,11 @@ class OmniboxEditModel : public AutocompleteControllerDelegate {
// control key is down (at the time we're gaining focus).
void OnSetFocus(bool control_down);
+ // Called when we switch between using visible and invisible focus for the
+ // omnibox. NOTE: this does NOT convey whether the view currently has focus;
+ // only whether the focus will be visible when it does gain focus.
+ void OnFocusVisibilityChange(bool visible_focus);
+
// Sent before |OnKillFocus| and before the popup is closed.
void OnWillKillFocus(gfx::NativeView view_gaining_focus);
@@ -404,6 +411,9 @@ class OmniboxEditModel : public AutocompleteControllerDelegate {
// Whether the edit has focus.
bool has_focus_;
+ // Will the focus be visible?
+ bool is_focus_visible_;
+
// The URL of the currently displayed page.
string16 permanent_text_;

Powered by Google App Engine
This is Rietveld 408576698