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

Unified Diff: ash/drag_drop/drag_drop_tracker.cc

Issue 11421006: Desktop aura: Break aura::Window::SetParent in two. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: I think the content_unittests timeout on linux_aura is flake, but try to fix it anyway. Created 8 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: 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 f0bb206988195053eec516343387ea688d8bf7c3..b81827d20ee2691fc5e10bbef2c26f817e382da5 100644
--- a/ash/drag_drop/drag_drop_tracker.cc
+++ b/ash/drag_drop/drag_drop_tracker.cc
@@ -14,11 +14,11 @@
namespace {
// Creates a window for capturing drag events.
-aura::Window* CreateCaptureWindow() {
+aura::Window* CreateCaptureWindow(aura::RootWindow* context_root) {
aura::Window* window = new aura::Window(NULL);
window->SetType(aura::client::WINDOW_TYPE_NORMAL);
window->Init(ui::LAYER_NOT_DRAWN);
- window->SetParent(NULL);
+ window->SetDefaultParentByTargetRoot(context_root, gfx::Rect());
window->Show();
return window;
}
@@ -28,8 +28,8 @@ aura::Window* CreateCaptureWindow() {
namespace ash {
namespace internal {
-DragDropTracker::DragDropTracker()
- : capture_window_(CreateCaptureWindow()) {
+DragDropTracker::DragDropTracker(aura::RootWindow* context_root)
+ : capture_window_(CreateCaptureWindow(context_root)) {
capture_window_->SetCapture();
}

Powered by Google App Engine
This is Rietveld 408576698