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

Side by Side Diff: ui/views/widget/drop_target_win.h

Issue 11444013: Get drag and drop working for win aura. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: move DropTargetWin to DesktopDragDropClientWin Created 8 years 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 #ifndef UI_VIEWS_WIDGET_DROP_TARGET_WIN_H_ 5 #ifndef UI_VIEWS_WIDGET_DROP_TARGET_WIN_H_
6 #define UI_VIEWS_WIDGET_DROP_TARGET_WIN_H_ 6 #define UI_VIEWS_WIDGET_DROP_TARGET_WIN_H_
7 7
8 #include "ui/base/dragdrop/drop_target.h" 8 #include "ui/base/dragdrop/drop_target.h"
9 #include "ui/views/widget/drop_helper.h" 9 #include "ui/views/widget/drop_helper.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 class View; 13 class View;
14 namespace internal { 14 namespace internal {
15 class RootView; 15 class RootView;
16 } 16 }
17 17
18 // DropTargetWin takes care of managing drag and drop for NativeWidgetWin. It 18 // DropTargetWin takes care of managing drag and drop for NativeWidgetWin. It
19 // converts Windows OLE drop messages into Views drop messages. 19 // converts Windows OLE drop messages into Views drop messages.
20 // 20 //
21 // DropTargetWin uses DropHelper to manage the appropriate view to target 21 // DropTargetWin uses DropHelper to manage the appropriate view to target
22 // drop messages at. 22 // drop messages at.
23 class DropTargetWin : public ui::DropTarget { 23 class DropTargetWin : public ui::DropTarget {
24 public: 24 public:
25 explicit DropTargetWin(internal::RootView* root_view); 25 DropTargetWin(internal::RootView* root_view, HWND drop_target);
26 virtual ~DropTargetWin(); 26 virtual ~DropTargetWin();
27 27
28 // If a drag and drop is underway and view is the current drop target, the 28 // If a drag and drop is underway and view is the current drop target, the
29 // drop target is set to null. 29 // drop target is set to null.
30 // This is invoked when a View is removed from the RootView to make sure 30 // This is invoked when a View is removed from the RootView to make sure
31 // we don't target a view that was removed during dnd. 31 // we don't target a view that was removed during dnd.
32 void ResetTargetViewIfEquals(View* view); 32 void ResetTargetViewIfEquals(View* view);
33 33
34 protected: 34 protected:
35 virtual DWORD OnDragOver(IDataObject* data_object, 35 virtual DWORD OnDragOver(IDataObject* data_object,
(...skipping 10 matching lines...) Expand all
46 46
47 private: 47 private:
48 views::DropHelper helper_; 48 views::DropHelper helper_;
49 49
50 DISALLOW_COPY_AND_ASSIGN(DropTargetWin); 50 DISALLOW_COPY_AND_ASSIGN(DropTargetWin);
51 }; 51 };
52 52
53 } // namespace views 53 } // namespace views
54 54
55 #endif // UI_VIEWS_WIDGET_DROP_TARGET_WIN_H_ 55 #endif // UI_VIEWS_WIDGET_DROP_TARGET_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698