OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_LAUNCHER_VIEW_MODEL_UTILS_H_ | 5 #ifndef ASH_LAUNCHER_VIEW_MODEL_UTILS_H_ |
6 #define ASH_LAUNCHER_VIEW_MODEL_UTILS_H_ | 6 #define ASH_LAUNCHER_VIEW_MODEL_UTILS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
11 | 11 |
12 namespace views { | 12 namespace views { |
13 class View; | 13 class View; |
14 } | 14 } |
15 | 15 |
16 namespace aura_shell { | 16 namespace ash { |
17 | 17 |
18 class ViewModel; | 18 class ViewModel; |
19 | 19 |
20 class ASH_EXPORT ViewModelUtils { | 20 class ASH_EXPORT ViewModelUtils { |
21 public: | 21 public: |
22 // Sets the bounds of each view to its ideal bounds. | 22 // Sets the bounds of each view to its ideal bounds. |
23 static void SetViewBoundsToIdealBounds(const ViewModel& model); | 23 static void SetViewBoundsToIdealBounds(const ViewModel& model); |
24 | 24 |
25 // Returns the index to move |view| to based on a x-coordinate of |x|. | 25 // Returns the index to move |view| to based on a x-coordinate of |x|. |
26 static int DetermineMoveIndex(const ViewModel& model, | 26 static int DetermineMoveIndex(const ViewModel& model, |
27 views::View* view, | 27 views::View* view, |
28 int x); | 28 int x); |
29 | 29 |
30 private: | 30 private: |
31 DISALLOW_IMPLICIT_CONSTRUCTORS(ViewModelUtils); | 31 DISALLOW_IMPLICIT_CONSTRUCTORS(ViewModelUtils); |
32 }; | 32 }; |
33 | 33 |
34 } // namespace aura_shell | 34 } // namespace ash |
35 | 35 |
36 #endif // ASH_LAUNCHER_VIEW_MODEL_UTILS_H_ | 36 #endif // ASH_LAUNCHER_VIEW_MODEL_UTILS_H_ |
OLD | NEW |