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

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

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
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 #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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698