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

Side by Side Diff: ash/common/shelf/wm_shelf.cc

Issue 2761063002: Move more from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 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
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/common/shelf/wm_shelf.h" 5 #include "ash/common/shelf/wm_shelf.h"
6 6
7 #include "ash/common/shelf/shelf_controller.h" 7 #include "ash/common/shelf/shelf_controller.h"
8 #include "ash/common/shelf/shelf_delegate.h" 8 #include "ash/common/shelf/shelf_delegate.h"
9 #include "ash/common/shelf/shelf_layout_manager.h" 9 #include "ash/common/shelf/shelf_layout_manager.h"
10 #include "ash/common/shelf/shelf_locking_manager.h" 10 #include "ash/common/shelf/shelf_locking_manager.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 WmShelf::~WmShelf() {} 71 WmShelf::~WmShelf() {}
72 72
73 // static 73 // static
74 WmShelf* WmShelf::ForWindow(WmWindow* window) { 74 WmShelf* WmShelf::ForWindow(WmWindow* window) {
75 return window->GetRootWindowController()->GetShelf(); 75 return window->GetRootWindowController()->GetShelf();
76 } 76 }
77 77
78 // static 78 // static
79 bool WmShelf::CanChangeShelfAlignment() { 79 bool WmShelf::CanChangeShelfAlignment() {
80 if (WmShell::Get()->system_tray_delegate()->IsUserSupervised()) 80 if (Shell::Get()->system_tray_delegate()->IsUserSupervised())
81 return false; 81 return false;
82 82
83 LoginStatus login_status = 83 LoginStatus login_status =
84 WmShell::Get()->system_tray_delegate()->GetUserLoginStatus(); 84 Shell::Get()->system_tray_delegate()->GetUserLoginStatus();
85 85
86 switch (login_status) { 86 switch (login_status) {
87 case LoginStatus::LOCKED: 87 case LoginStatus::LOCKED:
88 // Shelf alignment changes can be requested while being locked, but will 88 // Shelf alignment changes can be requested while being locked, but will
89 // be applied upon unlock. 89 // be applied upon unlock.
90 case LoginStatus::USER: 90 case LoginStatus::USER:
91 case LoginStatus::OWNER: 91 case LoginStatus::OWNER:
92 return true; 92 return true;
93 case LoginStatus::PUBLIC: 93 case LoginStatus::PUBLIC:
94 case LoginStatus::SUPERVISED: 94 case LoginStatus::SUPERVISED:
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 378
379 void WmShelf::OnBackgroundUpdated(ShelfBackgroundType background_type, 379 void WmShelf::OnBackgroundUpdated(ShelfBackgroundType background_type,
380 AnimationChangeType change_type) { 380 AnimationChangeType change_type) {
381 if (background_type == GetBackgroundType()) 381 if (background_type == GetBackgroundType())
382 return; 382 return;
383 for (auto& observer : observers_) 383 for (auto& observer : observers_)
384 observer.OnBackgroundTypeChanged(background_type, change_type); 384 observer.OnBackgroundTypeChanged(background_type, change_type);
385 } 385 }
386 386
387 } // namespace ash 387 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_widget.cc ('k') | ash/common/system/chromeos/bluetooth/tray_bluetooth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698