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

Side by Side Diff: ash/common/wm/workspace/workspace_event_handler.h

Issue 2734653002: chromeos: Move files in //ash/common to //ash (Closed)
Patch Set: fix a11y tests, fix docs Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_COMMON_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_H_
6 #define ASH_COMMON_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_H_
7
8 #include "ash/ash_export.h"
9 #include "ash/common/wm/workspace/multi_window_resize_controller.h"
10 #include "base/macros.h"
11
12 namespace ui {
13 class GestureEvent;
14 class MouseEvent;
15 }
16
17 namespace ash {
18 class WmWindow;
19 class WorkspaceEventHandlerTestHelper;
20
21 namespace wm {
22 class WindowState;
23 }
24
25 // ui::EventHandler like class installed on the window associated with
26 // WorkspaceLayoutManager. This handles various events happening on child
27 // windows and takes appropriate action. It is expected the environment specific
28 // file calls OnMouseEvent()/OnGestureEvent() as appropriate.
29 class ASH_EXPORT WorkspaceEventHandler {
30 public:
31 WorkspaceEventHandler();
32 virtual ~WorkspaceEventHandler();
33
34 void OnMouseEvent(ui::MouseEvent* event, WmWindow* target);
35 void OnGestureEvent(ui::GestureEvent* event, WmWindow* target);
36
37 private:
38 friend class WorkspaceEventHandlerTestHelper;
39
40 // Determines if |event| corresponds to a double click on either the top or
41 // bottom vertical resize edge, and if so toggles the vertical height of the
42 // window between its restored state and the full available height of the
43 // workspace.
44 void HandleVerticalResizeDoubleClick(wm::WindowState* window_state,
45 ui::MouseEvent* event);
46
47 MultiWindowResizeController multi_window_resize_controller_;
48
49 // The non-client component for the target of a MouseEvent or GestureEvent.
50 // Events can be destructive to the window tree, which can cause the
51 // component of a ui::EF_IS_DOUBLE_CLICK event to no longer be the same as
52 // that of the initial click. Acting on a double click should only occur for
53 // matching components. This will be set for left clicks, and tap events.
54 int click_component_;
55
56 DISALLOW_COPY_AND_ASSIGN(WorkspaceEventHandler);
57 };
58
59 } // namespace ash
60
61 #endif // ASH_COMMON_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_H_
OLDNEW
« no previous file with comments | « ash/common/wm/workspace/two_step_edge_cycler.cc ('k') | ash/common/wm/workspace/workspace_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698