diff options
author | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-05 04:12:28 +0000 |
---|---|---|
committer | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-05 04:12:28 +0000 |
commit | ee2cebc4940fc9144cdf23cf807ef0cd1f4e3c7f (patch) | |
tree | c499de7fe39ceb4e1fc1da4b4450c54464cf08ac /chrome/browser/ui/views/find_bar_view.h | |
parent | 537cfb7c1e3f19debbec60709f9310aa3660a80a (diff) | |
download | chromium_src-ee2cebc4940fc9144cdf23cf807ef0cd1f4e3c7f.zip chromium_src-ee2cebc4940fc9144cdf23cf807ef0cd1f4e3c7f.tar.gz chromium_src-ee2cebc4940fc9144cdf23cf807ef0cd1f4e3c7f.tar.bz2 |
Revise NativeWidgetWin focus hack; force focus on restore.
Remove NativeWidgetWin::RestoreFocusOnActivate's built-in hack.
Always use kReasonFocusRestore in FocusManager::RestoreFocusedView().
Always run FocusManager::SetFocusedViewWithReason with kReasonFocusRestore.
(this clears and resets child HWND focus, needed for the hack)
Fixes initial omnibox focus on Win with --enable-views-textfield; plus:
interactive_ui_tests.exe --gtest_filter=BrowserFocusTest.ClickingMovesFocus --enable-views-textfield
views_unittests.exe --gtest_filter=BubbleDelegateTest.InitiallyFocusedView --enable-views-textfield
(test updated to have the proper expectation, removing a non-Aura Win hack)
Doesn't regress child HWND focus like the previous attempt: http://crrev.com/186235
Remove SearchTextfieldView Textfield subclass; make RequestFocus non-virtual.
TODO(followup): Polish find-bar focus behavior as needed in followups.
BUG=125976,131660,224591,225963
TEST=View and web-contents focus restoration on minimize/restore; repro steps in bugs. Find bar works as expected (may need attention in followups). Tests pass with --enable-views-textfield.
R=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/13227002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192493 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/find_bar_view.h')
-rw-r--r-- | chrome/browser/ui/views/find_bar_view.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/chrome/browser/ui/views/find_bar_view.h b/chrome/browser/ui/views/find_bar_view.h index 7f3e899..dd5e5d6d 100644 --- a/chrome/browser/ui/views/find_bar_view.h +++ b/chrome/browser/ui/views/find_bar_view.h @@ -110,25 +110,12 @@ class FindBarView : public DropdownBarView, DISALLOW_COPY_AND_ASSIGN(FocusForwarderView); }; - // A wrapper of views::TextField that allows us to select all text when we - // get focus. Represents the text field where the user enters a search term. - class SearchTextfieldView : public views::Textfield { - public: - SearchTextfieldView(); - virtual ~SearchTextfieldView(); - - virtual void RequestFocus() OVERRIDE; - - private: - DISALLOW_COPY_AND_ASSIGN(SearchTextfieldView); - }; - // Returns the OS-specific view for the find bar that acts as an intermediary // between us and the WebContentsView. FindBarHost* find_bar_host() const; // The controls in the window. - SearchTextfieldView* find_text_; + views::Textfield* find_text_; views::Label* match_count_text_; FocusForwarderView* focus_forwarder_view_; views::ImageButton* find_previous_button_; |