summaryrefslogtreecommitdiffstats
path: root/ash/root_window_controller.cc
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-10 22:57:09 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-10 22:57:09 +0000
commita0afeb1aafd479aed625b2a6c6e0fc02b5348962 (patch)
tree5a69548fe6278196c3dc69bfb1758cfa01444057 /ash/root_window_controller.cc
parent6d6587c3b5f3d1a3a5b7b03272c957a44d6acc71 (diff)
downloadchromium_src-a0afeb1aafd479aed625b2a6c6e0fc02b5348962.zip
chromium_src-a0afeb1aafd479aed625b2a6c6e0fc02b5348962.tar.gz
chromium_src-a0afeb1aafd479aed625b2a6c6e0fc02b5348962.tar.bz2
[Launcher per display] Removed Shell::status_area_widget(), system_tray()
HasPrimaryStatusArea/GetPrimarySystemTray for login screen which will have only one tray/status area on primary BUG=145978 TEST=none Review URL: https://chromiumcodereview.appspot.com/11476033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172169 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/root_window_controller.cc')
-rw-r--r--ash/root_window_controller.cc23
1 files changed, 20 insertions, 3 deletions
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 8ccdd12..e3ca185 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -176,14 +176,23 @@ RootWindowController::~RootWindowController() {
}
// static
-internal::RootWindowController*
-RootWindowController::ForLauncher(aura::Window* window) {
+RootWindowController* RootWindowController::ForLauncher(aura::Window* window) {
if (Shell::IsLauncherPerDisplayEnabled())
return GetRootWindowController(window->GetRootWindow());
else
return Shell::GetPrimaryRootWindowController();
}
+// static
+RootWindowController* RootWindowController::ForWindow(aura::Window* window) {
+ return GetRootWindowController(window->GetRootWindow());
+}
+
+// static
+RootWindowController* RootWindowController::ForActiveRootWindow() {
+ return GetRootWindowController(Shell::GetActiveRootWindow());
+}
+
void RootWindowController::Shutdown() {
CloseChildWindows();
if (Shell::GetActiveRootWindow() == root_window_.get()) {
@@ -221,7 +230,7 @@ RootWindowController::GetSystemModalLayoutManager(aura::Window* window) {
container = GetContainer(kShellWindowId_SystemModalContainer);
}
} else {
- user::LoginStatus login = Shell::GetInstance()->status_area_widget() ?
+ user::LoginStatus login = Shell::GetInstance()->tray_delegate() ?
Shell::GetInstance()->tray_delegate()->GetUserLoginStatus() :
user::LOGGED_IN_NONE;
int modal_window_id = (login == user::LOGGED_IN_LOCKED ||
@@ -442,6 +451,14 @@ void RootWindowController::MoveWindowsTo(aura::RootWindow* dst) {
}
}
+SystemTray* RootWindowController::GetSystemTray() {
+ // We assume in throughout the code that this will not return NULL. If code
+ // triggers this for valid reasons, it should test status_area_widget first.
+ internal::StatusAreaWidget* status_area = status_area_widget();
+ CHECK(status_area);
+ return status_area->system_tray();
+}
+
void RootWindowController::ShowContextMenu(
const gfx::Point& location_in_screen) {
aura::RootWindow* target = Shell::IsLauncherPerDisplayEnabled() ?