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

Side by Side Diff: chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.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_win .h" 5 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_container_win .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_win.h" 10 #include "content/browser/renderer_host/render_widget_host_view_win.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // NativeTabContentsContainerWin, views::View overrides: 95 // NativeTabContentsContainerWin, views::View overrides:
96 96
97 bool NativeTabContentsContainerWin::SkipDefaultKeyEventProcessing( 97 bool NativeTabContentsContainerWin::SkipDefaultKeyEventProcessing(
98 const views::KeyEvent& e) { 98 const views::KeyEvent& e) {
99 // Don't look-up accelerators or tab-traversal if we are showing a non-crashed 99 // Don't look-up accelerators or tab-traversal if we are showing a non-crashed
100 // TabContents. 100 // TabContents.
101 // We'll first give the page a chance to process the key events. If it does 101 // We'll first give the page a chance to process the key events. If it does
102 // not process them, they'll be returned to us and we'll treat them as 102 // not process them, they'll be returned to us and we'll treat them as
103 // accelerators then. 103 // accelerators then.
104 return container_->tab_contents() && 104 return container_->tab_contents() &&
105 !container_->tab_contents()->is_crashed(); 105 !container_->tab_contents()->IsCrashed();
106 } 106 }
107 107
108 bool NativeTabContentsContainerWin::IsFocusable() const { 108 bool NativeTabContentsContainerWin::IsFocusable() const {
109 // We need to be focusable when our contents is not a view hierarchy, as 109 // We need to be focusable when our contents is not a view hierarchy, as
110 // clicking on the contents needs to focus us. 110 // clicking on the contents needs to focus us.
111 return container_->tab_contents() != NULL; 111 return container_->tab_contents() != NULL;
112 } 112 }
113 113
114 void NativeTabContentsContainerWin::OnFocus() { 114 void NativeTabContentsContainerWin::OnFocus() {
115 if (container_->tab_contents()) 115 if (container_->tab_contents())
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 160
161 //////////////////////////////////////////////////////////////////////////////// 161 ////////////////////////////////////////////////////////////////////////////////
162 // NativeTabContentsContainer, public: 162 // NativeTabContentsContainer, public:
163 163
164 // static 164 // static
165 NativeTabContentsContainer* NativeTabContentsContainer::CreateNativeContainer( 165 NativeTabContentsContainer* NativeTabContentsContainer::CreateNativeContainer(
166 TabContentsContainer* container) { 166 TabContentsContainer* container) {
167 return new NativeTabContentsContainerWin(container); 167 return new NativeTabContentsContainerWin(container);
168 } 168 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698