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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc

Issue 11444013: Get drag and drop working for win aura. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix compile 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h"
6
7 #include "ui/base/dragdrop/drag_drop_types.h"
8 #include "ui/base/dragdrop/drag_source.h"
9 #include "ui/base/dragdrop/os_exchange_data_provider_win.h"
10
11 namespace views {
12
13 DesktopDragDropClientWin::DesktopDragDropClientWin()
14 : drag_drop_in_progress_(false),
15 drag_operation_(0) {
16 }
17
18 DesktopDragDropClientWin::~DesktopDragDropClientWin() {
19 }
20
21 int DesktopDragDropClientWin::StartDragAndDrop(
22 const ui::OSExchangeData& data,
23 aura::RootWindow* root_window,
24 aura::Window* source_window,
25 const gfx::Point& root_location,
26 int operation,
27 ui::DragDropTypes::DragEventSource source) {
28 drag_drop_in_progress_ = true;
29 drag_operation_ = operation;
30
31 drag_source_ = new ui::DragSource;
32 DWORD effects;
33 DoDragDrop(ui::OSExchangeDataProviderWin::GetIDataObject(data),
34 drag_source_,
35 ui::DragDropTypes::DragOperationToDropEffect(operation),
36 &effects);
37
38 drag_drop_in_progress_ = false;
39
40 return drag_operation_;
41 }
42
43 void DesktopDragDropClientWin::DragUpdate(aura::Window* target,
44 const ui::LocatedEvent& event) {
45 }
46
47 void DesktopDragDropClientWin::Drop(aura::Window* target,
48 const ui::LocatedEvent& event) {
49 }
50
51 void DesktopDragDropClientWin::DragCancel() {
52 drag_source_->CancelDrag();
53 drag_operation_ = 0;
54 }
55
56 bool DesktopDragDropClientWin::IsDragDropInProgress() {
57 return drag_drop_in_progress_;
58 }
59
60 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698