OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/ash_switches.h" | 7 #include "ash/ash_switches.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_state_delegate.h" | 10 #include "ash/session_state_delegate.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "ui/events/event_constants.h" | 31 #include "ui/events/event_constants.h" |
32 #include "ui/gfx/canvas.h" | 32 #include "ui/gfx/canvas.h" |
33 #include "ui/gfx/image/image.h" | 33 #include "ui/gfx/image/image.h" |
34 #include "ui/gfx/image/image_skia_operations.h" | 34 #include "ui/gfx/image/image_skia_operations.h" |
35 #include "ui/gfx/skbitmap_operations.h" | 35 #include "ui/gfx/skbitmap_operations.h" |
36 #include "ui/views/accessible_pane_view.h" | 36 #include "ui/views/accessible_pane_view.h" |
37 #include "ui/views/widget/widget.h" | 37 #include "ui/views/widget/widget.h" |
38 #include "ui/views/widget/widget_delegate.h" | 38 #include "ui/views/widget/widget_delegate.h" |
39 | 39 |
40 namespace { | 40 namespace { |
41 // Size of black border at bottom (or side) of launcher. | 41 // Size of black border at bottom (or side) of shelf. |
42 const int kNumBlackPixels = 3; | 42 const int kNumBlackPixels = 3; |
43 // Alpha to paint dimming image with. | 43 // Alpha to paint dimming image with. |
44 const int kDimAlpha = 128; | 44 const int kDimAlpha = 128; |
45 | 45 |
46 // The time to dim and un-dim. | 46 // The time to dim and un-dim. |
47 const int kTimeToDimMs = 3000; // Slow in dimming. | 47 const int kTimeToDimMs = 3000; // Slow in dimming. |
48 const int kTimeToUnDimMs = 200; // Fast in activating. | 48 const int kTimeToUnDimMs = 200; // Fast in activating. |
49 | 49 |
50 // Class used to slightly dim shelf items when maximized and visible. | 50 // Class used to slightly dim shelf items when maximized and visible. |
51 class DimmerView : public views::View, | 51 class DimmerView : public views::View, |
(...skipping 26 matching lines...) Expand all Loading... |
78 SchedulePaint(); | 78 SchedulePaint(); |
79 } | 79 } |
80 | 80 |
81 // views::View overrides: | 81 // views::View overrides: |
82 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; | 82 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; |
83 | 83 |
84 // A function to test the current alpha used. | 84 // A function to test the current alpha used. |
85 int get_dimming_alpha_for_test() { return alpha_; } | 85 int get_dimming_alpha_for_test() { return alpha_; } |
86 | 86 |
87 private: | 87 private: |
88 // This class monitors mouse events to see if it is on top of the launcher. | 88 // This class monitors mouse events to see if it is on top of the shelf. |
89 class DimmerEventFilter : public ui::EventHandler { | 89 class DimmerEventFilter : public ui::EventHandler { |
90 public: | 90 public: |
91 explicit DimmerEventFilter(DimmerView* owner); | 91 explicit DimmerEventFilter(DimmerView* owner); |
92 virtual ~DimmerEventFilter(); | 92 virtual ~DimmerEventFilter(); |
93 | 93 |
94 // Overridden from ui::EventHandler: | 94 // Overridden from ui::EventHandler: |
95 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 95 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; |
96 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; | 96 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; |
97 | 97 |
98 private: | 98 private: |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 bool previous = force_hovered_; | 167 bool previous = force_hovered_; |
168 force_hovered_ = force; | 168 force_hovered_ = force; |
169 // If the forced change does change the result we apply the change. | 169 // If the forced change does change the result we apply the change. |
170 if (is_hovered_ || force_hovered_ != is_hovered_ || previous) | 170 if (is_hovered_ || force_hovered_ != is_hovered_ || previous) |
171 SetHovered(is_hovered_); | 171 SetHovered(is_hovered_); |
172 } | 172 } |
173 | 173 |
174 void DimmerView::OnPaintBackground(gfx::Canvas* canvas) { | 174 void DimmerView::OnPaintBackground(gfx::Canvas* canvas) { |
175 SkPaint paint; | 175 SkPaint paint; |
176 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 176 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
177 gfx::ImageSkia launcher_background = | 177 gfx::ImageSkia shelf_background = |
178 *rb.GetImageNamed(IDR_AURA_LAUNCHER_DIMMING).ToImageSkia(); | 178 *rb.GetImageNamed(IDR_AURA_LAUNCHER_DIMMING).ToImageSkia(); |
179 | 179 |
180 if (shelf_->GetAlignment() != ash::SHELF_ALIGNMENT_BOTTOM) { | 180 if (shelf_->GetAlignment() != ash::SHELF_ALIGNMENT_BOTTOM) { |
181 launcher_background = gfx::ImageSkiaOperations::CreateRotatedImage( | 181 shelf_background = gfx::ImageSkiaOperations::CreateRotatedImage( |
182 launcher_background, | 182 shelf_background, |
183 shelf_->shelf_layout_manager()->SelectValueForShelfAlignment( | 183 shelf_->shelf_layout_manager()->SelectValueForShelfAlignment( |
184 SkBitmapOperations::ROTATION_90_CW, | 184 SkBitmapOperations::ROTATION_90_CW, |
185 SkBitmapOperations::ROTATION_90_CW, | 185 SkBitmapOperations::ROTATION_90_CW, |
186 SkBitmapOperations::ROTATION_270_CW, | 186 SkBitmapOperations::ROTATION_270_CW, |
187 SkBitmapOperations::ROTATION_180_CW)); | 187 SkBitmapOperations::ROTATION_180_CW)); |
188 } | 188 } |
189 paint.setAlpha(alpha_); | 189 paint.setAlpha(alpha_); |
190 canvas->DrawImageInt( | 190 canvas->DrawImageInt(shelf_background, |
191 launcher_background, | 191 0, |
192 0, 0, launcher_background.width(), launcher_background.height(), | 192 0, |
193 0, 0, width(), height(), | 193 shelf_background.width(), |
194 false, | 194 shelf_background.height(), |
195 paint); | 195 0, |
| 196 0, |
| 197 width(), |
| 198 height(), |
| 199 false, |
| 200 paint); |
196 } | 201 } |
197 | 202 |
198 DimmerView::DimmerEventFilter::DimmerEventFilter(DimmerView* owner) | 203 DimmerView::DimmerEventFilter::DimmerEventFilter(DimmerView* owner) |
199 : owner_(owner), | 204 : owner_(owner), |
200 mouse_inside_(false), | 205 mouse_inside_(false), |
201 touch_inside_(false) { | 206 touch_inside_(false) { |
202 ash::Shell::GetInstance()->AddPreTargetHandler(this); | 207 ash::Shell::GetInstance()->AddPreTargetHandler(this); |
203 } | 208 } |
204 | 209 |
205 DimmerView::DimmerEventFilter::~DimmerEventFilter() { | 210 DimmerView::DimmerEventFilter::~DimmerEventFilter() { |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 views::Widget::InitParams params( | 350 views::Widget::InitParams params( |
346 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 351 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
347 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 352 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
348 params.can_activate = false; | 353 params.can_activate = false; |
349 params.accept_events = false; | 354 params.accept_events = false; |
350 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 355 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
351 params.parent = shelf_->GetNativeView(); | 356 params.parent = shelf_->GetNativeView(); |
352 dimmer_->Init(params); | 357 dimmer_->Init(params); |
353 dimmer_->GetNativeWindow()->SetName("ShelfDimmer"); | 358 dimmer_->GetNativeWindow()->SetName("ShelfDimmer"); |
354 dimmer_->SetBounds(shelf_->GetWindowBoundsInScreen()); | 359 dimmer_->SetBounds(shelf_->GetWindowBoundsInScreen()); |
355 // The launcher should not take focus when it is initially shown. | 360 // The shelf should not take focus when it is initially shown. |
356 dimmer_->set_focus_on_creation(false); | 361 dimmer_->set_focus_on_creation(false); |
357 dimmer_view_ = new DimmerView(shelf_, disable_dimming_animations_for_test_); | 362 dimmer_view_ = new DimmerView(shelf_, disable_dimming_animations_for_test_); |
358 dimmer_->SetContentsView(dimmer_view_); | 363 dimmer_->SetContentsView(dimmer_view_); |
359 dimmer_->GetNativeView()->SetName("ShelfDimmerView"); | 364 dimmer_->GetNativeView()->SetName("ShelfDimmerView"); |
360 dimmer_->Show(); | 365 dimmer_->Show(); |
361 shelf_->GetNativeView()->AddObserver(this); | 366 shelf_->GetNativeView()->AddObserver(this); |
362 } else { | 367 } else { |
363 // Some unit tests will come here with a destroyed window. | 368 // Some unit tests will come here with a destroyed window. |
364 if (shelf_->GetNativeView()) | 369 if (shelf_->GetNativeView()) |
365 shelf_->GetNativeView()->RemoveObserver(this); | 370 shelf_->GetNativeView()->RemoveObserver(this); |
366 dimmer_view_ = NULL; | 371 dimmer_view_ = NULL; |
367 dimmer_.reset(NULL); | 372 dimmer_.reset(NULL); |
368 } | 373 } |
369 } | 374 } |
370 | 375 |
371 bool ShelfWidget::DelegateView::GetDimmed() const { | 376 bool ShelfWidget::DelegateView::GetDimmed() const { |
372 return dimmer_.get() && dimmer_->IsVisible(); | 377 return dimmer_.get() && dimmer_->IsVisible(); |
373 } | 378 } |
374 | 379 |
375 void ShelfWidget::DelegateView::SetParentLayer(ui::Layer* layer) { | 380 void ShelfWidget::DelegateView::SetParentLayer(ui::Layer* layer) { |
376 layer->Add(&opaque_background_); | 381 layer->Add(&opaque_background_); |
377 ReorderLayers(); | 382 ReorderLayers(); |
378 } | 383 } |
379 | 384 |
380 void ShelfWidget::DelegateView::OnPaintBackground(gfx::Canvas* canvas) { | 385 void ShelfWidget::DelegateView::OnPaintBackground(gfx::Canvas* canvas) { |
381 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 386 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
382 gfx::ImageSkia launcher_background = | 387 gfx::ImageSkia shelf_background = |
383 *rb.GetImageSkiaNamed(IDR_AURA_LAUNCHER_BACKGROUND); | 388 *rb.GetImageSkiaNamed(IDR_AURA_LAUNCHER_BACKGROUND); |
384 if (SHELF_ALIGNMENT_BOTTOM != shelf_->GetAlignment()) | 389 if (SHELF_ALIGNMENT_BOTTOM != shelf_->GetAlignment()) |
385 launcher_background = gfx::ImageSkiaOperations::CreateRotatedImage( | 390 shelf_background = gfx::ImageSkiaOperations::CreateRotatedImage( |
386 launcher_background, | 391 shelf_background, |
387 shelf_->shelf_layout_manager()->SelectValueForShelfAlignment( | 392 shelf_->shelf_layout_manager()->SelectValueForShelfAlignment( |
388 SkBitmapOperations::ROTATION_90_CW, | 393 SkBitmapOperations::ROTATION_90_CW, |
389 SkBitmapOperations::ROTATION_90_CW, | 394 SkBitmapOperations::ROTATION_90_CW, |
390 SkBitmapOperations::ROTATION_270_CW, | 395 SkBitmapOperations::ROTATION_270_CW, |
391 SkBitmapOperations::ROTATION_180_CW)); | 396 SkBitmapOperations::ROTATION_180_CW)); |
392 const gfx::Rect dock_bounds(shelf_->shelf_layout_manager()->dock_bounds()); | 397 const gfx::Rect dock_bounds(shelf_->shelf_layout_manager()->dock_bounds()); |
393 SkPaint paint; | 398 SkPaint paint; |
394 paint.setAlpha(alpha_); | 399 paint.setAlpha(alpha_); |
395 canvas->DrawImageInt( | 400 canvas->DrawImageInt(shelf_background, |
396 launcher_background, | 401 0, |
397 0, 0, launcher_background.width(), launcher_background.height(), | 402 0, |
398 (SHELF_ALIGNMENT_BOTTOM == shelf_->GetAlignment() && | 403 shelf_background.width(), |
399 dock_bounds.x() == 0 && dock_bounds.width() > 0) ? | 404 shelf_background.height(), |
400 dock_bounds.width() : 0, 0, | 405 (SHELF_ALIGNMENT_BOTTOM == shelf_->GetAlignment() && |
401 SHELF_ALIGNMENT_BOTTOM == shelf_->GetAlignment() ? | 406 dock_bounds.x() == 0 && dock_bounds.width() > 0) |
402 width() - dock_bounds.width() : width(), height(), | 407 ? dock_bounds.width() |
403 false, | 408 : 0, |
404 paint); | 409 0, |
| 410 SHELF_ALIGNMENT_BOTTOM == shelf_->GetAlignment() |
| 411 ? width() - dock_bounds.width() |
| 412 : width(), |
| 413 height(), |
| 414 false, |
| 415 paint); |
405 if (SHELF_ALIGNMENT_BOTTOM == shelf_->GetAlignment() && | 416 if (SHELF_ALIGNMENT_BOTTOM == shelf_->GetAlignment() && |
406 dock_bounds.width() > 0) { | 417 dock_bounds.width() > 0) { |
407 // The part of the shelf background that is in the corner below the docked | 418 // The part of the shelf background that is in the corner below the docked |
408 // windows close to the work area is an arched gradient that blends | 419 // windows close to the work area is an arched gradient that blends |
409 // vertically oriented docked background and horizontal shelf. | 420 // vertically oriented docked background and horizontal shelf. |
410 gfx::ImageSkia launcher_corner = | 421 gfx::ImageSkia shelf_corner = |
411 *rb.GetImageSkiaNamed(IDR_AURA_LAUNCHER_CORNER); | 422 *rb.GetImageSkiaNamed(IDR_AURA_LAUNCHER_CORNER); |
412 if (dock_bounds.x() == 0) { | 423 if (dock_bounds.x() == 0) { |
413 launcher_corner = gfx::ImageSkiaOperations::CreateRotatedImage( | 424 shelf_corner = gfx::ImageSkiaOperations::CreateRotatedImage( |
414 launcher_corner, SkBitmapOperations::ROTATION_90_CW); | 425 shelf_corner, SkBitmapOperations::ROTATION_90_CW); |
415 } | 426 } |
416 canvas->DrawImageInt( | 427 canvas->DrawImageInt( |
417 launcher_corner, | 428 shelf_corner, |
418 0, 0, launcher_corner.width(), launcher_corner.height(), | 429 0, |
| 430 0, |
| 431 shelf_corner.width(), |
| 432 shelf_corner.height(), |
419 dock_bounds.x() > 0 ? dock_bounds.x() : dock_bounds.width() - height(), | 433 dock_bounds.x() > 0 ? dock_bounds.x() : dock_bounds.width() - height(), |
420 0, | 434 0, |
421 height(), height(), | 435 height(), |
| 436 height(), |
422 false, | 437 false, |
423 paint); | 438 paint); |
424 // The part of the shelf background that is just below the docked windows | 439 // The part of the shelf background that is just below the docked windows |
425 // is drawn using the last (lowest) 1-pixel tall strip of the image asset. | 440 // is drawn using the last (lowest) 1-pixel tall strip of the image asset. |
426 // This avoids showing the border 3D shadow between the shelf and the dock. | 441 // This avoids showing the border 3D shadow between the shelf and the dock. |
427 canvas->DrawImageInt( | 442 canvas->DrawImageInt(shelf_background, |
428 launcher_background, | 443 0, |
429 0, launcher_background.height() - 1, launcher_background.width(), 1, | 444 shelf_background.height() - 1, |
430 dock_bounds.x() > 0 ? dock_bounds.x() + height() : 0, 0, | 445 shelf_background.width(), |
431 dock_bounds.width() - height(), height(), | 446 1, |
432 false, | 447 dock_bounds.x() > 0 ? dock_bounds.x() + height() : 0, |
433 paint); | 448 0, |
| 449 dock_bounds.width() - height(), |
| 450 height(), |
| 451 false, |
| 452 paint); |
434 } | 453 } |
435 gfx::Rect black_rect = | 454 gfx::Rect black_rect = |
436 shelf_->shelf_layout_manager()->SelectValueForShelfAlignment( | 455 shelf_->shelf_layout_manager()->SelectValueForShelfAlignment( |
437 gfx::Rect(0, height() - kNumBlackPixels, width(), kNumBlackPixels), | 456 gfx::Rect(0, height() - kNumBlackPixels, width(), kNumBlackPixels), |
438 gfx::Rect(0, 0, kNumBlackPixels, height()), | 457 gfx::Rect(0, 0, kNumBlackPixels, height()), |
439 gfx::Rect(width() - kNumBlackPixels, 0, kNumBlackPixels, height()), | 458 gfx::Rect(width() - kNumBlackPixels, 0, kNumBlackPixels, height()), |
440 gfx::Rect(0, 0, width(), kNumBlackPixels)); | 459 gfx::Rect(0, 0, width(), kNumBlackPixels)); |
441 canvas->FillRect(black_rect, SK_ColorBLACK); | 460 canvas->FillRect(black_rect, SK_ColorBLACK); |
442 } | 461 } |
443 | 462 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 | 626 |
608 DCHECK(false); | 627 DCHECK(false); |
609 return false; | 628 return false; |
610 } | 629 } |
611 | 630 |
612 ShelfAlignment ShelfWidget::GetAlignment() const { | 631 ShelfAlignment ShelfWidget::GetAlignment() const { |
613 return shelf_layout_manager_->GetAlignment(); | 632 return shelf_layout_manager_->GetAlignment(); |
614 } | 633 } |
615 | 634 |
616 void ShelfWidget::SetAlignment(ShelfAlignment alignment) { | 635 void ShelfWidget::SetAlignment(ShelfAlignment alignment) { |
617 if (launcher_) | 636 if (shelf_) |
618 launcher_->SetAlignment(alignment); | 637 shelf_->SetAlignment(alignment); |
619 status_area_widget_->SetShelfAlignment(alignment); | 638 status_area_widget_->SetShelfAlignment(alignment); |
620 delegate_view_->SchedulePaint(); | 639 delegate_view_->SchedulePaint(); |
621 } | 640 } |
622 | 641 |
623 void ShelfWidget::SetDimsShelf(bool dimming) { | 642 void ShelfWidget::SetDimsShelf(bool dimming) { |
624 delegate_view_->SetDimmed(dimming); | 643 delegate_view_->SetDimmed(dimming); |
625 // Repaint all children, allowing updates to reflect dimmed state eg: | 644 // Repaint all children, allowing updates to reflect dimmed state eg: |
626 // status area background, app list button and overflow button. | 645 // status area background, app list button and overflow button. |
627 if (launcher_) | 646 if (shelf_) |
628 launcher_->SchedulePaint(); | 647 shelf_->SchedulePaint(); |
629 status_area_widget_->GetContentsView()->SchedulePaint(); | 648 status_area_widget_->GetContentsView()->SchedulePaint(); |
630 } | 649 } |
631 | 650 |
632 bool ShelfWidget::GetDimsShelf() const { | 651 bool ShelfWidget::GetDimsShelf() const { |
633 return delegate_view_->GetDimmed(); | 652 return delegate_view_->GetDimmed(); |
634 } | 653 } |
635 | 654 |
636 void ShelfWidget::CreateLauncher() { | 655 void ShelfWidget::CreateShelf() { |
637 if (launcher_) | 656 if (shelf_) |
638 return; | 657 return; |
639 | 658 |
640 Shell* shell = Shell::GetInstance(); | 659 Shell* shell = Shell::GetInstance(); |
641 // This needs to be called before shelf_model(). | 660 // This needs to be called before shelf_model(). |
642 ShelfDelegate* shelf_delegate = shell->GetShelfDelegate(); | 661 ShelfDelegate* shelf_delegate = shell->GetShelfDelegate(); |
643 if (!shelf_delegate) | 662 if (!shelf_delegate) |
644 return; // Not ready to create Launcher | 663 return; // Not ready to create Shelf. |
645 | 664 |
646 launcher_.reset(new Launcher(shell->shelf_model(), | 665 shelf_.reset( |
647 shell->GetShelfDelegate(), | 666 new Shelf(shell->shelf_model(), shell->GetShelfDelegate(), this)); |
648 this)); | |
649 SetFocusCycler(shell->focus_cycler()); | 667 SetFocusCycler(shell->focus_cycler()); |
650 | 668 |
651 // Inform the root window controller. | 669 // Inform the root window controller. |
652 internal::RootWindowController::ForWindow(window_container_)-> | 670 internal::RootWindowController::ForWindow(window_container_) |
653 OnLauncherCreated(); | 671 ->OnShelfCreated(); |
654 | 672 |
655 launcher_->SetVisible( | 673 shelf_->SetVisible( |
656 shell->session_state_delegate()->IsActiveUserSessionStarted()); | 674 shell->session_state_delegate()->IsActiveUserSessionStarted()); |
657 shelf_layout_manager_->LayoutShelf(); | 675 shelf_layout_manager_->LayoutShelf(); |
658 Show(); | 676 Show(); |
659 } | 677 } |
660 | 678 |
661 bool ShelfWidget::IsLauncherVisible() const { | 679 bool ShelfWidget::IsShelfVisible() const { |
662 return launcher_.get() && launcher_->IsVisible(); | 680 return shelf_.get() && shelf_->IsVisible(); |
663 } | 681 } |
664 | 682 |
665 void ShelfWidget::SetLauncherVisibility(bool visible) { | 683 void ShelfWidget::SetShelfVisibility(bool visible) { |
666 if (launcher_) | 684 if (shelf_) |
667 launcher_->SetVisible(visible); | 685 shelf_->SetVisible(visible); |
668 } | 686 } |
669 | 687 |
670 void ShelfWidget::SetFocusCycler(internal::FocusCycler* focus_cycler) { | 688 void ShelfWidget::SetFocusCycler(internal::FocusCycler* focus_cycler) { |
671 delegate_view_->set_focus_cycler(focus_cycler); | 689 delegate_view_->set_focus_cycler(focus_cycler); |
672 if (focus_cycler) | 690 if (focus_cycler) |
673 focus_cycler->AddWidget(this); | 691 focus_cycler->AddWidget(this); |
674 } | 692 } |
675 | 693 |
676 internal::FocusCycler* ShelfWidget::GetFocusCycler() { | 694 internal::FocusCycler* ShelfWidget::GetFocusCycler() { |
677 return delegate_view_->focus_cycler(); | 695 return delegate_view_->focus_cycler(); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 DCHECK(delegate_view_); | 730 DCHECK(delegate_view_); |
713 return delegate_view_->disable_dimming_animations_for_test(); | 731 return delegate_view_->disable_dimming_animations_for_test(); |
714 } | 732 } |
715 | 733 |
716 void ShelfWidget::WillDeleteShelf() { | 734 void ShelfWidget::WillDeleteShelf() { |
717 shelf_layout_manager_->RemoveObserver(this); | 735 shelf_layout_manager_->RemoveObserver(this); |
718 shelf_layout_manager_ = NULL; | 736 shelf_layout_manager_ = NULL; |
719 } | 737 } |
720 | 738 |
721 } // namespace ash | 739 } // namespace ash |
OLD | NEW |