OLD | NEW |
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/shelf.h" | 5 #include "ash/shelf/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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // TODO: ShelfBezelEventHandler needs to work with mus too. | 66 // TODO: ShelfBezelEventHandler needs to work with mus too. |
67 // http://crbug.com/636647 | 67 // http://crbug.com/636647 |
68 if (Shell::GetAshConfig() != Config::MASH) | 68 if (Shell::GetAshConfig() != Config::MASH) |
69 bezel_event_handler_ = base::MakeUnique<ShelfBezelEventHandler>(this); | 69 bezel_event_handler_ = base::MakeUnique<ShelfBezelEventHandler>(this); |
70 } | 70 } |
71 | 71 |
72 Shelf::~Shelf() {} | 72 Shelf::~Shelf() {} |
73 | 73 |
74 // static | 74 // static |
75 Shelf* Shelf::ForWindow(aura::Window* window) { | 75 Shelf* Shelf::ForWindow(aura::Window* window) { |
76 return GetRootWindowController(window->GetRootWindow())->shelf(); | 76 return RootWindowController::ForWindow(window)->shelf(); |
77 } | 77 } |
78 | 78 |
79 // static | 79 // static |
80 bool Shelf::CanChangeShelfAlignment() { | 80 bool Shelf::CanChangeShelfAlignment() { |
81 if (Shell::Get()->session_controller()->IsUserSupervised()) | 81 if (Shell::Get()->session_controller()->IsUserSupervised()) |
82 return false; | 82 return false; |
83 | 83 |
84 const LoginStatus login_status = | 84 const LoginStatus login_status = |
85 Shell::Get()->session_controller()->login_status(); | 85 Shell::Get()->session_controller()->login_status(); |
86 | 86 |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 357 |
358 void Shelf::OnBackgroundUpdated(ShelfBackgroundType background_type, | 358 void Shelf::OnBackgroundUpdated(ShelfBackgroundType background_type, |
359 AnimationChangeType change_type) { | 359 AnimationChangeType change_type) { |
360 if (background_type == GetBackgroundType()) | 360 if (background_type == GetBackgroundType()) |
361 return; | 361 return; |
362 for (auto& observer : observers_) | 362 for (auto& observer : observers_) |
363 observer.OnBackgroundTypeChanged(background_type, change_type); | 363 observer.OnBackgroundTypeChanged(background_type, change_type); |
364 } | 364 } |
365 | 365 |
366 } // namespace ash | 366 } // namespace ash |
OLD | NEW |