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

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

Issue 2895843002: chromeos: Eliminate WmWindow from //ash/system (Closed)
Patch Set: comments 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
« no previous file with comments | « no previous file | ash/system/palette/mock_palette_tool_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_ =
186 new StatusAreaWidget(status_container->aura_window(), wm_shelf_);
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
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
OLDNEW
« no previous file with comments | « no previous file | ash/system/palette/mock_palette_tool_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698