| 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_aur
a.h" | 5 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_container_aur
a.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/tab_contents/interstitial_page.h" | 10 #include "content/browser/tab_contents/interstitial_page.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 const views::KeyEvent& e) { | 87 const views::KeyEvent& e) { |
| 88 // Don't look-up accelerators or tab-traversal if we are showing a non-crashed | 88 // Don't look-up accelerators or tab-traversal if we are showing a non-crashed |
| 89 // TabContents. | 89 // TabContents. |
| 90 // We'll first give the page a chance to process the key events. If it does | 90 // We'll first give the page a chance to process the key events. If it does |
| 91 // not process them, they'll be returned to us and we'll treat them as | 91 // not process them, they'll be returned to us and we'll treat them as |
| 92 // accelerators then. | 92 // accelerators then. |
| 93 return container_->tab_contents() && | 93 return container_->tab_contents() && |
| 94 !container_->tab_contents()->is_crashed(); | 94 !container_->tab_contents()->is_crashed(); |
| 95 } | 95 } |
| 96 | 96 |
| 97 bool NativeTabContentsContainerAura::IsFocusable() const { | 97 bool NativeTabContentsContainerAura::IsFocusableInRootView() const { |
| 98 // We need to be focusable when our contents is not a view hierarchy, as | 98 // We need to be focusable when our contents is not a view hierarchy, as |
| 99 // clicking on the contents needs to focus us. | 99 // clicking on the contents needs to focus us. |
| 100 return container_->tab_contents() != NULL; | 100 return container_->tab_contents() != NULL; |
| 101 } | 101 } |
| 102 | 102 |
| 103 void NativeTabContentsContainerAura::OnFocus() { | 103 void NativeTabContentsContainerAura::OnFocus() { |
| 104 if (container_->tab_contents()) | 104 if (container_->tab_contents()) |
| 105 container_->tab_contents()->Focus(); | 105 container_->tab_contents()->Focus(); |
| 106 } | 106 } |
| 107 | 107 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 } | 141 } |
| 142 | 142 |
| 143 //////////////////////////////////////////////////////////////////////////////// | 143 //////////////////////////////////////////////////////////////////////////////// |
| 144 // NativeTabContentsContainer, public: | 144 // NativeTabContentsContainer, public: |
| 145 | 145 |
| 146 // static | 146 // static |
| 147 NativeTabContentsContainer* NativeTabContentsContainer::CreateNativeContainer( | 147 NativeTabContentsContainer* NativeTabContentsContainer::CreateNativeContainer( |
| 148 TabContentsContainer* container) { | 148 TabContentsContainer* container) { |
| 149 return new NativeTabContentsContainerAura(container); | 149 return new NativeTabContentsContainerAura(container); |
| 150 } | 150 } |
| OLD | NEW |