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

Side by Side Diff: mash/wm/frame/move_loop.h

Issue 1857623003: convert //mash 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
« no previous file with comments | « mash/wm/frame/move_event_handler.cc ('k') | mash/wm/frame/move_loop.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 MASH_WM_FRAME_MOVE_LOOP_H_ 5 #ifndef MASH_WM_FRAME_MOVE_LOOP_H_
6 #define MASH_WM_FRAME_MOVE_LOOP_H_ 6 #define MASH_WM_FRAME_MOVE_LOOP_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "components/mus/public/cpp/window_observer.h" 13 #include "components/mus/public/cpp/window_observer.h"
13 #include "components/mus/public/interfaces/input_events.mojom.h" 14 #include "components/mus/public/interfaces/input_events.mojom.h"
14 #include "ui/gfx/geometry/point.h" 15 #include "ui/gfx/geometry/point.h"
15 #include "ui/gfx/geometry/rect.h" 16 #include "ui/gfx/geometry/rect.h"
16 17
17 namespace ui { 18 namespace ui {
18 class PointerEvent; 19 class PointerEvent;
19 } 20 }
20 21
21 namespace mash { 22 namespace mash {
(...skipping 21 matching lines...) Expand all
43 BOTTOM, 44 BOTTOM,
44 OTHER, 45 OTHER,
45 }; 46 };
46 47
47 ~MoveLoop() override; 48 ~MoveLoop() override;
48 49
49 // If a move/resize loop should occur for the specified parameters creates 50 // If a move/resize loop should occur for the specified parameters creates
50 // and returns a new MoveLoop. All events should be funneled to the MoveLoop 51 // and returns a new MoveLoop. All events should be funneled to the MoveLoop
51 // until done (Move()). |ht_location| is one of the constants defined by 52 // until done (Move()). |ht_location| is one of the constants defined by
52 // HitTestCompat. 53 // HitTestCompat.
53 static scoped_ptr<MoveLoop> Create(mus::Window* target, 54 static std::unique_ptr<MoveLoop> Create(mus::Window* target,
54 int ht_location, 55 int ht_location,
55 const ui::PointerEvent& event); 56 const ui::PointerEvent& event);
56 57
57 // Processes an event for a move/resize loop. 58 // Processes an event for a move/resize loop.
58 MoveResult Move(const ui::PointerEvent& event); 59 MoveResult Move(const ui::PointerEvent& event);
59 60
60 // If possible reverts any changes made during the move loop. 61 // If possible reverts any changes made during the move loop.
61 void Revert(); 62 void Revert();
62 63
63 private: 64 private:
64 enum class Type { 65 enum class Type {
65 MOVE, 66 MOVE,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // canceled if the bounds change unexpectedly during the move. 120 // canceled if the bounds change unexpectedly during the move.
120 bool changing_bounds_; 121 bool changing_bounds_;
121 122
122 DISALLOW_COPY_AND_ASSIGN(MoveLoop); 123 DISALLOW_COPY_AND_ASSIGN(MoveLoop);
123 }; 124 };
124 125
125 } // namespace wm 126 } // namespace wm
126 } // namespace mash 127 } // namespace mash
127 128
128 #endif // MASH_WM_FRAME_MOVE_LOOP_H_ 129 #endif // MASH_WM_FRAME_MOVE_LOOP_H_
OLDNEW
« no previous file with comments | « mash/wm/frame/move_event_handler.cc ('k') | mash/wm/frame/move_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698