Only fsync leveldb's directory when the manifest is being updated.
[chromium-blink-merge.git] / ash / wm / workspace / workspace_cycler_configuration.h
blobf996a1a1f7358d9a9d95227f04078bbc945ea573
1 // Copyright (c) 2013 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_CYCLER_CONFIGURATION_H_
6 #define ASH_WM_WORKSPACE_WORKSPACE_CYCLER_CONFIGURATION_H_
8 #include "ash/ash_export.h"
9 #include "base/basictypes.h"
11 namespace base {
12 class ListValue;
15 namespace ash {
17 // Sets and retrieves properties related to cycling workspaces.
18 class ASH_EXPORT WorkspaceCyclerConfiguration {
19 public:
20 enum Property {
21 // The y offsets for the workspaces which are shallower than the selected
22 // workspace with respect to the top of the screen workarea. The offset at
23 // index 0 is for the workspace closest to the selected workspace. The size
24 // of the ListValue limits the amount of visible workspaces shallower than
25 // the selected workspace.
26 SHALLOWER_THAN_SELECTED_Y_OFFSETS,
28 // The y offsets for the workspaces which are deeper than the selected
29 // workspace with respect to the bottom of the screen workarea. The offset
30 // at index 0 is for the workspace closest to the selected workspace. The
31 // size of the ListValue limits the amount of visible workspaces deeper
32 // than the selected workspace.
33 DEEPER_THAN_SELECTED_Y_OFFSETS,
35 // The y offset of the selected workspace with respect to the top of the
36 // screen workarea.
37 SELECTED_Y_OFFSET,
39 SELECTED_SCALE,
40 MIN_SCALE,
41 MAX_SCALE,
42 MIN_BRIGHTNESS,
44 // The background opacity while the user is cycling through workspaces.
45 BACKGROUND_OPACITY,
47 // The brightness of the desktop workspace.
48 DESKTOP_WORKSPACE_BRIGHTNESS,
50 // The vertical scroll distance in pixels to initiate workspace cycling.
51 DISTANCE_TO_INITIATE_CYCLING,
53 // The vertical scroll distance in pixels to cycle to the next / previous
54 // workspace.
55 SCROLL_DISTANCE_TO_CYCLE_TO_NEXT_WORKSPACE,
57 // The ratio of the duration of the animation in milliseconds to the amount
58 // that the user has scrolled vertically in pixels.
59 // The duration of the animation is computed by: distance_scrolled * ratio
60 CYCLER_STEP_ANIMATION_DURATION_RATIO,
62 // The duration in milliseconds of the animations when animating starting
63 // the cycler.
64 START_CYCLER_ANIMATION_DURATION,
66 // The duration in milliseconds of the animations when animating stopping
67 // the cycler.
68 STOP_CYCLER_ANIMATION_DURATION,
71 // Returns true if the cycler is enabled.
72 static bool IsCyclerEnabled();
74 // Returns true if |property| is of type base::ListValue.
75 static bool IsListProperty(Property property);
77 // Sets |property| to |list_value|.
78 static void SetListValue(Property property,
79 const base::ListValue& list_value);
81 // Sets |property| to |value|.
82 static void SetDouble(Property property, double value);
84 // Gets the ListValue associated with |property|.
85 static const base::ListValue& GetListValue(Property property);
87 // Gets the double associated with |property|.
88 static double GetDouble(Property property);
90 private:
91 DISALLOW_IMPLICIT_CONSTRUCTORS(WorkspaceCyclerConfiguration);
94 } // namespace ash
96 #endif // ASH_WM_WORKSPACE_WORKSPACE_CYCLER_ANIMATOR_CONFIGURATION_H_