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

Unified Diff: ash/launcher/launcher.h

Issue 11451002: Focus launcher if spoken feedback is enabled and no other windows visible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added end to end tests. Created 8 years 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
Index: ash/launcher/launcher.h
diff --git a/ash/launcher/launcher.h b/ash/launcher/launcher.h
index 03de4eca502045d660b903989a5186b9d1ac545a..a934a5bd6e9621482e0a69f98fc7015271e31b99 100644
--- a/ash/launcher/launcher.h
+++ b/ash/launcher/launcher.h
@@ -12,6 +12,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "ui/gfx/size.h"
+#include "ui/views/widget/widget_observer.h"
namespace aura {
class Window;
@@ -38,7 +39,7 @@ class LauncherIconObserver;
class LauncherDelegate;
class LauncherModel;
-class ASH_EXPORT Launcher {
+class ASH_EXPORT Launcher: public views::WidgetObserver {
public:
Launcher(LauncherModel* launcher_model,
LauncherDelegate* launcher_delegate,
@@ -124,6 +125,13 @@ class ASH_EXPORT Launcher {
aura::Window* window_container() { return window_container_; }
+ // Called by the activation delegate, before the launcher is activated
+ // when no other windows are visible.
+ void WillActivateAsFallback() { activating_as_fallback_ = true; }
+
+ // Overridden from views::WidgetObserver:
+ void OnWidgetActivationChanged(views::Widget* widget, bool active) OVERRIDE;
+
private:
class DelegateView;
@@ -149,6 +157,9 @@ class ASH_EXPORT Launcher {
// Used to animate the background.
internal::BackgroundAnimator background_animator_;
+ // Used then activation is forced from the activation delegate.
+ bool activating_as_fallback_;
+
DISALLOW_COPY_AND_ASSIGN(Launcher);
};

Powered by Google App Engine
This is Rietveld 408576698