Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2596)

Unified Diff: ash/launcher/launcher.h

Issue 9764008: Makes the launcher auto-hide for maximized windows. This turned out to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add null checks and cleanup Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/launcher/launcher.cc » ('j') | ash/launcher/launcher.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/launcher/launcher.h
diff --git a/ash/launcher/launcher.h b/ash/launcher/launcher.h
index 6825771cc4e31c2689e399b13d07cf092320d3b7..f419f8c7da9ab73fedda78910fed27318f8a2180 100644
--- a/ash/launcher/launcher.h
+++ b/ash/launcher/launcher.h
@@ -9,6 +9,8 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "ash/ash_export.h"
+#include "ui/base/animation/animation_delegate.h"
+#include "ui/base/animation/slide_animation.h"
namespace aura {
class Window;
@@ -32,14 +34,24 @@ class LauncherView;
class LauncherDelegate;
class LauncherModel;
-class ASH_EXPORT Launcher {
+class ASH_EXPORT Launcher : public ui::AnimationDelegate {
public:
+ // How the background can be changed.
+ enum BackgroundChangeSpeed {
+ CHANGE_ANIMATE,
+ CHANGE_IMMEDIATE
+ };
+
explicit Launcher(aura::Window* window_container);
~Launcher();
// Sets the focus cycler.
void SetFocusCycler(const internal::FocusCycler* focus_cycler);
+ // Sets whether the launcher renders a background. Default is false, but is
+ // set to true if a window overlaps the shelf.
+ void SetRendersBackground(bool value, BackgroundChangeSpeed speed);
+
// Sets the width of the status area.
void SetStatusWidth(int width);
int GetStatusWidth();
@@ -57,6 +69,9 @@ class ASH_EXPORT Launcher {
aura::Window* window_container() { return window_container_; }
+ // ui::AnimationDelegate overrides:
+ virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
+
private:
class DelegateView;
@@ -75,6 +90,15 @@ class ASH_EXPORT Launcher {
scoped_ptr<LauncherDelegate> delegate_;
+ // Used to animate the background.
+ ui::SlideAnimation background_animation_;
+
+ // Whether we render a background.
+ bool renders_background_;
+
+ // Current alpha value of the background.
+ int background_alpha_;
+
DISALLOW_COPY_AND_ASSIGN(Launcher);
};
« no previous file with comments | « no previous file | ash/launcher/launcher.cc » ('j') | ash/launcher/launcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698