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

Side by Side Diff: ash/wm/common/wm_toplevel_window_event_handler.h

Issue 2002243002: Gets mash to use WmToplevelWindowEventHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 years, 7 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 | « no previous file | mash/wm/BUILD.gn » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 ASH_WM_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_ 5 #ifndef ASH_WM_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_
6 #define ASH_WM_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_ 6 #define ASH_WM_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/wm/common/ash_wm_common_export.h" 10 #include "ash/wm/common/ash_wm_common_export.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // not run if the drag does not start. 61 // not run if the drag does not start.
62 bool AttemptToStartDrag(WmWindow* window, 62 bool AttemptToStartDrag(WmWindow* window,
63 const gfx::Point& point_in_parent, 63 const gfx::Point& point_in_parent,
64 int window_component, 64 int window_component,
65 aura::client::WindowMoveSource source, 65 aura::client::WindowMoveSource source,
66 const EndClosure& end_closure); 66 const EndClosure& end_closure);
67 67
68 // If there is a drag in progress it is reverted, otherwise does nothing. 68 // If there is a drag in progress it is reverted, otherwise does nothing.
69 void RevertDrag(); 69 void RevertDrag();
70 70
71 // Returns true if there is a drag in progress.
72 bool is_drag_in_progress() const { return window_resizer_.get() != nullptr; }
73
71 private: 74 private:
72 class ScopedWindowResizer; 75 class ScopedWindowResizer;
73 76
74 // Completes or reverts the drag if one is in progress. Returns true if a 77 // Completes or reverts the drag if one is in progress. Returns true if a
75 // drag was completed or reverted. 78 // drag was completed or reverted.
76 bool CompleteDrag(DragResult result); 79 bool CompleteDrag(DragResult result);
77 80
78 void HandleMousePressed(WmWindow* target, ui::MouseEvent* event); 81 void HandleMousePressed(WmWindow* target, ui::MouseEvent* event);
79 void HandleMouseReleased(WmWindow* target, ui::MouseEvent* event); 82 void HandleMouseReleased(WmWindow* target, ui::MouseEvent* event);
80 83
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 122
120 EndClosure end_closure_; 123 EndClosure end_closure_;
121 124
122 DISALLOW_COPY_AND_ASSIGN(WmToplevelWindowEventHandler); 125 DISALLOW_COPY_AND_ASSIGN(WmToplevelWindowEventHandler);
123 }; 126 };
124 127
125 } // namespace wm 128 } // namespace wm
126 } // namespace ash 129 } // namespace ash
127 130
128 #endif // ASH_WM_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_ 131 #endif // ASH_WM_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | mash/wm/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698