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

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

Issue 2029883002: Moves mash/wm into ash/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_static_assert
Patch Set: move comment Created 4 years, 6 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/header_painter_util.cc ('k') | mash/wm/frame/move_event_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MASH_WM_FRAME_MOVE_EVENT_HANDLER_H_
6 #define MASH_WM_FRAME_MOVE_EVENT_HANDLER_H_
7
8 #include <memory>
9
10 #include "ash/common/wm/wm_toplevel_window_event_handler.h"
11 #include "base/macros.h"
12 #include "ui/aura/window_observer.h"
13 #include "ui/events/event_handler.h"
14
15 namespace aura {
16 class Window;
17 }
18
19 namespace mus {
20 class Window;
21 class WindowManagerClient;
22 }
23
24 namespace ui {
25 class CancelModeEvent;
26 }
27
28 namespace mash {
29 namespace wm {
30
31 class WmWindowMus;
32
33 // EventHandler attached to windows that may be dragged and/or resized. This
34 // forwards to WmToplevelWindowEventHandler to handle the actual drag/resize.
35 class MoveEventHandler : public ui::EventHandler, public aura::WindowObserver {
36 public:
37 MoveEventHandler(mus::Window* mus_window,
38 mus::WindowManagerClient* window_manager_client,
39 aura::Window* aura_window);
40 ~MoveEventHandler() override;
41
42 private:
43 // Removes observer and EventHandler installed on |root_window_|.
44 void Detach();
45
46 // Overridden from ui::EventHandler:
47 void OnMouseEvent(ui::MouseEvent* event) override;
48 void OnGestureEvent(ui::GestureEvent* event) override;
49 void OnCancelMode(ui::CancelModeEvent* event) override;
50
51 // Overridden from aura::WindowObserver:
52 void OnWindowDestroying(aura::Window* window) override;
53
54 WmWindowMus* wm_window_;
55 mus::WindowManagerClient* window_manager_client_;
56 // The root window of the aura::Window supplied to the constructor.
57 // MoveEventHandler is added as a pre-target handler (and observer) of this.
58 aura::Window* root_window_;
59 ash::wm::WmToplevelWindowEventHandler toplevel_window_event_handler_;
60
61 DISALLOW_COPY_AND_ASSIGN(MoveEventHandler);
62 };
63
64 } // namespace wm
65 } // namespace mash
66
67 #endif // MASH_WM_FRAME_MOVE_EVENT_HANDLER_H_
OLDNEW
« no previous file with comments | « mash/wm/frame/header_painter_util.cc ('k') | mash/wm/frame/move_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698