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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.h

Issue 11418144: [Search] Implementation of the invisible focus on Windows (Closed) Base URL: http://git.chromium.org/chromium/src.git@samarthlatest
Patch Set: ws 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/views/omnibox/omnibox_view_views.h
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.h b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
index 0140485938b2d334e662a7569b7db7e324a73c10..ddac7ea3e75e3638ad9f1cc94d3d07ad88e205ee 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.h
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
@@ -111,6 +111,7 @@ class OmniboxViewViews
virtual void SelectAll(bool reversed) OVERRIDE;
virtual void UpdatePopup() OVERRIDE;
virtual void SetFocus() OVERRIDE;
+ virtual void SetInvisibleFocus() OVERRIDE;
virtual void OnTemporaryTextMaybeChanged(
const string16& display_text,
bool save_original_selection) OVERRIDE;
@@ -183,6 +184,11 @@ class OmniboxViewViews
// that after invoking this OnAfterPossibleChange() is invoked.
void OnPaste();
+ // Depending on the visibility of the focus stored in the OmniboxEditModel,
+ // Sets the color of the caret to black or to the omnibox's background color,
+ // effectively hiding it.
+ void ApplyFocusVisibility();
+
views::Textfield* textfield_;
// When true, the location bar view is read only and also is has a slightly
@@ -217,6 +223,10 @@ class OmniboxViewViews
// allow the user to select just a portion of the text.
bool select_all_on_mouse_release_;
+ // Used to keep track of the visible caret color so that it can be restored
+ // after the caret has been hidden.
+ SkColor visible_caret_color_;
+
DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews);
};

Powered by Google App Engine
This is Rietveld 408576698