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

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: Rebase. Added comment. 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
« no previous file with comments | « chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.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 6caf62f542932a94b4d3cbe564454c88cc6574c4..f8444f67bb086fe528660a87a103a257bdf3e1f8 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.h
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.h
@@ -37,13 +37,15 @@ class OmniboxEditModel : public AutocompleteControllerDelegate {
State(bool user_input_in_progress,
const string16& user_text,
const string16& keyword,
- bool is_keyword_hint);
+ bool is_keyword_hint,
+ bool is_caret_visible);
~State();
bool user_input_in_progress;
const string16 user_text;
const string16 keyword;
const bool is_keyword_hint;
+ const bool is_caret_visible;
};
OmniboxEditModel(OmniboxView* view,
@@ -190,6 +192,7 @@ class OmniboxEditModel : public AutocompleteControllerDelegate {
size_t index);
bool has_focus() const { return has_focus_; }
+ bool is_caret_visible() const { return is_caret_visible_; }
// Accessors for keyword-related state (see comments on keyword_ and
// is_keyword_hint_).
@@ -213,6 +216,17 @@ class OmniboxEditModel : public AutocompleteControllerDelegate {
// control key is down (at the time we're gaining focus).
void OnSetFocus(bool control_down);
+ // Sets the visibility of the caret in the omnibox, if it has focus. The
+ // visibility of the caret is reset to visible if any of the following
+ // happens:
+ // - User starts typing in the omnibox
+ // - User clicks in the omnibox
+ // - Omnibox loses and then regains focus
+ // - SetFocus() is explicitly called again
+ // Caret visibility is tracked per-tab and updates automatically upon
+ // switching tabs.
+ void SetCaretVisibility(bool visible);
+
// Sent before |OnKillFocus| and before the popup is closed.
void OnWillKillFocus(gfx::NativeView view_gaining_focus);
@@ -404,6 +418,9 @@ class OmniboxEditModel : public AutocompleteControllerDelegate {
// Whether the edit has focus.
bool has_focus_;
+ // Is the caret visible? Only meaningful if has_focus_ is true.
+ bool is_caret_visible_;
+
// The URL of the currently displayed page.
string16 permanent_text_;
« no previous file with comments | « chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.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