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

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

Issue 1459653002: Gets mustash frames looking like that of ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test Created 5 years, 1 month 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_loop.h ('k') | mash/wm/frame/move_loop_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 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 #include "mash/wm/move_loop.h" 5 #include "mash/wm/frame/move_loop.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "components/mus/public/cpp/window.h" 8 #include "components/mus/public/cpp/window.h"
9 #include "components/mus/public/interfaces/input_event_constants.mojom.h" 9 #include "components/mus/public/interfaces/input_event_constants.mojom.h"
10 #include "mash/wm/property_util.h" 10 #include "mash/wm/property_util.h"
11 #include "ui/gfx/geometry/point_conversions.h" 11 #include "ui/gfx/geometry/point_conversions.h"
12 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
13 13
14 namespace mash {
15 namespace wm {
16
14 namespace { 17 namespace {
15 18
16 gfx::Point EventLocationToPoint(const mus::mojom::Event& event) { 19 gfx::Point EventLocationToPoint(const mus::mojom::Event& event) {
17 return gfx::ToFlooredPoint(gfx::PointF(event.pointer_data->location->x, 20 return gfx::ToFlooredPoint(gfx::PointF(event.pointer_data->location->x,
18 event.pointer_data->location->y)); 21 event.pointer_data->location->y));
19 } 22 }
20 23
21 gfx::Point EventScreenLocationToPoint(const mus::mojom::Event& event) { 24 gfx::Point EventScreenLocationToPoint(const mus::mojom::Event& event) {
22 return gfx::ToFlooredPoint( 25 return gfx::ToFlooredPoint(
23 gfx::PointF(event.pointer_data->location->screen_x, 26 gfx::PointF(event.pointer_data->location->screen_x,
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 const gfx::Rect& new_bounds) { 217 const gfx::Rect& new_bounds) {
215 DCHECK_EQ(window, target_); 218 DCHECK_EQ(window, target_);
216 if (!changing_bounds_) 219 if (!changing_bounds_)
217 Cancel(); 220 Cancel();
218 } 221 }
219 222
220 void MoveLoop::OnWindowVisibilityChanged(mus::Window* window) { 223 void MoveLoop::OnWindowVisibilityChanged(mus::Window* window) {
221 DCHECK_EQ(window, target_); 224 DCHECK_EQ(window, target_);
222 Cancel(); 225 Cancel();
223 } 226 }
227
228 } // namespace wm
229 } // namespace mash
OLDNEW
« 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