| 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/system/tray/tray_background_view.h" | 5 #include "ash/system/tray/tray_background_view.h" |
| 6 | 6 |
| 7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
| 8 #include "ash/screen_util.h" | 8 #include "ash/screen_util.h" |
| 9 #include "ash/shelf/shelf_layout_manager.h" | 9 #include "ash/shelf/shelf_layout_manager.h" |
| 10 #include "ash/shelf/shelf_widget.h" | 10 #include "ash/shelf/shelf_widget.h" |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 gfx::Transform transform; | 452 gfx::Transform transform; |
| 453 if (shelf_alignment_ == SHELF_ALIGNMENT_BOTTOM) | 453 if (shelf_alignment_ == SHELF_ALIGNMENT_BOTTOM) |
| 454 transform.Translate(width(), 0.0f); | 454 transform.Translate(width(), 0.0f); |
| 455 else | 455 else |
| 456 transform.Translate(0.0f, height()); | 456 transform.Translate(0.0f, height()); |
| 457 layer()->SetTransform(transform); | 457 layer()->SetTransform(transform); |
| 458 } | 458 } |
| 459 | 459 |
| 460 void TrayBackgroundView::InitializeBubbleAnimations( | 460 void TrayBackgroundView::InitializeBubbleAnimations( |
| 461 views::Widget* bubble_widget) { | 461 views::Widget* bubble_widget) { |
| 462 wm::SetWindowVisibilityAnimationType( | 462 ::wm::SetWindowVisibilityAnimationType( |
| 463 bubble_widget->GetNativeWindow(), | 463 bubble_widget->GetNativeWindow(), |
| 464 wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); | 464 ::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); |
| 465 wm::SetWindowVisibilityAnimationTransition( | 465 ::wm::SetWindowVisibilityAnimationTransition(bubble_widget->GetNativeWindow(), |
| 466 bubble_widget->GetNativeWindow(), | 466 ::wm::ANIMATE_HIDE); |
| 467 wm::ANIMATE_HIDE); | 467 ::wm::SetWindowVisibilityAnimationDuration( |
| 468 wm::SetWindowVisibilityAnimationDuration( | |
| 469 bubble_widget->GetNativeWindow(), | 468 bubble_widget->GetNativeWindow(), |
| 470 base::TimeDelta::FromMilliseconds(kAnimationDurationForPopupMs)); | 469 base::TimeDelta::FromMilliseconds(kAnimationDurationForPopupMs)); |
| 471 } | 470 } |
| 472 | 471 |
| 473 aura::Window* TrayBackgroundView::GetBubbleWindowContainer() const { | 472 aura::Window* TrayBackgroundView::GetBubbleWindowContainer() const { |
| 474 return ash::Shell::GetContainer( | 473 return ash::Shell::GetContainer( |
| 475 tray_container()->GetWidget()->GetNativeWindow()->GetRootWindow(), | 474 tray_container()->GetWidget()->GetNativeWindow()->GetRootWindow(), |
| 476 ash::kShellWindowId_SettingBubbleContainer); | 475 ash::kShellWindowId_SettingBubbleContainer); |
| 477 } | 476 } |
| 478 | 477 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 background_->set_alpha(kTrayBackgroundAlpha); | 586 background_->set_alpha(kTrayBackgroundAlpha); |
| 588 SchedulePaint(); | 587 SchedulePaint(); |
| 589 } | 588 } |
| 590 | 589 |
| 591 void TrayBackgroundView::UpdateBubbleViewArrow( | 590 void TrayBackgroundView::UpdateBubbleViewArrow( |
| 592 views::TrayBubbleView* bubble_view) { | 591 views::TrayBubbleView* bubble_view) { |
| 593 // Nothing to do here. | 592 // Nothing to do here. |
| 594 } | 593 } |
| 595 | 594 |
| 596 } // namespace ash | 595 } // namespace ash |
| OLD | NEW |