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_LAUNCHER_LAUNCHER_H_ | 5 #ifndef ASH_LAUNCHER_LAUNCHER_H_ |
6 #define ASH_LAUNCHER_LAUNCHER_H_ | 6 #define ASH_LAUNCHER_LAUNCHER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/launcher/background_animator.h" | 9 #include "ash/launcher/background_animator.h" |
10 #include "ash/launcher/launcher_types.h" | 10 #include "ash/launcher/launcher_types.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 class LauncherIconObserver; | 37 class LauncherIconObserver; |
38 class LauncherDelegate; | 38 class LauncherDelegate; |
39 class LauncherModel; | 39 class LauncherModel; |
40 | 40 |
41 class ASH_EXPORT Launcher { | 41 class ASH_EXPORT Launcher { |
42 public: | 42 public: |
43 Launcher(aura::Window* window_container, | 43 Launcher(aura::Window* window_container, |
44 internal::ShelfLayoutManager* shelf_layout_manager); | 44 internal::ShelfLayoutManager* shelf_layout_manager); |
45 virtual ~Launcher(); | 45 virtual ~Launcher(); |
46 | 46 |
| 47 // Return the launcher for the primary display. NULL if no user is |
| 48 // logged in yet. |
| 49 static Launcher* ForPrimaryDisplay(); |
| 50 |
| 51 // Return the launcher for the display that |window| is currently on, |
| 52 // or a launcher on primary display if the launcher per display feature |
| 53 // is disabled. NULL if no user is logged in yet. |
| 54 static Launcher* ForWindow(aura::Window* window); |
| 55 |
47 // Sets the focus cycler. Also adds the launcher to the cycle. | 56 // Sets the focus cycler. Also adds the launcher to the cycle. |
48 void SetFocusCycler(internal::FocusCycler* focus_cycler); | 57 void SetFocusCycler(internal::FocusCycler* focus_cycler); |
49 internal::FocusCycler* GetFocusCycler(); | 58 internal::FocusCycler* GetFocusCycler(); |
50 | 59 |
51 void SetAlignment(ShelfAlignment alignment); | 60 void SetAlignment(ShelfAlignment alignment); |
52 ShelfAlignment alignment() const { return alignment_; } | 61 ShelfAlignment alignment() const { return alignment_; } |
53 | 62 |
54 // Sets whether the launcher paints a background. Default is false, but is set | 63 // Sets whether the launcher paints a background. Default is false, but is set |
55 // to true if a window overlaps the shelf. | 64 // to true if a window overlaps the shelf. |
56 void SetPaintsBackground( | 65 void SetPaintsBackground( |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 145 |
137 // Used to animate the background. | 146 // Used to animate the background. |
138 internal::BackgroundAnimator background_animator_; | 147 internal::BackgroundAnimator background_animator_; |
139 | 148 |
140 DISALLOW_COPY_AND_ASSIGN(Launcher); | 149 DISALLOW_COPY_AND_ASSIGN(Launcher); |
141 }; | 150 }; |
142 | 151 |
143 } // namespace ash | 152 } // namespace ash |
144 | 153 |
145 #endif // ASH_LAUNCHER_LAUNCHER_H_ | 154 #endif // ASH_LAUNCHER_LAUNCHER_H_ |
OLD | NEW |