Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.cc

Issue 8949061: Move a bunch of methods from TabContents into the WebContents interface. This change either moves... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // NativeTabContentsContainerAura, views::View overrides: 84 // NativeTabContentsContainerAura, views::View overrides:
85 85
86 bool NativeTabContentsContainerAura::SkipDefaultKeyEventProcessing( 86 bool NativeTabContentsContainerAura::SkipDefaultKeyEventProcessing(
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()->IsCrashed();
95 } 95 }
96 96
97 bool NativeTabContentsContainerAura::IsFocusable() const { 97 bool NativeTabContentsContainerAura::IsFocusable() 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())
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698