| 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_SHELF_SHELF_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ |
| 6 #define ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ | 6 #define ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // the resize handle at the edge of the window can be hit. | 67 // the resize handle at the edge of the window can be hit. |
| 68 static const int kWorkspaceAreaVisibleInset; | 68 static const int kWorkspaceAreaVisibleInset; |
| 69 | 69 |
| 70 // When autohidden we extend the touch hit target onto the screen so that the | 70 // When autohidden we extend the touch hit target onto the screen so that the |
| 71 // user can drag the shelf out. | 71 // user can drag the shelf out. |
| 72 static const int kWorkspaceAreaAutoHideInset; | 72 static const int kWorkspaceAreaAutoHideInset; |
| 73 | 73 |
| 74 // Size of the shelf when auto-hidden. | 74 // Size of the shelf when auto-hidden. |
| 75 static const int kAutoHideSize; | 75 static const int kAutoHideSize; |
| 76 | 76 |
| 77 // The size of the shelf when shown (currently only used in alternate | |
| 78 // settings see ash::switches::UseAlternateShelfLayout). | |
| 79 static const int kShelfSize; | |
| 80 | |
| 81 // Inset between the inner edge of the shelf (towards centre of screen), and | 77 // Inset between the inner edge of the shelf (towards centre of screen), and |
| 82 // the shelf items, notifications, status area etc. | 78 // the shelf items, notifications, status area etc. |
| 83 static const int kShelfItemInset; | 79 static const int kShelfItemInset; |
| 84 | 80 |
| 85 // Returns the preferred size for the shelf (either kShelfPreferredSize or | |
| 86 // kShelfSize). | |
| 87 static int GetPreferredShelfSize(); | |
| 88 | |
| 89 explicit ShelfLayoutManager(ShelfWidget* shelf); | 81 explicit ShelfLayoutManager(ShelfWidget* shelf); |
| 90 virtual ~ShelfLayoutManager(); | 82 virtual ~ShelfLayoutManager(); |
| 91 | 83 |
| 92 // Sets the ShelfAutoHideBehavior. See enum description for details. | 84 // Sets the ShelfAutoHideBehavior. See enum description for details. |
| 93 void SetAutoHideBehavior(ShelfAutoHideBehavior behavior); | 85 void SetAutoHideBehavior(ShelfAutoHideBehavior behavior); |
| 94 ShelfAutoHideBehavior auto_hide_behavior() const { | 86 ShelfAutoHideBehavior auto_hide_behavior() const { |
| 95 return auto_hide_behavior_; | 87 return auto_hide_behavior_; |
| 96 } | 88 } |
| 97 | 89 |
| 98 // Sets the alignment. Returns true if the alignment is changed. Otherwise, | 90 // Sets the alignment. Returns true if the alignment is changed. Otherwise, |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 | 401 |
| 410 // The show hide animation duration override or 0 for default. | 402 // The show hide animation duration override or 0 for default. |
| 411 int duration_override_in_ms_; | 403 int duration_override_in_ms_; |
| 412 | 404 |
| 413 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); | 405 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); |
| 414 }; | 406 }; |
| 415 | 407 |
| 416 } // namespace ash | 408 } // namespace ash |
| 417 | 409 |
| 418 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ | 410 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ |
| OLD | NEW |