Only fsync leveldb's directory when the manifest is being updated.
[chromium-blink-merge.git] / ash / wm / workspace / workspace_event_handler.h
blobf175408c518a7189534bbed1ad6bf82d939c50ce
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.
5 #ifndef ASH_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_H_
6 #define ASH_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_H_
8 #include "ash/wm/toplevel_window_event_handler.h"
9 #include "ash/wm/workspace/multi_window_resize_controller.h"
11 namespace aura {
12 class Window;
15 namespace ash {
16 namespace internal {
18 class WorkspaceEventHandlerTestHelper;
20 class WorkspaceEventHandler : public ToplevelWindowEventHandler {
21 public:
22 explicit WorkspaceEventHandler(aura::Window* owner);
23 virtual ~WorkspaceEventHandler();
25 // Overridden from ToplevelWindowEventHandler:
26 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
27 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
29 private:
30 friend class WorkspaceEventHandlerTestHelper;
32 // Determines if |event| corresponds to a double click on either the top or
33 // bottom vertical resize edge, and if so toggles the vertical height of the
34 // window between its restored state and the full available height of the
35 // workspace.
36 void HandleVerticalResizeDoubleClick(aura::Window* target,
37 ui::MouseEvent* event);
39 MultiWindowResizeController multi_window_resize_controller_;
41 // If non-NULL, set to true in the destructor.
42 bool* destroyed_;
44 DISALLOW_COPY_AND_ASSIGN(WorkspaceEventHandler);
47 } // namespace internal
48 } // namespace ash
50 #endif // ASH_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_H_