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

Unified Diff: ui/aura/desktop.cc

Issue 8450018: First shot at implementing drag&drop for Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added missing test file 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
Index: ui/aura/desktop.cc
diff --git a/ui/aura/desktop.cc b/ui/aura/desktop.cc
index d08a062c1888b750b34f309433c89db179e8f453..a29a63f30c177592e1b6770b978a7daedbeb3d19 100644
--- a/ui/aura/desktop.cc
+++ b/ui/aura/desktop.cc
@@ -14,6 +14,7 @@
#include "base/string_number_conversions.h"
#include "base/string_split.h"
#include "ui/aura/aura_switches.h"
+#include "ui/aura/client/drag_drop_client.h"
#include "ui/aura/client/stacking_client.h"
#include "ui/aura/desktop_host.h"
#include "ui/aura/desktop_observer.h"
@@ -196,6 +197,10 @@ void Desktop::SetStackingClient(StackingClient* stacking_client) {
stacking_client_.reset(stacking_client);
}
+void Desktop::SetDragDropClient(DragDropClient* drag_drop_client) {
+ drag_drop_client_.reset(drag_drop_client);
+}
+
void Desktop::ShowDesktop() {
host_->Show();
}
@@ -411,6 +416,10 @@ void Desktop::SetCapture(Window* window) {
mouse_pressed_handler_ = capture_window_;
if (touch_event_handler_)
touch_event_handler_ = capture_window_;
+ } else {
+ // When capture is lost, we must reset the event handlers.
+ mouse_pressed_handler_ = NULL;
+ touch_event_handler_ = NULL;
}
}

Powered by Google App Engine
This is Rietveld 408576698