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

Unified Diff: ash/system/tray/system_tray.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
« no previous file with comments | « no previous file | ash/wm/activation_controller.cc » ('j') | ash/wm/activation_controller.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | ash/wm/activation_controller.cc » ('j') | ash/wm/activation_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698