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/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 Loading... |
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 Loading... |
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 |
OLD | NEW |