Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_WM_SHELF_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_WM_SHELF_LAYOUT_MANAGER_H_ |
| 6 #define ASH_WM_SHELF_LAYOUT_MANAGER_H_ | 6 #define ASH_WM_SHELF_LAYOUT_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
| 10 #include "ash/launcher/launcher.h" | 10 #include "ash/launcher/launcher.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 struct TargetBounds { | 143 struct TargetBounds { |
| 144 TargetBounds() : opacity(0.0f) {} | 144 TargetBounds() : opacity(0.0f) {} |
| 145 | 145 |
| 146 float opacity; | 146 float opacity; |
| 147 gfx::Rect launcher_bounds; | 147 gfx::Rect launcher_bounds; |
| 148 gfx::Rect status_bounds; | 148 gfx::Rect status_bounds; |
| 149 gfx::Insets work_area_insets; | 149 gfx::Insets work_area_insets; |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 struct State { | 152 struct State { |
| 153 State() : visibility_state(VISIBLE), auto_hide_state(AUTO_HIDE_HIDDEN) {} | 153 State() : visibility_state(VISIBLE), auto_hide_state(AUTO_HIDE_HIDDEN), |
|
sky
2012/04/02 21:08:14
when you can't fit all the members on a single lin
flackr
2012/04/02 23:12:46
Done.
| |
| 154 locked_state(false) {} | |
| 154 | 155 |
| 155 // Returns true if the two states are considered equal. As | 156 // Returns true if the two states are considered equal. As |
| 156 // |auto_hide_state| only matters if |visibility_state| is |AUTO_HIDE|, | 157 // |auto_hide_state| only matters if |visibility_state| is |AUTO_HIDE|, |
| 157 // Equals() ignores the |auto_hide_state| as appropriate. | 158 // Equals() ignores the |auto_hide_state| as appropriate. |
| 158 bool Equals(const State& other) const { | 159 bool Equals(const State& other) const { |
| 159 return other.visibility_state == visibility_state && | 160 return other.visibility_state == visibility_state && |
| 160 (visibility_state != AUTO_HIDE || | 161 (visibility_state != AUTO_HIDE || |
| 161 other.auto_hide_state == auto_hide_state); | 162 other.auto_hide_state == auto_hide_state) && |
| 163 other.locked_state == locked_state; | |
| 162 } | 164 } |
| 163 | 165 |
| 164 VisibilityState visibility_state; | 166 VisibilityState visibility_state; |
| 165 AutoHideState auto_hide_state; | 167 AutoHideState auto_hide_state; |
| 168 bool locked_state; | |
|
sky
2012/04/02 21:08:14
locked_state -> is_screen_locked
flackr
2012/04/02 23:12:46
Done.
| |
| 166 }; | 169 }; |
| 167 | 170 |
| 168 // Sets the visibility of the shelf to |state|. | 171 // Sets the visibility of the shelf to |state|. |
| 169 void SetState(VisibilityState visibility_state); | 172 void SetState(VisibilityState visibility_state); |
| 170 | 173 |
| 171 // Stops any animations. | 174 // Stops any animations. |
| 172 void StopAnimating(); | 175 void StopAnimating(); |
| 173 | 176 |
| 174 // Calculates the target bounds assuming visibility of |visible|. | 177 // Calculates the target bounds assuming visibility of |visible|. |
| 175 void CalculateTargetBounds(const State& state, | 178 void CalculateTargetBounds(const State& state, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 223 // trigger showing the launcher. | 226 // trigger showing the launcher. |
| 224 scoped_ptr<AutoHideEventFilter> event_filter_; | 227 scoped_ptr<AutoHideEventFilter> event_filter_; |
| 225 | 228 |
| 226 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); | 229 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); |
| 227 }; | 230 }; |
| 228 | 231 |
| 229 } // namespace internal | 232 } // namespace internal |
| 230 } // namespace ash | 233 } // namespace ash |
| 231 | 234 |
| 232 #endif // ASH_WM_SHELF_LAYOUT_MANAGER_H_ | 235 #endif // ASH_WM_SHELF_LAYOUT_MANAGER_H_ |
| OLD | NEW |