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

Unified Diff: ash/drag_drop/drag_drop_tracker.cc

Issue 13041002: Cancel drag upon screen lock (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months 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: ash/drag_drop/drag_drop_tracker.cc
diff --git a/ash/drag_drop/drag_drop_tracker.cc b/ash/drag_drop/drag_drop_tracker.cc
index 269e2edbc5f02d2f0c07f6ae3ca7fae988b23da0..16ab16c0dd4b2501f2d45b6777010c128092fc79 100644
--- a/ash/drag_drop/drag_drop_tracker.cc
+++ b/ash/drag_drop/drag_drop_tracker.cc
@@ -11,11 +11,15 @@
#include "ui/base/events/event.h"
#include "ui/gfx/screen.h"
+namespace ash {
+namespace internal {
+
namespace {
// Creates a window for capturing drag events.
-aura::Window* CreateCaptureWindow(aura::RootWindow* context_root) {
- aura::Window* window = new aura::Window(NULL);
+aura::Window* CreateCaptureWindow(aura::RootWindow* context_root,
+ aura::WindowDelegate* delegate) {
+ aura::Window* window = new aura::Window(delegate);
window->SetType(aura::client::WINDOW_TYPE_NORMAL);
window->Init(ui::LAYER_NOT_DRAWN);
window->SetDefaultParentByRootWindow(context_root, gfx::Rect());
@@ -25,11 +29,9 @@ aura::Window* CreateCaptureWindow(aura::RootWindow* context_root) {
} // namespace
-namespace ash {
-namespace internal {
-
-DragDropTracker::DragDropTracker(aura::RootWindow* context_root)
- : capture_window_(CreateCaptureWindow(context_root)) {
+DragDropTracker::DragDropTracker(aura::RootWindow* context_root,
+ aura::WindowDelegate* delegate)
+ : capture_window_(CreateCaptureWindow(context_root, delegate)) {
}
DragDropTracker::~DragDropTracker() {

Powered by Google App Engine
This is Rietveld 408576698