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

Unified Diff: ash/mus/root_window_controller.cc

Issue 2230723003: mash: Show status area widget, attempt 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 | « ash/mus/root_window_controller.h ('k') | ash/mus/status_layout_manager.h » ('j') | 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 887092f8bf684dfc5420f2ff59a5310547ba00d4..42b0f049b913f37c5dba993da7a17064e1b8826c 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"
@@ -30,7 +32,6 @@
#include "ash/mus/property_util.h"
#include "ash/mus/screenlock_layout.h"
#include "ash/mus/shelf_layout_manager.h"
-#include "ash/mus/status_layout_manager.h"
#include "ash/mus/window_manager.h"
#include "base/bind.h"
#include "base/command_line.h"
@@ -65,6 +66,7 @@ RootWindowController::RootWindowController(WindowManager* window_manager,
root_window_controller_common_->CreateContainers();
root_window_controller_common_->CreateLayoutManagers();
CreateLayoutManagers();
+ CreateStatusArea();
disconnected_app_handler_.reset(new DisconnectedAppHandler(root));
@@ -192,12 +194,7 @@ void RootWindowController::CreateLayoutManagers() {
new ShelfLayoutManager(shelf_container->mus_window(), this);
layout_managers_[shelf_container->mus_window()].reset(shelf_layout_manager);
- wm_shelf_.reset(new WmShelfMus(shelf_layout_manager));
-
- WmWindowMus* status_container =
- GetWindowByShellWindowId(kShellWindowId_StatusContainer);
- layout_managers_[status_container->mus_window()].reset(
- new StatusLayoutManager(status_container->mus_window()));
+ wm_shelf_.reset(new WmShelfMus(wm_root_window_controller_.get()));
WmWindowMus* default_container =
GetWindowByShellWindowId(kShellWindowId_DefaultContainer);
@@ -218,5 +215,19 @@ void RootWindowController::CreateLayoutManagers() {
base::WrapUnique(new PanelLayoutManager(panel_container)));
}
+void RootWindowController::CreateStatusArea() {
+ 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::StatusAreaLayoutManager and
+ // ash::ShelfLayoutManager are 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();
+}
+
} // namespace mus
} // namespace ash
« no previous file with comments | « ash/mus/root_window_controller.h ('k') | ash/mus/status_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698