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

Unified Diff: ash/wm/activation_controller.cc

Issue 9570013: Activate the status area only when it's focused using the keyboard (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: uber tray support Created 8 years, 10 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
« ash/system/tray/system_tray.cc ('K') | « ash/system/tray/system_tray.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/activation_controller.cc
diff --git a/ash/wm/activation_controller.cc b/ash/wm/activation_controller.cc
index c90846ad5a5aa24b3709d03d8936c39075a0e262..7a035d0853cfb05e6038d01d2b468ffa4b79751d 100644
--- a/ash/wm/activation_controller.cc
+++ b/ash/wm/activation_controller.cc
@@ -4,13 +4,16 @@
#include "ash/wm/activation_controller.h"
+#include "ash/ash_switches.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/wm/window_modality_controller.h"
#include "ash/wm/window_util.h"
#include "base/auto_reset.h"
+#include "base/command_line.h"
#include "ui/aura/client/activation_delegate.h"
#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/client/window_types.h"
#include "ui/aura/env.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
@@ -202,8 +205,12 @@ void ActivationController::OnWindowFocused(aura::Window* window) {
// ActivationController, private:
void ActivationController::ActivateNextWindow(aura::Window* window) {
- if (wm::IsActiveWindow(window))
+ if (wm::IsActiveWindow(window) ||
+ // TODO(yusukes): Remove the code when uber tray becomes the default.
+ (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshUberTray) &&
+ window && window->type() == aura::client::WINDOW_TYPE_MENU)) {
sadrul 2012/03/02 10:17:01 I wonder if you can just use if (window && windo
Yusuke Sato 2012/03/02 11:51:09 To handle the uber tray here, I tried this: windo
ActivateWindow(GetTopmostWindowToActivate(window));
+ }
}
aura::Window* ActivationController::GetTopmostWindowToActivate(
« ash/system/tray/system_tray.cc ('K') | « ash/system/tray/system_tray.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698