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

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

Issue 8659014: Check that we have a focus manager in aura before trying to set focus. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: use type_popup instead for native_tab_contents_view_aura 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_view_aura.h" 5 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.h"
6 6
7 #include "base/event_types.h" 7 #include "base/event_types.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_delegate .h" 9 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_delegate .h"
10 #include "content/browser/renderer_host/render_view_host.h" 10 #include "content/browser/renderer_host/render_view_host.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 TabContents* NativeTabContentsViewAura::GetTabContents() const { 138 TabContents* NativeTabContentsViewAura::GetTabContents() const {
139 return delegate_->GetTabContents(); 139 return delegate_->GetTabContents();
140 } 140 }
141 141
142 //////////////////////////////////////////////////////////////////////////////// 142 ////////////////////////////////////////////////////////////////////////////////
143 // NativeTabContentsViewAura, NativeTabContentsView implementation: 143 // NativeTabContentsViewAura, NativeTabContentsView implementation:
144 144
145 void NativeTabContentsViewAura::InitNativeTabContentsView() { 145 void NativeTabContentsViewAura::InitNativeTabContentsView() {
146 views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL); 146 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
147 params.native_widget = this; 147 params.native_widget = this;
148 // We don't draw anything so we don't need a texture. 148 // We don't draw anything so we don't need a texture.
149 params.create_texture_for_layer = false; 149 params.create_texture_for_layer = false;
150 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 150 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
151 params.parent = NULL; 151 params.parent = NULL;
152 GetWidget()->Init(params); 152 GetWidget()->Init(params);
153 153
154 // Hide the widget to prevent it from showing up on the desktop. This is 154 // Hide the widget to prevent it from showing up on the desktop. This is
155 // needed for TabContentses that aren't immediately added to the tabstrip, 155 // needed for TabContentses that aren't immediately added to the tabstrip,
156 // e.g. the Instant preview contents. 156 // e.g. the Instant preview contents.
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 } 318 }
319 319
320 //////////////////////////////////////////////////////////////////////////////// 320 ////////////////////////////////////////////////////////////////////////////////
321 // NativeTabContentsView, public: 321 // NativeTabContentsView, public:
322 322
323 // static 323 // static
324 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView( 324 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView(
325 internal::NativeTabContentsViewDelegate* delegate) { 325 internal::NativeTabContentsViewDelegate* delegate) {
326 return new NativeTabContentsViewAura(delegate); 326 return new NativeTabContentsViewAura(delegate);
327 } 327 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698