OLD | NEW |
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(ui::wm::WINDOW_TYPE_NORMAL); | 25 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
26 window->Init(ui::LAYER_NOT_DRAWN); | 26 window->Init(aura::WINDOW_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, |
36 aura::WindowDelegate* delegate) | 36 aura::WindowDelegate* delegate) |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 static_cast<const ui::MouseEvent&>(event). | 78 static_cast<const ui::MouseEvent&>(event). |
79 changed_button_flags()); | 79 changed_button_flags()); |
80 } | 80 } |
81 | 81 |
82 } // namespace internal | 82 } // namespace internal |
83 } // namespace ash | 83 } // namespace ash |
OLD | NEW |