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

Unified Diff: mash/wm/frame/move_loop.cc

Issue 1857623003: convert //mash to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mash/wm/frame/move_loop.h ('k') | mash/wm/frame/move_loop_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/frame/move_loop.cc
diff --git a/mash/wm/frame/move_loop.cc b/mash/wm/frame/move_loop.cc
index 06457909d60f303c4c5257c662a4a30ac0ab12c7..5aabff7097bc32e1c5490bf7c38515f96451f7e4 100644
--- a/mash/wm/frame/move_loop.cc
+++ b/mash/wm/frame/move_loop.cc
@@ -5,6 +5,7 @@
#include "mash/wm/frame/move_loop.h"
#include "base/auto_reset.h"
+#include "base/memory/ptr_util.h"
#include "components/mus/public/cpp/window.h"
#include "components/mus/public/interfaces/input_event_constants.mojom.h"
#include "mash/wm/property_util.h"
@@ -31,9 +32,9 @@ MoveLoop::~MoveLoop() {
}
// static
-scoped_ptr<MoveLoop> MoveLoop::Create(mus::Window* target,
- int ht_location,
- const ui::PointerEvent& event) {
+std::unique_ptr<MoveLoop> MoveLoop::Create(mus::Window* target,
+ int ht_location,
+ const ui::PointerEvent& event) {
DCHECK_EQ(event.type(), ui::ET_POINTER_DOWN);
// Start a move on left mouse, or any other type of pointer.
if (event.IsMousePointerEvent() &&
@@ -47,7 +48,7 @@ scoped_ptr<MoveLoop> MoveLoop::Create(mus::Window* target,
if (!DetermineType(ht_location, &type, &h_loc, &v_loc))
return nullptr;
- return make_scoped_ptr(new MoveLoop(target, event, type, h_loc, v_loc));
+ return base::WrapUnique(new MoveLoop(target, event, type, h_loc, v_loc));
}
MoveLoop::MoveResult MoveLoop::Move(const ui::PointerEvent& event) {
« no previous file with comments | « mash/wm/frame/move_loop.h ('k') | mash/wm/frame/move_loop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698