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

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

Issue 2807693002: Make LogoutButtonTray a regular View (Closed)
Patch Set: Rebased Created 3 years, 8 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
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/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/session/session_controller.h" 10 #include "ash/session/session_controller.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 opaque_foreground->SetOpacity(target_opacity); 217 opaque_foreground->SetOpacity(target_opacity);
218 } 218 }
219 219
220 bool ShelfWidget::IsShelfHiddenBehindBlackBar() const { 220 bool ShelfWidget::IsShelfHiddenBehindBlackBar() const {
221 return delegate_view_->opaque_foreground()->GetTargetOpacity() != 0.0f; 221 return delegate_view_->opaque_foreground()->GetTargetOpacity() != 0.0f;
222 } 222 }
223 223
224 void ShelfWidget::OnShelfAlignmentChanged() { 224 void ShelfWidget::OnShelfAlignmentChanged() {
225 shelf_view_->OnShelfAlignmentChanged(); 225 shelf_view_->OnShelfAlignmentChanged();
226 // TODO(jamescook): Status area should not cache alignment. 226 status_area_widget_->UpdateAfterShelfAlignmentChange();
227 status_area_widget_->SetShelfAlignment(wm_shelf_->GetAlignment());
228 delegate_view_->SchedulePaint(); 227 delegate_view_->SchedulePaint();
229 } 228 }
230 229
231 ShelfView* ShelfWidget::CreateShelfView() { 230 ShelfView* ShelfWidget::CreateShelfView() {
232 DCHECK(!shelf_view_); 231 DCHECK(!shelf_view_);
233 232
234 shelf_view_ = new ShelfView(Shell::Get()->shelf_model(), 233 shelf_view_ = new ShelfView(Shell::Get()->shelf_model(),
235 Shell::Get()->shelf_delegate(), wm_shelf_, this); 234 Shell::Get()->shelf_delegate(), wm_shelf_, this);
236 shelf_view_->Init(); 235 shelf_view_->Init();
237 GetContentsView()->AddChildView(shelf_view_); 236 GetContentsView()->AddChildView(shelf_view_);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 if (shelf_view_) 351 if (shelf_view_)
353 shelf_view_->UpdateShelfItemBackground(color); 352 shelf_view_->UpdateShelfItemBackground(color);
354 } 353 }
355 354
356 void ShelfWidget::WillDeleteShelfLayoutManager() { 355 void ShelfWidget::WillDeleteShelfLayoutManager() {
357 shelf_layout_manager_->RemoveObserver(this); 356 shelf_layout_manager_->RemoveObserver(this);
358 shelf_layout_manager_ = nullptr; 357 shelf_layout_manager_ = nullptr;
359 } 358 }
360 359
361 } // namespace ash 360 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698