| Index: ash/shell.cc
|
| diff --git a/ash/shell.cc b/ash/shell.cc
|
| index 3584a2f4487f1004e0002fd77d5d4cefae019dbc..beaac9216f973ec1d94b71929d4ee81697e633ce 100644
|
| --- a/ash/shell.cc
|
| +++ b/ash/shell.cc
|
| @@ -36,6 +36,7 @@
|
| #include "ash/wm/app_list_controller.h"
|
| #include "ash/wm/base_layout_manager.h"
|
| #include "ash/wm/capture_controller.h"
|
| +#include "ash/wm/coordinate_conversion.h"
|
| #include "ash/wm/custom_frame_view_ash.h"
|
| #include "ash/wm/dialog_frame_view.h"
|
| #include "ash/wm/event_client_impl.h"
|
| @@ -514,8 +515,9 @@ void Shell::ShowContextMenu(const gfx::Point& location) {
|
| // No context menus when screen is locked.
|
| if (IsScreenLocked())
|
| return;
|
| - if (launcher())
|
| - launcher()->ShowContextMenu(location);
|
| + aura::RootWindow* root =
|
| + wm::GetRootWindowMatching(gfx::Rect(location, gfx::Size()));
|
| + Launcher::ForWindow(root)->ShowContextMenu(location);
|
| }
|
|
|
| void Shell::ToggleAppList() {
|
| @@ -579,6 +581,11 @@ void Shell::OnLoginStateChanged(user::LoginStatus status) {
|
| ash::Shell::GetInstance()->UpdateShelfVisibility();
|
| }
|
|
|
| +void Shell::UpdateAfterLoginStatusChange(user::LoginStatus status) {
|
| + GetPrimaryRootWindowController()->status_area_widget()->
|
| + UpdateAfterLoginStatusChange(status);
|
| +}
|
| +
|
| void Shell::OnAppTerminating() {
|
| FOR_EACH_OBSERVER(ShellObserver, observers_, OnAppTerminating());
|
| }
|
| @@ -603,11 +610,8 @@ void Shell::RemoveShellObserver(ShellObserver* observer) {
|
| observers_.RemoveObserver(observer);
|
| }
|
|
|
| -Launcher* Shell::launcher() {
|
| - return GetPrimaryRootWindowController()->launcher();
|
| -}
|
| -
|
| void Shell::UpdateShelfVisibility() {
|
| + // TODO(oshima): Update all root windows.
|
| GetPrimaryRootWindowController()->UpdateShelfVisibility();
|
| }
|
|
|
| @@ -664,22 +668,22 @@ void Shell::OnModalWindowRemoved(aura::Window* removed) {
|
| }
|
| }
|
|
|
| -internal::ShelfLayoutManager* Shell::shelf() const {
|
| - return GetPrimaryRootWindowController()->shelf();
|
| -}
|
| -
|
| -internal::StatusAreaWidget* Shell::status_area_widget() const {
|
| - return GetPrimaryRootWindowController()->status_area_widget();
|
| +WebNotificationTray* Shell::GetWebNotificationTray() {
|
| + return GetPrimaryRootWindowController()->status_area_widget()->
|
| + web_notification_tray();
|
| }
|
|
|
| SystemTrayDelegate* Shell::tray_delegate() {
|
| - return status_area_widget() ? status_area_widget()->system_tray_delegate() :
|
| - NULL;
|
| + // TODO(oshima): Decouple system tray and its delegate.
|
| + internal::StatusAreaWidget* status_area_widget =
|
| + GetPrimaryRootWindowController()->status_area_widget();
|
| + return status_area_widget ? status_area_widget->system_tray_delegate() : NULL;
|
| }
|
|
|
| SystemTray* Shell::system_tray() {
|
| - return status_area_widget() ? status_area_widget()->system_tray() :
|
| - NULL;
|
| + internal::StatusAreaWidget* status_area_widget =
|
| + GetPrimaryRootWindowController()->status_area_widget();
|
| + return status_area_widget ? status_area_widget->system_tray() : NULL;
|
| }
|
|
|
| void Shell::InitRootWindowForSecondaryDisplay(aura::RootWindow* root) {
|
|
|