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_H_ | 5 #ifndef ASH_LAUNCHER_VIEW_MODEL_H_ |
6 #define ASH_LAUNCHER_VIEW_MODEL_H_ | 6 #define ASH_LAUNCHER_VIEW_MODEL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "ash/ash_export.h" | 12 #include "ash/ash_export.h" |
13 #include "ui/gfx/rect.h" | 13 #include "ui/gfx/rect.h" |
14 | 14 |
15 namespace views { | 15 namespace views { |
16 class View; | 16 class View; |
17 } | 17 } |
18 | 18 |
19 namespace aura_shell { | 19 namespace ash { |
20 | 20 |
21 // ViewModel is used to track an 'interesting' set of a views. Often times | 21 // ViewModel is used to track an 'interesting' set of a views. Often times |
22 // during animations views are removed after a delay, which makes for tricky | 22 // during animations views are removed after a delay, which makes for tricky |
23 // coordinate conversion as you have to account for the possibility of the | 23 // coordinate conversion as you have to account for the possibility of the |
24 // indices from the model not lining up with those you expect. This class lets | 24 // indices from the model not lining up with those you expect. This class lets |
25 // you define the 'interesting' views and operate on those views. | 25 // you define the 'interesting' views and operate on those views. |
26 class ASH_EXPORT ViewModel { | 26 class ASH_EXPORT ViewModel { |
27 public: | 27 public: |
28 ViewModel(); | 28 ViewModel(); |
29 ~ViewModel(); | 29 ~ViewModel(); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 views::View* view; | 70 views::View* view; |
71 gfx::Rect ideal_bounds; | 71 gfx::Rect ideal_bounds; |
72 }; | 72 }; |
73 typedef std::vector<Entry> Entries; | 73 typedef std::vector<Entry> Entries; |
74 | 74 |
75 Entries entries_; | 75 Entries entries_; |
76 | 76 |
77 DISALLOW_COPY_AND_ASSIGN(ViewModel); | 77 DISALLOW_COPY_AND_ASSIGN(ViewModel); |
78 }; | 78 }; |
79 | 79 |
80 } // namespace aura_shell | 80 } // namespace ash |
81 | 81 |
82 #endif // ASH_LAUNCHER_VIEW_MODEL_H_ | 82 #endif // ASH_LAUNCHER_VIEW_MODEL_H_ |
OLD | NEW |