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

Unified Diff: chrome/browser/ui/views/find_bar_view.h

Issue 15841009: Delays find-in-page until IME composition is committed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 7 years, 7 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 | « no previous file | chrome/browser/ui/views/find_bar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/find_bar_view.h
diff --git a/chrome/browser/ui/views/find_bar_view.h b/chrome/browser/ui/views/find_bar_view.h
index f4b3ccf1749586058d5557f1f5479b0cf40fe53a..60b2ab3aa564c6b67d243e10dd42e91bb6259ec2 100644
--- a/chrome/browser/ui/views/find_bar_view.h
+++ b/chrome/browser/ui/views/find_bar_view.h
@@ -80,9 +80,14 @@ class FindBarView : public DropdownBarView,
const string16& new_contents) OVERRIDE;
virtual bool HandleKeyEvent(views::Textfield* sender,
const ui::KeyEvent& key_event) OVERRIDE;
+ virtual void OnAfterUserAction(views::Textfield* sender) OVERRIDE;
+ virtual void OnAfterPaste() OVERRIDE;
private:
- // Update the appearance for the match count label.
+ // Starts finding |search_text|. If the text is empty, stops finding.
+ void Find(const string16& search_text);
+
+ // Updates the appearance for the match count label.
void UpdateMatchCountAppearance(bool no_match);
// views::View:
@@ -132,6 +137,10 @@ class FindBarView : public DropdownBarView,
// between us and the WebContentsView.
FindBarHost* find_bar_host() const;
+ // Used to detect if the input text, not including the IME composition text,
+ // has changed or not.
+ string16 last_searched_text_;
+
// The controls in the window.
SearchTextfieldView* find_text_;
views::Label* match_count_text_;
« no previous file with comments | « no previous file | chrome/browser/ui/views/find_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698