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

Side by Side Diff: ash/mus/root_window_controller.cc

Issue 2233753003: Revert of 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
11 #include <sstream> 11 #include <sstream>
12 #include <string> 12 #include <string>
13 #include <utility> 13 #include <utility>
14 #include <vector> 14 #include <vector>
15 15
16 #include "ash/common/root_window_controller_common.h" 16 #include "ash/common/root_window_controller_common.h"
17 #include "ash/common/session/session_state_delegate.h"
18 #include "ash/common/shell_window_ids.h" 17 #include "ash/common/shell_window_ids.h"
19 #include "ash/common/system/status_area_widget.h"
20 #include "ash/common/wm/always_on_top_controller.h" 18 #include "ash/common/wm/always_on_top_controller.h"
21 #include "ash/common/wm/container_finder.h" 19 #include "ash/common/wm/container_finder.h"
22 #include "ash/common/wm/dock/docked_window_layout_manager.h" 20 #include "ash/common/wm/dock/docked_window_layout_manager.h"
23 #include "ash/common/wm/panels/panel_layout_manager.h" 21 #include "ash/common/wm/panels/panel_layout_manager.h"
24 #include "ash/common/wm/root_window_layout_manager.h" 22 #include "ash/common/wm/root_window_layout_manager.h"
25 #include "ash/common/wm/workspace/workspace_layout_manager.h" 23 #include "ash/common/wm/workspace/workspace_layout_manager.h"
26 #include "ash/common/wm/workspace/workspace_layout_manager_delegate.h" 24 #include "ash/common/wm/workspace/workspace_layout_manager_delegate.h"
27 #include "ash/mus/bridge/wm_root_window_controller_mus.h" 25 #include "ash/mus/bridge/wm_root_window_controller_mus.h"
28 #include "ash/mus/bridge/wm_shelf_mus.h" 26 #include "ash/mus/bridge/wm_shelf_mus.h"
29 #include "ash/mus/bridge/wm_shell_mus.h" 27 #include "ash/mus/bridge/wm_shell_mus.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 return; 214 return;
217 215
218 docked_window_layout_manager->SetShelf(wm_shelf_.get()); 216 docked_window_layout_manager->SetShelf(wm_shelf_.get());
219 217
220 PanelLayoutManager::Get(WmWindowMus::Get(root_))->SetShelf(wm_shelf_.get()); 218 PanelLayoutManager::Get(WmWindowMus::Get(root_))->SetShelf(wm_shelf_.get());
221 219
222 // TODO: http://crbug.com/614182 Ash's ShelfLayoutManager implements 220 // TODO: http://crbug.com/614182 Ash's ShelfLayoutManager implements
223 // DockedWindowLayoutManagerObserver so that it can inset by the docked 221 // DockedWindowLayoutManagerObserver so that it can inset by the docked
224 // windows. 222 // windows.
225 // docked_layout_manager_->AddObserver(shelf_->shelf_layout_manager()); 223 // docked_layout_manager_->AddObserver(shelf_->shelf_layout_manager());
226
227 WmWindowMus* status_container =
228 GetWindowByShellWindowId(kShellWindowId_StatusContainer);
229 // Owned by native widget.
230 StatusAreaWidget* status_area_widget =
231 new StatusAreaWidget(status_container, wm_shelf_.get());
232 status_area_widget->CreateTrayViews();
233 // TODO(jamescook): Remove this when ash::ShelfLayoutManager is working
234 // in mash. http://crbug.com/621112
235 status_area_widget->SetBounds(gfx::Rect(845, 720, 120, 40));
236 if (WmShell::Get()->GetSessionStateDelegate()->IsActiveUserSessionStarted())
237 status_area_widget->Show();
238 } 224 }
239 225
240 void RootWindowController::CreateLayoutManagers() { 226 void RootWindowController::CreateLayoutManagers() {
241 // Override the default layout managers for certain containers. 227 // Override the default layout managers for certain containers.
242 WmWindowMus* lock_screen_container = 228 WmWindowMus* lock_screen_container =
243 GetWindowByShellWindowId(kShellWindowId_LockScreenContainer); 229 GetWindowByShellWindowId(kShellWindowId_LockScreenContainer);
244 layout_managers_[lock_screen_container->mus_window()].reset( 230 layout_managers_[lock_screen_container->mus_window()].reset(
245 new ScreenlockLayout(lock_screen_container->mus_window())); 231 new ScreenlockLayout(lock_screen_container->mus_window()));
246 232
247 WmWindowMus* shelf_container = 233 WmWindowMus* shelf_container =
(...skipping 27 matching lines...) Expand all
275 base::WrapUnique(new DockedWindowLayoutManager(docked_container))); 261 base::WrapUnique(new DockedWindowLayoutManager(docked_container)));
276 262
277 WmWindowMus* panel_container = 263 WmWindowMus* panel_container =
278 GetWindowByShellWindowId(kShellWindowId_PanelContainer); 264 GetWindowByShellWindowId(kShellWindowId_PanelContainer);
279 panel_container->SetLayoutManager( 265 panel_container->SetLayoutManager(
280 base::WrapUnique(new PanelLayoutManager(panel_container))); 266 base::WrapUnique(new PanelLayoutManager(panel_container)));
281 } 267 }
282 268
283 } // namespace mus 269 } // namespace mus
284 } // namespace ash 270 } // namespace ash
OLDNEW
« 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