| OLD | NEW |
| 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_win.h" | 5 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.h" |
| 6 | 6 |
| 7 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" | 7 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" |
| 8 #include "chrome/browser/tab_contents/web_drop_target_win.h" | 8 #include "chrome/browser/tab_contents/web_drop_target_win.h" |
| 9 #include "chrome/browser/ui/views/tab_contents/tab_contents_drag_win.h" | 9 #include "chrome/browser/ui/views/tab_contents/tab_contents_drag_win.h" |
| 10 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_delegate
.h" | 10 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_delegate
.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 delegate_->OnNativeTabContentsViewDraggingEnded(); | 68 delegate_->OnNativeTabContentsViewDraggingEnded(); |
| 69 drag_handler_ = NULL; | 69 drag_handler_ = NULL; |
| 70 } | 70 } |
| 71 | 71 |
| 72 //////////////////////////////////////////////////////////////////////////////// | 72 //////////////////////////////////////////////////////////////////////////////// |
| 73 // NativeTabContentsViewWin, NativeTabContentsView implementation: | 73 // NativeTabContentsViewWin, NativeTabContentsView implementation: |
| 74 | 74 |
| 75 void NativeTabContentsViewWin::InitNativeTabContentsView() { | 75 void NativeTabContentsViewWin::InitNativeTabContentsView() { |
| 76 views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL); | 76 views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL); |
| 77 params.native_widget = this; | 77 params.native_widget = this; |
| 78 params.delete_on_destroy = false; | 78 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 79 params.parent = GetHiddenTabHostWindow(); | 79 params.parent = GetHiddenTabHostWindow(); |
| 80 GetWidget()->Init(params); | 80 GetWidget()->Init(params); |
| 81 | 81 |
| 82 // Remove the root view drop target so we can register our own. | 82 // Remove the root view drop target so we can register our own. |
| 83 RevokeDragDrop(GetNativeView()); | 83 RevokeDragDrop(GetNativeView()); |
| 84 drop_target_ = new WebDropTarget(GetNativeView(), | 84 drop_target_ = new WebDropTarget(GetNativeView(), |
| 85 delegate_->GetTabContents()); | 85 delegate_->GetTabContents()); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void NativeTabContentsViewWin::Unparent() { | 88 void NativeTabContentsViewWin::Unparent() { |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 } | 312 } |
| 313 | 313 |
| 314 //////////////////////////////////////////////////////////////////////////////// | 314 //////////////////////////////////////////////////////////////////////////////// |
| 315 // NativeTabContentsView, public: | 315 // NativeTabContentsView, public: |
| 316 | 316 |
| 317 // static | 317 // static |
| 318 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView( | 318 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView( |
| 319 internal::NativeTabContentsViewDelegate* delegate) { | 319 internal::NativeTabContentsViewDelegate* delegate) { |
| 320 return new NativeTabContentsViewWin(delegate); | 320 return new NativeTabContentsViewWin(delegate); |
| 321 } | 321 } |
| OLD | NEW |