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

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

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Sync and rebase. Created 3 years, 7 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/shelf/wm_shelf.h" 5 #include "ash/shelf/wm_shelf.h"
6 6
7 #include "ash/public/cpp/config.h" 7 #include "ash/public/cpp/config.h"
8 #include "ash/public/cpp/shelf_item_delegate.h" 8 #include "ash/public/cpp/shelf_item_delegate.h"
9 #include "ash/public/cpp/shell_window_ids.h" 9 #include "ash/public/cpp/shell_window_ids.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 DISALLOW_COPY_AND_ASSIGN(AutoHideEventHandler); 62 DISALLOW_COPY_AND_ASSIGN(AutoHideEventHandler);
63 }; 63 };
64 64
65 // WmShelf --------------------------------------------------------------------- 65 // WmShelf ---------------------------------------------------------------------
66 66
67 WmShelf::WmShelf() {} 67 WmShelf::WmShelf() {}
68 68
69 WmShelf::~WmShelf() {} 69 WmShelf::~WmShelf() {}
70 70
71 // static 71 // static
72 WmShelf* WmShelf::ForWindow(WmWindow* window) { 72 WmShelf* WmShelf::ForWindow(aura::Window* window) {
73 return window->GetRootWindowController()->GetShelf(); 73 return GetRootWindowController(window)->GetShelf();
74 } 74 }
75 75
76 // static 76 // static
77 bool WmShelf::CanChangeShelfAlignment() { 77 bool WmShelf::CanChangeShelfAlignment() {
78 if (Shell::Get()->session_controller()->IsUserSupervised()) 78 if (Shell::Get()->session_controller()->IsUserSupervised())
79 return false; 79 return false;
80 80
81 const LoginStatus login_status = 81 const LoginStatus login_status =
82 Shell::Get()->session_controller()->login_status(); 82 Shell::Get()->session_controller()->login_status();
83 83
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 374
375 void WmShelf::OnBackgroundUpdated(ShelfBackgroundType background_type, 375 void WmShelf::OnBackgroundUpdated(ShelfBackgroundType background_type,
376 AnimationChangeType change_type) { 376 AnimationChangeType change_type) {
377 if (background_type == GetBackgroundType()) 377 if (background_type == GetBackgroundType())
378 return; 378 return;
379 for (auto& observer : observers_) 379 for (auto& observer : observers_)
380 observer.OnBackgroundTypeChanged(background_type, change_type); 380 observer.OnBackgroundTypeChanged(background_type, change_type);
381 } 381 }
382 382
383 } // namespace ash 383 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698