OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_H_ | 5 #ifndef ASH_SHELF_SHELF_H_ |
6 #define ASH_SHELF_SHELF_H_ | 6 #define ASH_SHELF_SHELF_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // Return the shelf for the primary display. NULL if no user is logged in yet. | 61 // Return the shelf for the primary display. NULL if no user is logged in yet. |
62 // Useful for tests. For production code use ForWindow() because the user may | 62 // Useful for tests. For production code use ForWindow() because the user may |
63 // have multiple displays. | 63 // have multiple displays. |
64 static Shelf* ForPrimaryDisplay(); | 64 static Shelf* ForPrimaryDisplay(); |
65 | 65 |
66 // Return the shelf for the display that |window| is currently on, or a shelf | 66 // Return the shelf for the display that |window| is currently on, or a shelf |
67 // on primary display if the shelf per display feature is disabled. NULL if no | 67 // on primary display if the shelf per display feature is disabled. NULL if no |
68 // user is logged in yet. | 68 // user is logged in yet. |
69 static Shelf* ForWindow(const aura::Window* window); | 69 static Shelf* ForWindow(const aura::Window* window); |
70 | 70 |
71 // Returns the shelf for the display with |display_id| or null if that display | |
72 // does not exist or does not have a shelf. | |
73 static Shelf* ForDisplayId(int64_t display_id); | |
74 | |
75 void SetAlignment(ShelfAlignment alignment); | 71 void SetAlignment(ShelfAlignment alignment); |
76 ShelfAlignment alignment() const { return alignment_; } | 72 ShelfAlignment alignment() const { return alignment_; } |
77 bool IsHorizontalAlignment() const; | 73 bool IsHorizontalAlignment() const; |
78 | 74 |
79 // Sets the ShelfAutoHideBehavior. See enum description for details. | 75 // Sets the ShelfAutoHideBehavior. See enum description for details. |
80 void SetAutoHideBehavior(ShelfAutoHideBehavior auto_hide_behavior); | 76 void SetAutoHideBehavior(ShelfAutoHideBehavior auto_hide_behavior); |
81 ShelfAutoHideBehavior auto_hide_behavior() const { | 77 ShelfAutoHideBehavior auto_hide_behavior() const { |
82 return auto_hide_behavior_; | 78 return auto_hide_behavior_; |
83 } | 79 } |
84 | 80 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 164 |
169 ShelfAlignment alignment_ = SHELF_ALIGNMENT_BOTTOM; | 165 ShelfAlignment alignment_ = SHELF_ALIGNMENT_BOTTOM; |
170 ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER; | 166 ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER; |
171 | 167 |
172 DISALLOW_COPY_AND_ASSIGN(Shelf); | 168 DISALLOW_COPY_AND_ASSIGN(Shelf); |
173 }; | 169 }; |
174 | 170 |
175 } // namespace ash | 171 } // namespace ash |
176 | 172 |
177 #endif // ASH_SHELF_SHELF_H_ | 173 #endif // ASH_SHELF_SHELF_H_ |
OLD | NEW |