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

Unified Diff: ash/mus/root_window_controller.cc

Issue 2230083002: Show the status area widget in mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/root_window_controller.cc
diff --git a/ash/mus/root_window_controller.cc b/ash/mus/root_window_controller.cc
index e864585dc18178120af653b0ea88066b925c6f02..015392b241b65b0ea87f0a3b529060f8d3b28bde 100644
--- a/ash/mus/root_window_controller.cc
+++ b/ash/mus/root_window_controller.cc
@@ -14,7 +14,9 @@
#include <vector>
#include "ash/common/root_window_controller_common.h"
+#include "ash/common/session/session_state_delegate.h"
#include "ash/common/shell_window_ids.h"
+#include "ash/common/system/status_area_widget.h"
#include "ash/common/wm/always_on_top_controller.h"
#include "ash/common/wm/container_finder.h"
#include "ash/common/wm/dock/docked_window_layout_manager.h"
@@ -221,6 +223,18 @@ void RootWindowController::OnShelfWindowAvailable() {
// DockedWindowLayoutManagerObserver so that it can inset by the docked
// windows.
// docked_layout_manager_->AddObserver(shelf_->shelf_layout_manager());
+
+ WmWindowMus* status_container =
+ GetWindowByShellWindowId(kShellWindowId_StatusContainer);
+ // Owned by native widget.
+ StatusAreaWidget* status_area_widget =
+ new StatusAreaWidget(status_container, wm_shelf_.get());
+ status_area_widget->CreateTrayViews();
+ // TODO(jamescook): Remove this when ash::ShelfLayoutManager is working
+ // in mash. http://crbug.com/621112
+ status_area_widget->SetBounds(gfx::Rect(845, 720, 120, 40));
+ if (WmShell::Get()->GetSessionStateDelegate()->IsActiveUserSessionStarted())
+ status_area_widget->Show();
}
void RootWindowController::CreateLayoutManagers() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698