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 #ifndef VIEWS_WIDGET_DROP_TARGET_WIN_H_ | 5 #ifndef VIEWS_WIDGET_DROP_TARGET_WIN_H_ |
6 #define VIEWS_WIDGET_DROP_TARGET_WIN_H_ | 6 #define VIEWS_WIDGET_DROP_TARGET_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "app/win/drop_target.h" | 9 #include "ui/base/dragdrop/drop_target.h" |
10 #include "views/widget/drop_helper.h" | 10 #include "views/widget/drop_helper.h" |
11 | 11 |
12 namespace views { | 12 namespace views { |
13 | 13 |
14 class RootView; | 14 class RootView; |
15 class View; | 15 class View; |
16 | 16 |
17 // DropTargetWin takes care of managing drag and drop for WidgetWin. It | 17 // DropTargetWin takes care of managing drag and drop for WidgetWin. It |
18 // converts Windows OLE drop messages into Views drop messages. | 18 // converts Windows OLE drop messages into Views drop messages. |
19 // | 19 // |
20 // DropTargetWin uses DropHelper to manage the appropriate view to target | 20 // DropTargetWin uses DropHelper to manage the appropriate view to target |
21 // drop messages at. | 21 // drop messages at. |
22 class DropTargetWin : public app::win::DropTarget { | 22 class DropTargetWin : public ui::DropTarget { |
23 public: | 23 public: |
24 explicit DropTargetWin(RootView* root_view); | 24 explicit DropTargetWin(RootView* root_view); |
25 virtual ~DropTargetWin(); | 25 virtual ~DropTargetWin(); |
26 | 26 |
27 // If a drag and drop is underway and view is the current drop target, the | 27 // If a drag and drop is underway and view is the current drop target, the |
28 // drop target is set to null. | 28 // drop target is set to null. |
29 // This is invoked when a View is removed from the RootView to make sure | 29 // This is invoked when a View is removed from the RootView to make sure |
30 // we don't target a view that was removed during dnd. | 30 // we don't target a view that was removed during dnd. |
31 void ResetTargetViewIfEquals(View* view); | 31 void ResetTargetViewIfEquals(View* view); |
32 | 32 |
(...skipping 12 matching lines...) Expand all Loading... |
45 | 45 |
46 private: | 46 private: |
47 views::DropHelper helper_; | 47 views::DropHelper helper_; |
48 | 48 |
49 DISALLOW_COPY_AND_ASSIGN(DropTargetWin); | 49 DISALLOW_COPY_AND_ASSIGN(DropTargetWin); |
50 }; | 50 }; |
51 | 51 |
52 } // namespace views | 52 } // namespace views |
53 | 53 |
54 #endif // VIEWS_WIDGET_DROP_TARGET_WIN_H_ | 54 #endif // VIEWS_WIDGET_DROP_TARGET_WIN_H_ |
OLD | NEW |