Correct blacklist entry message
[chromium-blink-merge.git] / ui / views / widget / drop_target_win.h
blob742675122dfd2248b01a91c6386a58db115a032e
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
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_WIDGET_DROP_TARGET_WIN_H_
6 #define UI_VIEWS_WIDGET_DROP_TARGET_WIN_H_
8 #include "ui/base/dragdrop/drop_target_win.h"
9 #include "ui/views/widget/drop_helper.h"
11 namespace views {
13 class View;
14 namespace internal {
15 class RootView;
18 // DropTargetWin takes care of managing drag and drop for NativeWidgetWin. It
19 // converts Windows OLE drop messages into Views drop messages.
21 // DropTargetWin uses DropHelper to manage the appropriate view to target
22 // drop messages at.
23 class DropTargetWin : public ui::DropTargetWin {
24 public:
25 explicit DropTargetWin(internal::RootView* root_view);
26 virtual ~DropTargetWin();
28 // If a drag and drop is underway and view is the current drop target, the
29 // drop target is set to null.
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.
32 void ResetTargetViewIfEquals(View* view);
34 protected:
35 virtual DWORD OnDragOver(IDataObject* data_object,
36 DWORD key_state,
37 POINT cursor_position,
38 DWORD effect);
40 virtual void OnDragLeave(IDataObject* data_object);
42 virtual DWORD OnDrop(IDataObject* data_object,
43 DWORD key_state,
44 POINT cursor_position,
45 DWORD effect);
47 private:
48 views::DropHelper helper_;
50 DISALLOW_COPY_AND_ASSIGN(DropTargetWin);
53 } // namespace views
55 #endif // UI_VIEWS_WIDGET_DROP_TARGET_WIN_H_