Chromium Code Reviews| 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( |