| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/mus/root_window_controller.h" | 5 #include "ash/mus/root_window_controller.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 | 217 |
| 218 void RootWindowController::CreateStatusArea() { | 218 void RootWindowController::CreateStatusArea() { |
| 219 WmWindowMus* status_container = | 219 WmWindowMus* status_container = |
| 220 GetWindowByShellWindowId(kShellWindowId_StatusContainer); | 220 GetWindowByShellWindowId(kShellWindowId_StatusContainer); |
| 221 // Owned by native widget. | 221 // Owned by native widget. |
| 222 StatusAreaWidget* status_area_widget = | 222 StatusAreaWidget* status_area_widget = |
| 223 new StatusAreaWidget(status_container, wm_shelf_.get()); | 223 new StatusAreaWidget(status_container, wm_shelf_.get()); |
| 224 status_area_widget->CreateTrayViews(); | 224 status_area_widget->CreateTrayViews(); |
| 225 // TODO(jamescook): Remove this when ash::StatusAreaLayoutManager and | 225 // TODO(jamescook): Remove this when ash::StatusAreaLayoutManager and |
| 226 // ash::ShelfLayoutManager are working in mash. http://crbug.com/621112 | 226 // ash::ShelfLayoutManager are working in mash. http://crbug.com/621112 |
| 227 status_area_widget->SetBounds(gfx::Rect(845, 720, 120, 40)); | 227 gfx::Size display_size = display_.bounds().size(); |
| 228 status_area_widget->SetBounds(gfx::Rect(display_size.width() - 179, |
| 229 display_size.height() - 48, 120, 40)); |
| 228 if (WmShell::Get()->GetSessionStateDelegate()->IsActiveUserSessionStarted()) | 230 if (WmShell::Get()->GetSessionStateDelegate()->IsActiveUserSessionStarted()) |
| 229 status_area_widget->Show(); | 231 status_area_widget->Show(); |
| 230 } | 232 } |
| 231 | 233 |
| 232 } // namespace mus | 234 } // namespace mus |
| 233 } // namespace ash | 235 } // namespace ash |
| OLD | NEW |