| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_win.h" | 5 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_win.h" | 8 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_win.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 "chrome/browser/ui/views/tab_contents/tab_contents_drag_win.h" | 10 #include "chrome/browser/ui/views/tab_contents/tab_contents_drag_win.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 } | 106 } |
| 107 | 107 |
| 108 void NativeTabContentsViewWin::Unparent() { | 108 void NativeTabContentsViewWin::Unparent() { |
| 109 // Note that we do not DCHECK on focus_manager_ as it may be NULL when used | 109 // Note that we do not DCHECK on focus_manager_ as it may be NULL when used |
| 110 // with an external tab container. | 110 // with an external tab container. |
| 111 views::Widget::ReparentNativeView(GetNativeView(), | 111 views::Widget::ReparentNativeView(GetNativeView(), |
| 112 HiddenTabHostWindow::Instance()); | 112 HiddenTabHostWindow::Instance()); |
| 113 } | 113 } |
| 114 | 114 |
| 115 RenderWidgetHostView* NativeTabContentsViewWin::CreateRenderWidgetHostView( | 115 RenderWidgetHostView* NativeTabContentsViewWin::CreateRenderWidgetHostView( |
| 116 RenderWidgetHost* render_widget_host) { | 116 content::RenderWidgetHost* render_widget_host) { |
| 117 RenderWidgetHostView* view = | 117 RenderWidgetHostView* view = |
| 118 RenderWidgetHostView::CreateViewForWidget(render_widget_host); | 118 RenderWidgetHostView::CreateViewForWidget(render_widget_host); |
| 119 | 119 |
| 120 view->InitAsChild(GetNativeView()); | 120 view->InitAsChild(GetNativeView()); |
| 121 view->Show(); | 121 view->Show(); |
| 122 return view; | 122 return view; |
| 123 } | 123 } |
| 124 | 124 |
| 125 gfx::NativeWindow NativeTabContentsViewWin::GetTopLevelNativeWindow() const { | 125 gfx::NativeWindow NativeTabContentsViewWin::GetTopLevelNativeWindow() const { |
| 126 return ::GetAncestor(GetNativeView(), GA_ROOT); | 126 return ::GetAncestor(GetNativeView(), GA_ROOT); |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 } | 345 } |
| 346 | 346 |
| 347 //////////////////////////////////////////////////////////////////////////////// | 347 //////////////////////////////////////////////////////////////////////////////// |
| 348 // NativeTabContentsView, public: | 348 // NativeTabContentsView, public: |
| 349 | 349 |
| 350 // static | 350 // static |
| 351 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView( | 351 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView( |
| 352 internal::NativeTabContentsViewDelegate* delegate) { | 352 internal::NativeTabContentsViewDelegate* delegate) { |
| 353 return new NativeTabContentsViewWin(delegate); | 353 return new NativeTabContentsViewWin(delegate); |
| 354 } | 354 } |
| OLD | NEW |