| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk
.h" | 5 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk
.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/view_ids.h" | 7 #include "chrome/browser/ui/view_ids.h" |
| 8 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h" | 8 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h" |
| 9 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" | 9 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" |
| 10 #include "content/browser/renderer_host/render_widget_host_view.h" | 10 #include "content/browser/renderer_host/render_widget_host_view.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // not process them, they'll be returned to us and we'll treat them as | 90 // not process them, they'll be returned to us and we'll treat them as |
| 91 // accelerators then. | 91 // accelerators then. |
| 92 return container_->tab_contents() && | 92 return container_->tab_contents() && |
| 93 !container_->tab_contents()->is_crashed(); | 93 !container_->tab_contents()->is_crashed(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 views::FocusTraversable* NativeTabContentsContainerGtk::GetFocusTraversable() { | 96 views::FocusTraversable* NativeTabContentsContainerGtk::GetFocusTraversable() { |
| 97 return NULL; | 97 return NULL; |
| 98 } | 98 } |
| 99 | 99 |
| 100 bool NativeTabContentsContainerGtk::IsFocusable() const { | 100 bool NativeTabContentsContainerGtk::IsFocusableInRootView() const { |
| 101 // We need to be focusable when our contents is not a view hierarchy, as | 101 // We need to be focusable when our contents is not a view hierarchy, as |
| 102 // clicking on the contents needs to focus us. | 102 // clicking on the contents needs to focus us. |
| 103 return container_->tab_contents() != NULL; | 103 return container_->tab_contents() != NULL; |
| 104 } | 104 } |
| 105 | 105 |
| 106 void NativeTabContentsContainerGtk::OnFocus() { | 106 void NativeTabContentsContainerGtk::OnFocus() { |
| 107 if (container_->tab_contents()) | 107 if (container_->tab_contents()) |
| 108 container_->tab_contents()->Focus(); | 108 container_->tab_contents()->Focus(); |
| 109 } | 109 } |
| 110 | 110 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 } | 143 } |
| 144 | 144 |
| 145 //////////////////////////////////////////////////////////////////////////////// | 145 //////////////////////////////////////////////////////////////////////////////// |
| 146 // NativeTabContentsContainer, public: | 146 // NativeTabContentsContainer, public: |
| 147 | 147 |
| 148 // static | 148 // static |
| 149 NativeTabContentsContainer* NativeTabContentsContainer::CreateNativeContainer( | 149 NativeTabContentsContainer* NativeTabContentsContainer::CreateNativeContainer( |
| 150 TabContentsContainer* container) { | 150 TabContentsContainer* container) { |
| 151 return new NativeTabContentsContainerGtk(container); | 151 return new NativeTabContentsContainerGtk(container); |
| 152 } | 152 } |
| OLD | NEW |