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

Side by Side Diff: ash/drag_drop/drag_drop_tracker.cc

Issue 115153002: wm: public window_types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/drag_drop/drag_drop_tracker.h" 5 #include "ash/drag_drop/drag_drop_tracker.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/wm/coordinate_conversion.h" 9 #include "ash/wm/coordinate_conversion.h"
10 #include "ui/aura/client/window_tree_client.h" 10 #include "ui/aura/client/window_tree_client.h"
11 #include "ui/aura/root_window.h" 11 #include "ui/aura/root_window.h"
12 #include "ui/aura/window.h" 12 #include "ui/aura/window.h"
13 #include "ui/events/event.h" 13 #include "ui/events/event.h"
14 #include "ui/gfx/screen.h" 14 #include "ui/gfx/screen.h"
15 15
16 namespace ash { 16 namespace ash {
17 namespace internal { 17 namespace internal {
18 18
19 namespace { 19 namespace {
20 20
21 // Creates a window for capturing drag events. 21 // Creates a window for capturing drag events.
22 aura::Window* CreateCaptureWindow(aura::Window* context_root, 22 aura::Window* CreateCaptureWindow(aura::Window* context_root,
23 aura::WindowDelegate* delegate) { 23 aura::WindowDelegate* delegate) {
24 aura::Window* window = new aura::Window(delegate); 24 aura::Window* window = new aura::Window(delegate);
25 window->SetType(aura::client::WINDOW_TYPE_NORMAL); 25 window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
26 window->Init(ui::LAYER_NOT_DRAWN); 26 window->Init(ui::LAYER_NOT_DRAWN);
27 aura::client::ParentWindowWithContext(window, context_root, gfx::Rect()); 27 aura::client::ParentWindowWithContext(window, context_root, gfx::Rect());
28 window->Show(); 28 window->Show();
29 DCHECK(window->bounds().size().IsEmpty()); 29 DCHECK(window->bounds().size().IsEmpty());
30 return window; 30 return window;
31 } 31 }
32 32
33 } // namespace 33 } // namespace
34 34
35 DragDropTracker::DragDropTracker(aura::Window* context_root, 35 DragDropTracker::DragDropTracker(aura::Window* context_root,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 ash::wm::GetRootWindowAt(location_in_screen), 72 ash::wm::GetRootWindowAt(location_in_screen),
73 &target_root_location); 73 &target_root_location);
74 return new ui::MouseEvent(event.type(), 74 return new ui::MouseEvent(event.type(),
75 target_location, 75 target_location,
76 target_root_location, 76 target_root_location,
77 event.flags()); 77 event.flags());
78 } 78 }
79 79
80 } // namespace internal 80 } // namespace internal
81 } // namespace ash 81 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698