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

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

Issue 7256001: Fix a few issues with Chrome-in-Views-Desktop: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months 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_views.h" 5 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_views.h"
6 6
7 #include "chrome/browser/renderer_host/render_widget_host_view_views.h" 7 #include "chrome/browser/renderer_host/render_widget_host_view_views.h"
8 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_delegate .h" 8 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_delegate .h"
9 #include "content/browser/tab_contents/tab_contents.h" 9 #include "content/browser/tab_contents/tab_contents.h"
10 #include "content/browser/tab_contents/tab_contents_view.h" 10 #include "content/browser/tab_contents/tab_contents_view.h"
(...skipping 18 matching lines...) Expand all
29 // NativeTabContentsViewViews, NativeTabContentsView implementation: 29 // NativeTabContentsViewViews, NativeTabContentsView implementation:
30 30
31 void NativeTabContentsViewViews::InitNativeTabContentsView() { 31 void NativeTabContentsViewViews::InitNativeTabContentsView() {
32 views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL); 32 views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL);
33 params.native_widget = this; 33 params.native_widget = this;
34 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 34 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
35 GetWidget()->Init(params); 35 GetWidget()->Init(params);
36 } 36 }
37 37
38 void NativeTabContentsViewViews::Unparent() { 38 void NativeTabContentsViewViews::Unparent() {
39 // Note that we do not DCHECK on focus_manager_ as it may be NULL when used
40 // with an external tab container.
41 views::Widget::ReparentNativeView(GetNativeView(), NULL);
42 } 39 }
43 40
44 RenderWidgetHostView* NativeTabContentsViewViews::CreateRenderWidgetHostView( 41 RenderWidgetHostView* NativeTabContentsViewViews::CreateRenderWidgetHostView(
45 RenderWidgetHost* render_widget_host) { 42 RenderWidgetHost* render_widget_host) {
46 RenderWidgetHostViewViews* view = 43 RenderWidgetHostViewViews* view =
47 new RenderWidgetHostViewViews(render_widget_host); 44 new RenderWidgetHostViewViews(render_widget_host);
48 GetWidget()->SetContentsView(view); 45 GetWidget()->SetContentsView(view);
49 view->Show(); 46 view->Show();
50 view->InitAsChild(); 47 view->InitAsChild();
51 // TODO(anicolao): implement drag'n'drop hooks if needed 48 // TODO(anicolao): implement drag'n'drop hooks if needed
(...skipping 27 matching lines...) Expand all
79 } 76 }
80 77
81 void NativeTabContentsViewViews::SetDragCursor( 78 void NativeTabContentsViewViews::SetDragCursor(
82 WebKit::WebDragOperation operation) { 79 WebKit::WebDragOperation operation) {
83 NOTIMPLEMENTED(); 80 NOTIMPLEMENTED();
84 } 81 }
85 82
86 views::NativeWidget* NativeTabContentsViewViews::AsNativeWidget() { 83 views::NativeWidget* NativeTabContentsViewViews::AsNativeWidget() {
87 return this; 84 return this;
88 } 85 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698