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

Unified Diff: ash/root_window_controller.cc

Issue 11476033: [Launcher per display] Removed Shell::status_area_widget(), system_tray() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix style Created 8 years 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 | « ash/root_window_controller.h ('k') | ash/shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 8ccdd12d7782e980252b054f83e70a7e2db49229..e3ca18578eced81aa90f8481f75ce8706e1fef75 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() ?
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698