OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "views/widget/drop_target_win.h" | 5 #include "views/widget/drop_target_win.h" |
6 | 6 |
7 #include "app/drag_drop_types.h" | 7 #include "app/drag_drop_types.h" |
8 #include "app/os_exchange_data.h" | |
9 #include "app/os_exchange_data_provider_win.h" | |
10 #include "gfx/point.h" | 8 #include "gfx/point.h" |
| 9 #include "ui/base/dragdrop/os_exchange_data.h" |
| 10 #include "ui/base/dragdrop/os_exchange_data_provider_win.h" |
11 #include "views/widget/root_view.h" | 11 #include "views/widget/root_view.h" |
12 #include "views/widget/widget.h" | 12 #include "views/widget/widget.h" |
13 | 13 |
| 14 using ui::OSExchangeData; |
| 15 using ui::OSExchangeDataProviderWin; |
| 16 |
14 namespace views { | 17 namespace views { |
15 | 18 |
16 DropTargetWin::DropTargetWin(RootView* root_view) | 19 DropTargetWin::DropTargetWin(RootView* root_view) |
17 : app::win::DropTarget(root_view->GetWidget()->GetNativeView()), | 20 : app::win::DropTarget(root_view->GetWidget()->GetNativeView()), |
18 helper_(root_view) { | 21 helper_(root_view) { |
19 } | 22 } |
20 | 23 |
21 DropTargetWin::~DropTargetWin() { | 24 DropTargetWin::~DropTargetWin() { |
22 } | 25 } |
23 | 26 |
(...skipping 27 matching lines...) Expand all Loading... |
51 | 54 |
52 OSExchangeData data(new OSExchangeDataProviderWin(data_object)); | 55 OSExchangeData data(new OSExchangeDataProviderWin(data_object)); |
53 int drop_operation = DragDropTypes::DropEffectToDragOperation(effect); | 56 int drop_operation = DragDropTypes::DropEffectToDragOperation(effect); |
54 drop_operation = helper_.OnDragOver(data, root_view_location, | 57 drop_operation = helper_.OnDragOver(data, root_view_location, |
55 drop_operation); | 58 drop_operation); |
56 drop_operation = helper_.OnDrop(data, root_view_location, drop_operation); | 59 drop_operation = helper_.OnDrop(data, root_view_location, drop_operation); |
57 return DragDropTypes::DragOperationToDropEffect(drop_operation); | 60 return DragDropTypes::DragOperationToDropEffect(drop_operation); |
58 } | 61 } |
59 | 62 |
60 } // namespace views | 63 } // namespace views |
OLD | NEW |