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

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

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: rebase Created 4 years, 11 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/accelerator_registrar_apptest.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 #include "mash/wm/frame/move_event_handler.h" 5 #include "mash/wm/frame/move_event_handler.h"
6 6
7 #include "components/mus/public/cpp/window.h" 7 #include "components/mus/public/cpp/window.h"
8 #include "components/mus/public/interfaces/cursor.mojom.h" 8 #include "components/mus/public/interfaces/cursor.mojom.h"
9 #include "mash/wm/frame/move_loop.h" 9 #include "mash/wm/frame/move_loop.h"
10 #include "mojo/converters/input_events/input_events_type_converters.h" 10 #include "mojo/converters/input_events/input_events_type_converters.h"
11 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
12 #include "ui/aura/window_delegate.h" 12 #include "ui/aura/window_delegate.h"
13 #include "ui/base/hit_test.h" 13 #include "ui/base/hit_test.h"
14 #include "ui/events/event.h" 14 #include "ui/events/event.h"
15 15
16 namespace mash { 16 namespace mash {
17 namespace wm { 17 namespace wm {
18 namespace { 18 namespace {
19 19
20 mus::mojom::Cursor CursorForWindowComponent(int window_component) { 20 mus::mojom::Cursor CursorForWindowComponent(int window_component) {
21 switch (window_component) { 21 switch (window_component) {
22 case HTBOTTOM: 22 case HTBOTTOM:
23 return mus::mojom::Cursor::CURSOR_SOUTH_RESIZE; 23 return mus::mojom::Cursor::SOUTH_RESIZE;
24 case HTBOTTOMLEFT: 24 case HTBOTTOMLEFT:
25 return mus::mojom::Cursor::CURSOR_SOUTH_WEST_RESIZE; 25 return mus::mojom::Cursor::SOUTH_WEST_RESIZE;
26 case HTBOTTOMRIGHT: 26 case HTBOTTOMRIGHT:
27 return mus::mojom::Cursor::CURSOR_SOUTH_EAST_RESIZE; 27 return mus::mojom::Cursor::SOUTH_EAST_RESIZE;
28 case HTLEFT: 28 case HTLEFT:
29 return mus::mojom::Cursor::CURSOR_WEST_RESIZE; 29 return mus::mojom::Cursor::WEST_RESIZE;
30 case HTRIGHT: 30 case HTRIGHT:
31 return mus::mojom::Cursor::CURSOR_EAST_RESIZE; 31 return mus::mojom::Cursor::EAST_RESIZE;
32 case HTTOP: 32 case HTTOP:
33 return mus::mojom::Cursor::CURSOR_NORTH_RESIZE; 33 return mus::mojom::Cursor::NORTH_RESIZE;
34 case HTTOPLEFT: 34 case HTTOPLEFT:
35 return mus::mojom::Cursor::CURSOR_NORTH_WEST_RESIZE; 35 return mus::mojom::Cursor::NORTH_WEST_RESIZE;
36 case HTTOPRIGHT: 36 case HTTOPRIGHT:
37 return mus::mojom::Cursor::CURSOR_NORTH_EAST_RESIZE; 37 return mus::mojom::Cursor::NORTH_EAST_RESIZE;
38 default: 38 default:
39 return mus::mojom::Cursor::CURSOR_NULL; 39 return mus::mojom::Cursor::CURSOR_NULL;
40 } 40 }
41 } 41 }
42 42
43 } // namespace 43 } // namespace
44 44
45 MoveEventHandler::MoveEventHandler(mus::Window* mus_window, 45 MoveEventHandler::MoveEventHandler(mus::Window* mus_window,
46 aura::Window* aura_window) 46 aura::Window* aura_window)
47 : mus_window_(mus_window), aura_window_(aura_window), 47 : mus_window_(mus_window), aura_window_(aura_window),
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 event->SetHandled(); 107 event->SetHandled();
108 } 108 }
109 109
110 void MoveEventHandler::OnWindowDestroying(aura::Window* window) { 110 void MoveEventHandler::OnWindowDestroying(aura::Window* window) {
111 DCHECK_EQ(root_window_, window); 111 DCHECK_EQ(root_window_, window);
112 Detach(); 112 Detach();
113 } 113 }
114 114
115 } // namespace wm 115 } // namespace wm
116 } // namespace mash 116 } // namespace mash
OLDNEW
« no previous file with comments | « mash/wm/accelerator_registrar_apptest.cc ('k') | mash/wm/frame/move_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698