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

Unified Diff: views/widget/drop_target_win.h

Issue 8562003: Revert "views: Move widget/ directory to ui/views." properly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/widget/drop_target_gtk.cc ('k') | views/widget/drop_target_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/drop_target_win.h
diff --git a/views/widget/drop_target_win.h b/views/widget/drop_target_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..966bbc2841d6af68f3e7760382d5ef1d034aaa6c
--- /dev/null
+++ b/views/widget/drop_target_win.h
@@ -0,0 +1,56 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef VIEWS_WIDGET_DROP_TARGET_WIN_H_
+#define VIEWS_WIDGET_DROP_TARGET_WIN_H_
+#pragma once
+
+#include "ui/base/dragdrop/drop_target.h"
+#include "views/widget/drop_helper.h"
+
+namespace views {
+
+class View;
+namespace internal {
+class RootView;
+}
+
+// DropTargetWin takes care of managing drag and drop for NativeWidgetWin. It
+// converts Windows OLE drop messages into Views drop messages.
+//
+// DropTargetWin uses DropHelper to manage the appropriate view to target
+// drop messages at.
+class DropTargetWin : public ui::DropTarget {
+ public:
+ explicit DropTargetWin(internal::RootView* root_view);
+ virtual ~DropTargetWin();
+
+ // If a drag and drop is underway and view is the current drop target, the
+ // drop target is set to null.
+ // This is invoked when a View is removed from the RootView to make sure
+ // we don't target a view that was removed during dnd.
+ void ResetTargetViewIfEquals(View* view);
+
+ protected:
+ virtual DWORD OnDragOver(IDataObject* data_object,
+ DWORD key_state,
+ POINT cursor_position,
+ DWORD effect);
+
+ virtual void OnDragLeave(IDataObject* data_object);
+
+ virtual DWORD OnDrop(IDataObject* data_object,
+ DWORD key_state,
+ POINT cursor_position,
+ DWORD effect);
+
+ private:
+ views::DropHelper helper_;
+
+ DISALLOW_COPY_AND_ASSIGN(DropTargetWin);
+};
+
+} // namespace views
+
+#endif // VIEWS_WIDGET_DROP_TARGET_WIN_H_
« 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