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

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
« no previous file with comments | « ash/drag_drop/drag_drop_tracker.h ('k') | ash/drag_drop/drag_drop_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9de464540a7da5b8fcf32f2f5854219523ebd590 100644
--- a/ash/drag_drop/drag_drop_tracker.cc
+++ b/ash/drag_drop/drag_drop_tracker.cc
@@ -11,25 +11,28 @@
#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());
window->Show();
+ DCHECK(window->bounds().size().IsEmpty());
return window;
}
} // 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() {
« no previous file with comments | « ash/drag_drop/drag_drop_tracker.h ('k') | ash/drag_drop/drag_drop_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698