diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 23:15:10 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 23:15:10 +0000 |
commit | 0aaec000440c2453f20265a7b580efc4ad10b282 (patch) | |
tree | c1739e498cf814750a0c63495a3ebca358117261 /chrome/browser/autocomplete/autocomplete_edit_view_win.cc | |
parent | f5c8a1596de89f2f3010186b03cc2378d23254ae (diff) | |
download | chromium_src-0aaec000440c2453f20265a7b580efc4ad10b282.zip chromium_src-0aaec000440c2453f20265a7b580efc4ad10b282.tar.gz chromium_src-0aaec000440c2453f20265a7b580efc4ad10b282.tar.bz2 |
Relanding the NativeViewHost refactoring (it was breaking the ChromeOS build).
Refactoring some of the NativeViewHost and NativeControl focus management so their consumers don't have to explicitly set the focused view.
See original review:
http://codereview.chromium.org/235011/show
BUG=None
TEST=Run all tests. Make sure focus is stored/restored properly in Chrome.
TBR=ben
Review URL: http://codereview.chromium.org/246032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27563 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_edit_view_win.cc')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_win.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc index 91ea6b1..5af7976 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc @@ -870,6 +870,10 @@ gfx::NativeView AutocompleteEditViewWin::GetNativeView() const { return m_hWnd; } +gfx::NativeView AutocompleteEditViewWin::GetFocusNativeView() const { + return m_hWnd; +} + void AutocompleteEditViewWin::PasteAndGo(const std::wstring& text) { if (CanPasteAndGo(text)) model_->PasteAndGo(); @@ -1636,15 +1640,6 @@ void AutocompleteEditViewWin::OnPaste() { } void AutocompleteEditViewWin::OnSetFocus(HWND focus_wnd) { - views::FocusManager* focus_manager = parent_view_->GetFocusManager(); - if (focus_manager) { - // Notify the FocusManager that the focused view is now the location bar - // (our parent view). - focus_manager->SetFocusedView(parent_view_); - } else { - NOTREACHED(); - } - model_->OnSetFocus(GetKeyState(VK_CONTROL) < 0); // Notify controller if it needs to show hint UI of some kind. |