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

Unified Diff: ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc

Issue 818983002: Revert of Fix crash when the source browser window is deleted during a drag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@drag_drop_end_move_loop2
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc
diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc b/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc
index 49c20e9095ddc84cb818dedecaff2cc945d4e53d..d135a8977a06f88374a331a3990b12e4922d0f54 100644
--- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc
@@ -18,14 +18,11 @@
aura::Window* root_window,
HWND window)
: drag_drop_in_progress_(false),
- drag_operation_(0),
- weak_factory_(this) {
+ drag_operation_(0) {
drop_target_ = new DesktopDropTargetWin(root_window, window);
}
DesktopDragDropClientWin::~DesktopDragDropClientWin() {
- if (drag_drop_in_progress_)
- DragCancel();
}
int DesktopDragDropClientWin::StartDragAndDrop(
@@ -38,11 +35,7 @@
drag_drop_in_progress_ = true;
drag_operation_ = operation;
- base::WeakPtr<DesktopDragDropClientWin> alive(weak_factory_.GetWeakPtr());
-
drag_source_ = new ui::DragSourceWin;
- scoped_refptr<ui::DragSourceWin> drag_source_copy = drag_source_;
-
DWORD effect;
// Use task stopwatch to exclude the drag-drop time current task, if any.
@@ -53,8 +46,7 @@
ui::DragDropTypes::DragOperationToDropEffect(operation), &effect);
stopwatch.Stop();
- if (alive)
- drag_drop_in_progress_ = false;
+ drag_drop_in_progress_ = false;
if (result != DRAGDROP_S_DROP)
effect = DROPEFFECT_NONE;
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698