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

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

Issue 8598031: views: Move widget/ directory to ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland for real Created 9 years, 1 month 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
« no previous file with comments | « views/widget/drop_target_gtk.cc ('k') | views/widget/drop_target_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef VIEWS_WIDGET_DROP_TARGET_WIN_H_
6 #define VIEWS_WIDGET_DROP_TARGET_WIN_H_
7 #pragma once
8
9 #include "ui/base/dragdrop/drop_target.h"
10 #include "views/widget/drop_helper.h"
11
12 namespace views {
13
14 class View;
15 namespace internal {
16 class RootView;
17 }
18
19 // DropTargetWin takes care of managing drag and drop for NativeWidgetWin. It
20 // converts Windows OLE drop messages into Views drop messages.
21 //
22 // DropTargetWin uses DropHelper to manage the appropriate view to target
23 // drop messages at.
24 class DropTargetWin : public ui::DropTarget {
25 public:
26 explicit DropTargetWin(internal::RootView* root_view);
27 virtual ~DropTargetWin();
28
29 // If a drag and drop is underway and view is the current drop target, the
30 // drop target is set to null.
31 // This is invoked when a View is removed from the RootView to make sure
32 // we don't target a view that was removed during dnd.
33 void ResetTargetViewIfEquals(View* view);
34
35 protected:
36 virtual DWORD OnDragOver(IDataObject* data_object,
37 DWORD key_state,
38 POINT cursor_position,
39 DWORD effect);
40
41 virtual void OnDragLeave(IDataObject* data_object);
42
43 virtual DWORD OnDrop(IDataObject* data_object,
44 DWORD key_state,
45 POINT cursor_position,
46 DWORD effect);
47
48 private:
49 views::DropHelper helper_;
50
51 DISALLOW_COPY_AND_ASSIGN(DropTargetWin);
52 };
53
54 } // namespace views
55
56 #endif // VIEWS_WIDGET_DROP_TARGET_WIN_H_
OLDNEW
« no previous file with comments | « views/widget/drop_target_gtk.cc ('k') | views/widget/drop_target_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698