diff options
Diffstat (limited to 'chrome/browser/tab_contents.cc')
-rw-r--r-- | chrome/browser/tab_contents.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/tab_contents.cc b/chrome/browser/tab_contents.cc index 66774c6..9507cd4 100644 --- a/chrome/browser/tab_contents.cc +++ b/chrome/browser/tab_contents.cc @@ -320,11 +320,14 @@ void TabContents::CloseAllSuppressedPopups() { } void TabContents::Focus() { + HWND container_hwnd = GetContainerHWND(); + if (!container_hwnd) + return; + views::FocusManager* focus_manager = - views::FocusManager::GetFocusManager(GetContainerHWND()); + views::FocusManager::GetFocusManager(container_hwnd); DCHECK(focus_manager); - views::View* v = - focus_manager->GetViewForWindow(GetContainerHWND(), true); + views::View* v = focus_manager->GetViewForWindow(container_hwnd, true); DCHECK(v); if (v) v->RequestFocus(); |