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

Side by Side Diff: ash/wm/workspace/workspace_cycler.h

Issue 11417150: Implement workspace scrubbing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « ash/ash_switches.cc ('k') | ash/wm/workspace/workspace_cycler.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 (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_WM_WORKSPACE_WORKSPACE_CYCLER_H_
6 #define ASH_WM_WORKSPACE_WORKSPACE_CYCLER_H_
7
8 #include "ash/ash_export.h"
9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h"
11 #include "ui/base/events/event_handler.h"
12
13 namespace ash {
14 namespace internal {
15
16 class WorkspaceManager;
17
18 // Class to enable quick workspace switching (scrubbing) via 3 finger vertical
19 // scroll.
20 class ASH_EXPORT WorkspaceCycler : public ui::EventHandler {
21 public:
22 explicit WorkspaceCycler(WorkspaceManager* workspace_manager);
23 virtual ~WorkspaceCycler();
24
25 private:
26 // ui::EventHandler overrides:
27 virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
28
29 WorkspaceManager* workspace_manager_;
30
31 // Whether the user is scrubbing through workspaces.
32 bool scrubbing_;
33
34 // The amount of scrolling which has occurred since the last time the
35 // workspace was switched. If scrubbing has just begun, |scroll_x_| and
36 // |scroll_y_| are set to 0.
37 int scroll_x_;
38 int scroll_y_;
39
40 DISALLOW_COPY_AND_ASSIGN(WorkspaceCycler);
41 };
42
43 } // namespace internal
44 } // namespace ash
45
46 #endif // ASH_WM_WORKSPACE_WORKSPACE_CYCLER_H_
OLDNEW
« no previous file with comments | « ash/ash_switches.cc ('k') | ash/wm/workspace/workspace_cycler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698