Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_widget.h" | 5 #include "ash/shelf/shelf_widget.h" |
| 6 | 6 |
| 7 #include "ash/animation/animation_change_type.h" | 7 #include "ash/animation/animation_change_type.h" |
| 8 #include "ash/focus_cycler.h" | 8 #include "ash/focus_cycler.h" |
| 9 #include "ash/public/cpp/window_properties.h" | 9 #include "ash/public/cpp/window_properties.h" |
| 10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 175 background_animator_.RemoveObserver(delegate_view_); | 175 background_animator_.RemoveObserver(delegate_view_); |
| 176 background_animator_.RemoveObserver(this); | 176 background_animator_.RemoveObserver(this); |
| 177 Shell::Get()->focus_cycler()->RemoveWidget(this); | 177 Shell::Get()->focus_cycler()->RemoveWidget(this); |
| 178 SetFocusCycler(nullptr); | 178 SetFocusCycler(nullptr); |
| 179 RemoveObserver(this); | 179 RemoveObserver(this); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void ShelfWidget::CreateStatusAreaWidget(WmWindow* status_container) { | 182 void ShelfWidget::CreateStatusAreaWidget(WmWindow* status_container) { |
| 183 DCHECK(status_container); | 183 DCHECK(status_container); |
| 184 DCHECK(!status_area_widget_); | 184 DCHECK(!status_area_widget_); |
| 185 status_area_widget_ = new StatusAreaWidget(status_container, wm_shelf_); | 185 status_area_widget_ = new StatusAreaWidget( |
| 186 WmWindow::GetAuraWindow(status_container), wm_shelf_); | |
|
msw
2017/05/22 18:37:11
optional nit: status_container->aura_window()
James Cook
2017/05/22 21:04:54
Done.
| |
| 186 status_area_widget_->CreateTrayViews(); | 187 status_area_widget_->CreateTrayViews(); |
| 187 // NOTE: Container may be hidden depending on login/display state. | 188 // NOTE: Container may be hidden depending on login/display state. |
| 188 status_area_widget_->Show(); | 189 status_area_widget_->Show(); |
| 189 Shell::Get()->focus_cycler()->AddWidget(status_area_widget_); | 190 Shell::Get()->focus_cycler()->AddWidget(status_area_widget_); |
| 190 background_animator_.AddObserver(status_area_widget_); | 191 background_animator_.AddObserver(status_area_widget_); |
| 191 status_container->aura_window()->SetLayoutManager( | 192 status_container->aura_window()->SetLayoutManager( |
| 192 new StatusAreaLayoutManager(this)); | 193 new StatusAreaLayoutManager(this)); |
| 193 } | 194 } |
| 194 | 195 |
| 195 void ShelfWidget::SetPaintsBackground(ShelfBackgroundType background_type, | 196 void ShelfWidget::SetPaintsBackground(ShelfBackgroundType background_type, |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 326 void ShelfWidget::UpdateShelfItemBackground(SkColor color) { | 327 void ShelfWidget::UpdateShelfItemBackground(SkColor color) { |
| 327 shelf_view_->UpdateShelfItemBackground(color); | 328 shelf_view_->UpdateShelfItemBackground(color); |
| 328 } | 329 } |
| 329 | 330 |
| 330 void ShelfWidget::WillDeleteShelfLayoutManager() { | 331 void ShelfWidget::WillDeleteShelfLayoutManager() { |
| 331 shelf_layout_manager_->RemoveObserver(this); | 332 shelf_layout_manager_->RemoveObserver(this); |
| 332 shelf_layout_manager_ = nullptr; | 333 shelf_layout_manager_ = nullptr; |
| 333 } | 334 } |
| 334 | 335 |
| 335 } // namespace ash | 336 } // namespace ash |
| OLD | NEW |