| 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/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_item_delegate.h" | 9 #include "ash/common/shelf/shelf_item_delegate.h" |
| 10 #include "ash/common/shelf/shelf_layout_manager.h" | 10 #include "ash/common/shelf/shelf_layout_manager.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 void WmShelf::ShutdownShelfWidget() { | 121 void WmShelf::ShutdownShelfWidget() { |
| 122 if (shelf_widget_) | 122 if (shelf_widget_) |
| 123 shelf_widget_->Shutdown(); | 123 shelf_widget_->Shutdown(); |
| 124 } | 124 } |
| 125 | 125 |
| 126 void WmShelf::DestroyShelfWidget() { | 126 void WmShelf::DestroyShelfWidget() { |
| 127 shelf_widget_.reset(); | 127 shelf_widget_.reset(); |
| 128 } | 128 } |
| 129 | 129 |
| 130 void WmShelf::InitializeShelf() { | 130 void WmShelf::CreateShelfView() { |
| 131 DCHECK(shelf_layout_manager_); | 131 DCHECK(shelf_layout_manager_); |
| 132 DCHECK(shelf_widget_); | 132 DCHECK(shelf_widget_); |
| 133 DCHECK(!shelf_view_); | 133 DCHECK(!shelf_view_); |
| 134 shelf_view_ = shelf_widget_->CreateShelfView(); | 134 shelf_view_ = shelf_widget_->CreateShelfView(); |
| 135 shelf_locking_manager_.reset(new ShelfLockingManager(this)); | 135 shelf_locking_manager_.reset(new ShelfLockingManager(this)); |
| 136 // When the shelf is created the alignment is unlocked. Chrome will update the | 136 // When the shelf is created the alignment is unlocked. Chrome will update the |
| 137 // alignment later from preferences. | 137 // alignment later from preferences. |
| 138 alignment_ = SHELF_ALIGNMENT_BOTTOM; | 138 alignment_ = SHELF_ALIGNMENT_BOTTOM; |
| 139 WmShell::Get()->shelf_controller()->NotifyShelfCreated(this); | 139 WmShell::Get()->shelf_controller()->NotifyShelfCreated(this); |
| 140 } | 140 } |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 387 |
| 388 void WmShelf::OnBackgroundUpdated(ShelfBackgroundType background_type, | 388 void WmShelf::OnBackgroundUpdated(ShelfBackgroundType background_type, |
| 389 BackgroundAnimatorChangeType change_type) { | 389 BackgroundAnimatorChangeType change_type) { |
| 390 if (background_type == GetBackgroundType()) | 390 if (background_type == GetBackgroundType()) |
| 391 return; | 391 return; |
| 392 for (auto& observer : observers_) | 392 for (auto& observer : observers_) |
| 393 observer.OnBackgroundTypeChanged(background_type, change_type); | 393 observer.OnBackgroundTypeChanged(background_type, change_type); |
| 394 } | 394 } |
| 395 | 395 |
| 396 } // namespace ash | 396 } // namespace ash |
| OLD | NEW |