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

Unified Diff: ui/aura_shell/shell.cc

Issue 8450018: First shot at implementing drag&drop for Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed windows build errors 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 | « ui/aura_shell/shell.h ('k') | ui/base/dragdrop/os_exchange_data_provider_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/shell.cc
diff --git a/ui/aura_shell/shell.cc b/ui/aura_shell/shell.cc
index 5f16a5bc0d1781c95bfc00620b9d80293eee5048..b439de1090e7a796cb25e534e0c157144f6378b3 100644
--- a/ui/aura_shell/shell.cc
+++ b/ui/aura_shell/shell.cc
@@ -7,6 +7,8 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "ui/aura/aura_switches.h"
+#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/client/drag_drop_client.h"
#include "ui/aura/desktop.h"
#include "ui/aura/window.h"
#include "ui/aura/window_types.h"
@@ -14,6 +16,7 @@
#include "ui/aura_shell/default_container_layout_manager.h"
#include "ui/aura_shell/desktop_event_filter.h"
#include "ui/aura_shell/desktop_layout_manager.h"
+#include "ui/aura_shell/drag_drop_controller.h"
#include "ui/aura_shell/launcher/launcher.h"
#include "ui/aura_shell/modal_container_layout_manager.h"
#include "ui/aura_shell/shelf_layout_controller.h"
@@ -103,6 +106,9 @@ Shell::Shell(ShellDelegate* delegate)
}
Shell::~Shell() {
+ // Drag drop controller needs a valid shell instance. We destroy it first.
+ drag_drop_controller_.reset();
+
DCHECK(instance_ == this);
instance_ = NULL;
@@ -180,6 +186,11 @@ void Shell::Init() {
// Force a layout.
desktop_layout->OnWindowResized();
+
+ // Initialize drag drop controller.
+ drag_drop_controller_.reset(new internal::DragDropController);
+ aura::Desktop::GetInstance()->SetProperty(aura::kDesktopDragDropClientKey,
+ static_cast<aura::DragDropClient*>(drag_drop_controller_.get()));
}
aura::Window* Shell::GetContainer(int container_id) {
« no previous file with comments | « ui/aura_shell/shell.h ('k') | ui/base/dragdrop/os_exchange_data_provider_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698