Index: ash/system/tray/system_tray.cc |
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc |
index 1f7104ab4bf977d27ecca231f496f9f3a8a3fa71..74f0fd9cf2d7d092bc074f377ca06f8692e991b4 100644 |
--- a/ash/system/tray/system_tray.cc |
+++ b/ash/system/tray/system_tray.cc |
@@ -4,12 +4,15 @@ |
#include "ash/system/tray/system_tray.h" |
+#include "ash/shell.h" |
#include "ash/shell/panel_window.h" |
+#include "ash/shell_delegate.h" |
#include "ash/system/tray/system_tray_item.h" |
#include "ash/wm/shadow_types.h" |
#include "base/logging.h" |
#include "base/utf_string_conversions.h" |
#include "third_party/skia/include/core/SkColor.h" |
+#include "ui/aura/client/activation_client.h" |
#include "ui/views/border.h" |
#include "ui/views/bubble/bubble_delegate.h" |
#include "ui/views/controls/label.h" |
@@ -42,6 +45,7 @@ class SystemTrayBubble : public views::BubbleDelegateView { |
else |
(*it)->DestroyDefaultView(); |
} |
+ ActivateBrowserWindow(); |
} |
private: |
@@ -62,6 +66,16 @@ class SystemTrayBubble : public views::BubbleDelegateView { |
} |
} |
+ void ActivateBrowserWindow() { |
+ const std::vector<aura::Window*>& windows = |
+ ash::Shell::GetInstance()->delegate()->GetCycleWindowList( |
Daniel Erat
2012/03/02 16:49:19
it seems a bit strange to have this class reach in
Yusuke Sato
2012/03/05 12:56:24
Removed the code. Modified kWindowContainerIds[] i
|
+ ash::ShellDelegate::SOURCE_LAUNCHER, ash::ShellDelegate::ORDER_MRU); |
+ if (!windows.empty()) { |
+ aura::client::GetActivationClient(ash::Shell::GetRootWindow())-> |
+ ActivateWindow(windows[0]); |
+ } |
+ } |
+ |
ash::SystemTray* tray_; |
std::vector<ash::SystemTrayItem*> items_; |
bool detailed_; |