Chromium Code Reviews| Index: chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.cc |
| diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.cc |
| index 088b1dddb43d30c08e7b989b0373530083954019..3852d2556ba10ac1ba81c62de4baae0c918dfcc9 100644 |
| --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.cc |
| +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.cc |
| @@ -22,6 +22,9 @@ NativeTabContentsContainerAura::NativeTabContentsContainerAura( |
| TabContentsContainer* container) |
| : container_(container) { |
| 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); |
| } |
| NativeTabContentsContainerAura::~NativeTabContentsContainerAura() { |
| @@ -94,12 +97,6 @@ bool NativeTabContentsContainerAura::SkipDefaultKeyEventProcessing( |
| !container_->tab_contents()->is_crashed(); |
| } |
| -bool NativeTabContentsContainerAura::IsFocusable() const { |
| - // We need to be focusable when our contents is not a view hierarchy, as |
| - // clicking on the contents needs to focus us. |
| - return container_->tab_contents() != NULL; |
|
Ben Goodger (Google)
2011/12/15 21:21:41
But can the TabContents become NULL at some point
|
| -} |
| - |
| void NativeTabContentsContainerAura::OnFocus() { |
| if (container_->tab_contents()) |
| container_->tab_contents()->Focus(); |