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

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: Cleaned up the code. 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
« no previous file with comments | « no previous file | ash/launcher/launcher.cc » ('j') | ash/wm/ash_activation_controller.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 64a6a47c658eb894e71e4fe9faedd721d34eb563..e79eacbbbeeed3495795aa34cb5e04e98d5bc460 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(aura::Window* window_container,
internal::ShelfLayoutManager* shelf_layout_manager);
@@ -119,6 +120,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);
+
private:
class DelegateView;
@@ -146,6 +154,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);
};
« no previous file with comments | « no previous file | ash/launcher/launcher.cc » ('j') | ash/wm/ash_activation_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698