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 #ifndef ASH_DRAG_DROP_DRAG_DROP_TRACKER_H_ | 5 #ifndef ASH_DRAG_DROP_DRAG_DROP_TRACKER_H_ |
6 #define ASH_DRAG_DROP_DRAG_DROP_TRACKER_H_ | 6 #define ASH_DRAG_DROP_DRAG_DROP_TRACKER_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "ui/events/event.h" | 12 #include "ui/events/event.h" |
12 | 13 |
13 namespace aura { | 14 namespace aura { |
14 class Window; | 15 class Window; |
15 class WindowDelegate; | 16 class WindowDelegate; |
16 } | 17 } |
17 | 18 |
18 namespace ash { | 19 namespace ash { |
19 | 20 |
20 // Provides functions for handling drag events inside and outside the root | 21 // Provides functions for handling drag events inside and outside the root |
(...skipping 19 matching lines...) Expand all Loading... |
40 aura::Window* GetTarget(const ui::LocatedEvent& event); | 41 aura::Window* GetTarget(const ui::LocatedEvent& event); |
41 | 42 |
42 // Converts the locations of |event| in the coordinates of the active root | 43 // Converts the locations of |event| in the coordinates of the active root |
43 // window to the ones in |target|'s coordinates. | 44 // window to the ones in |target|'s coordinates. |
44 // Caller takes ownership of the returned object. | 45 // Caller takes ownership of the returned object. |
45 ui::LocatedEvent* ConvertEvent(aura::Window* target, | 46 ui::LocatedEvent* ConvertEvent(aura::Window* target, |
46 const ui::LocatedEvent& event); | 47 const ui::LocatedEvent& event); |
47 | 48 |
48 private: | 49 private: |
49 // A window for capturing drag events while dragging. | 50 // A window for capturing drag events while dragging. |
50 scoped_ptr<aura::Window> capture_window_; | 51 std::unique_ptr<aura::Window> capture_window_; |
51 | 52 |
52 DISALLOW_COPY_AND_ASSIGN(DragDropTracker); | 53 DISALLOW_COPY_AND_ASSIGN(DragDropTracker); |
53 }; | 54 }; |
54 | 55 |
55 } // namespace ash | 56 } // namespace ash |
56 | 57 |
57 #endif // ASH_DRAG_DROP_DRAG_DROP_TRACKER_H_ | 58 #endif // ASH_DRAG_DROP_DRAG_DROP_TRACKER_H_ |
OLD | NEW |