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

Side by Side Diff: ash/wm/drag_window_resizer.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: address comments 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
« no previous file with comments | « ash/wm/drag_window_controller.cc ('k') | ash/wm/drag_window_resizer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_WM_DRAG_WINDOW_RESIZER_H_ 5 #ifndef ASH_WM_DRAG_WINDOW_RESIZER_H_
6 #define ASH_WM_DRAG_WINDOW_RESIZER_H_ 6 #define ASH_WM_DRAG_WINDOW_RESIZER_H_
7 7
8 #include <memory>
9
8 #include "ash/wm/window_resizer.h" 10 #include "ash/wm/window_resizer.h"
9 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
10 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
14 #include "ui/gfx/geometry/point.h" 15 #include "ui/gfx/geometry/point.h"
15 16
16 namespace ash { 17 namespace ash {
17 18
18 class DragWindowController; 19 class DragWindowController;
19 20
20 // DragWindowResizer is a decorator of WindowResizer and adds the ability to 21 // DragWindowResizer is a decorator of WindowResizer and adds the ability to
21 // drag windows across displays. 22 // drag windows across displays.
22 class ASH_EXPORT DragWindowResizer : public WindowResizer { 23 class ASH_EXPORT DragWindowResizer : public WindowResizer {
(...skipping 21 matching lines...) Expand all
44 explicit DragWindowResizer(WindowResizer* next_window_resizer, 45 explicit DragWindowResizer(WindowResizer* next_window_resizer,
45 wm::WindowState* window_state); 46 wm::WindowState* window_state);
46 47
47 // Updates the bounds of the drag window for window dragging. 48 // Updates the bounds of the drag window for window dragging.
48 void UpdateDragWindow(const gfx::Rect& bounds_in_parent, 49 void UpdateDragWindow(const gfx::Rect& bounds_in_parent,
49 const gfx::Point& drag_location_in_screen); 50 const gfx::Point& drag_location_in_screen);
50 51
51 // Returns true if we should allow the mouse pointer to warp. 52 // Returns true if we should allow the mouse pointer to warp.
52 bool ShouldAllowMouseWarp(); 53 bool ShouldAllowMouseWarp();
53 54
54 scoped_ptr<WindowResizer> next_window_resizer_; 55 std::unique_ptr<WindowResizer> next_window_resizer_;
55 56
56 // Shows a semi-transparent image of the window being dragged. 57 // Shows a semi-transparent image of the window being dragged.
57 scoped_ptr<DragWindowController> drag_window_controller_; 58 std::unique_ptr<DragWindowController> drag_window_controller_;
58 59
59 gfx::Point last_mouse_location_; 60 gfx::Point last_mouse_location_;
60 61
61 // Current instance for use by the DragWindowResizerTest. 62 // Current instance for use by the DragWindowResizerTest.
62 static DragWindowResizer* instance_; 63 static DragWindowResizer* instance_;
63 64
64 base::WeakPtrFactory<DragWindowResizer> weak_ptr_factory_; 65 base::WeakPtrFactory<DragWindowResizer> weak_ptr_factory_;
65 66
66 DISALLOW_COPY_AND_ASSIGN(DragWindowResizer); 67 DISALLOW_COPY_AND_ASSIGN(DragWindowResizer);
67 }; 68 };
68 69
69 } // namespace ash 70 } // namespace ash
70 71
71 #endif // ASH_WM_DRAG_WINDOW_RESIZER_H_ 72 #endif // ASH_WM_DRAG_WINDOW_RESIZER_H_
OLDNEW
« no previous file with comments | « ash/wm/drag_window_controller.cc ('k') | ash/wm/drag_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698