| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ash/launcher/background_animator.h" | 9 #include "ash/launcher/background_animator.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class Widget; | 23 class Widget; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace ash { | 26 namespace ash { |
| 27 | 27 |
| 28 namespace internal { | 28 namespace internal { |
| 29 class FocusCycler; | 29 class FocusCycler; |
| 30 class LauncherView; | 30 class LauncherView; |
| 31 } | 31 } |
| 32 | 32 |
| 33 class LauncherIconObserver; | |
| 34 class LauncherDelegate; | 33 class LauncherDelegate; |
| 35 class LauncherModel; | 34 class LauncherModel; |
| 36 | 35 |
| 37 class ASH_EXPORT Launcher : public internal::BackgroundAnimatorDelegate { | 36 class ASH_EXPORT Launcher : public internal::BackgroundAnimatorDelegate { |
| 38 public: | 37 public: |
| 39 explicit Launcher(aura::Window* window_container); | 38 explicit Launcher(aura::Window* window_container); |
| 40 virtual ~Launcher(); | 39 virtual ~Launcher(); |
| 41 | 40 |
| 42 // Sets the focus cycler. Also adds the launcher to the cycle. | 41 // Sets the focus cycler. Also adds the launcher to the cycle. |
| 43 void SetFocusCycler(internal::FocusCycler* focus_cycler); | 42 void SetFocusCycler(internal::FocusCycler* focus_cycler); |
| 44 internal::FocusCycler* GetFocusCycler(); | 43 internal::FocusCycler* GetFocusCycler(); |
| 45 | 44 |
| 46 // Sets whether the launcher paints a background. Default is false, but is set | 45 // Sets whether the launcher paints a background. Default is false, but is set |
| 47 // to true if a window overlaps the shelf. | 46 // to true if a window overlaps the shelf. |
| 48 void SetPaintsBackground( | 47 void SetPaintsBackground( |
| 49 bool value, | 48 bool value, |
| 50 internal::BackgroundAnimator::ChangeType change_type); | 49 internal::BackgroundAnimator::ChangeType change_type); |
| 51 | 50 |
| 52 // Sets the width of the status area. | 51 // Sets the width of the status area. |
| 53 void SetStatusWidth(int width); | 52 void SetStatusWidth(int width); |
| 54 int GetStatusWidth(); | 53 int GetStatusWidth(); |
| 55 | 54 |
| 56 // Returns the screen bounds of the item for the specified window. If there is | 55 // Returns the screen bounds of the item for the specified window. If there is |
| 57 // no item for the specified window an empty rect is returned. | 56 // no item for the specified window an empty rect is returned. |
| 58 gfx::Rect GetScreenBoundsOfItemIconForWindow(aura::Window* window); | 57 gfx::Rect GetScreenBoundsOfItemIconForWindow(aura::Window* window); |
| 59 | 58 |
| 60 void AddIconObserver(LauncherIconObserver* observer); | |
| 61 void RemoveIconObserver(LauncherIconObserver* observer); | |
| 62 | |
| 63 // Returns true if the Launcher is showing a context menu. | 59 // Returns true if the Launcher is showing a context menu. |
| 64 bool IsShowingMenu() const; | 60 bool IsShowingMenu() const; |
| 65 | 61 |
| 66 // Only to be called for testing. Retrieves the LauncherView. | 62 // Only to be called for testing. Retrieves the LauncherView. |
| 67 // TODO(sky): remove this! | 63 // TODO(sky): remove this! |
| 68 internal::LauncherView* GetLauncherViewForTest(); | 64 internal::LauncherView* GetLauncherViewForTest(); |
| 69 | 65 |
| 70 LauncherDelegate* delegate() { return delegate_.get(); } | 66 LauncherDelegate* delegate() { return delegate_.get(); } |
| 71 | 67 |
| 72 LauncherModel* model() { return model_.get(); } | 68 LauncherModel* model() { return model_.get(); } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 97 | 93 |
| 98 // Used to animate the background. | 94 // Used to animate the background. |
| 99 internal::BackgroundAnimator background_animator_; | 95 internal::BackgroundAnimator background_animator_; |
| 100 | 96 |
| 101 DISALLOW_COPY_AND_ASSIGN(Launcher); | 97 DISALLOW_COPY_AND_ASSIGN(Launcher); |
| 102 }; | 98 }; |
| 103 | 99 |
| 104 } // namespace ash | 100 } // namespace ash |
| 105 | 101 |
| 106 #endif // ASH_LAUNCHER_LAUNCHER_H_ | 102 #endif // ASH_LAUNCHER_LAUNCHER_H_ |
| OLD | NEW |