Chromium Code Reviews| Index: chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc |
| diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc |
| index e6e1dc75f8d3ae72bbaa734d14ea815bd44cd39e..ccb3f8d661e658d6c3c56528162b66f08866aaf4 100644 |
| --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc |
| +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc |
| @@ -21,6 +21,9 @@ NativeTabContentsContainerGtk::NativeTabContentsContainerGtk( |
| : container_(container), |
| focus_callback_id_(0) { |
| set_id(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW); |
| + // We need to be focusable when our contents is not a view hierarchy, as |
| + // clicking on the contents needs to focus us. |
| + set_focusable(container_->tab_contents() != NULL); |
| } |
| NativeTabContentsContainerGtk::~NativeTabContentsContainerGtk() { |
| @@ -97,12 +100,6 @@ views::FocusTraversable* NativeTabContentsContainerGtk::GetFocusTraversable() { |
| return NULL; |
| } |
| -bool NativeTabContentsContainerGtk::IsFocusable() const { |
| - // We need to be focusable when our contents is not a view hierarchy, as |
| - // clicking on the contents needs to focus us. |
|
Ben Goodger (Google)
2011/12/15 21:21:41
Same question as the other file.
|
| - return container_->tab_contents() != NULL; |
| -} |
| - |
| void NativeTabContentsContainerGtk::OnFocus() { |
| if (container_->tab_contents()) |
| container_->tab_contents()->Focus(); |