| 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/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/screen_util.h" | 9 #include "ash/screen_util.h" |
| 10 #include "ash/shelf/shelf_layout_manager.h" | 10 #include "ash/shelf/shelf_layout_manager.h" |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 bottom_edge = on_edge ? kPaddingFromBottomOfScreenVerticalAlignment : 0; | 486 bottom_edge = on_edge ? kPaddingFromBottomOfScreenVerticalAlignment : 0; |
| 487 right_edge = kPaddingFromOuterEdgeOfLauncherVerticalAlignment; | 487 right_edge = kPaddingFromOuterEdgeOfLauncherVerticalAlignment; |
| 488 } | 488 } |
| 489 } | 489 } |
| 490 SetBorder(views::Border::CreateEmptyBorder( | 490 SetBorder(views::Border::CreateEmptyBorder( |
| 491 top_edge, left_edge, bottom_edge, right_edge)); | 491 top_edge, left_edge, bottom_edge, right_edge)); |
| 492 } | 492 } |
| 493 | 493 |
| 494 void TrayBackgroundView::InitializeBubbleAnimations( | 494 void TrayBackgroundView::InitializeBubbleAnimations( |
| 495 views::Widget* bubble_widget) { | 495 views::Widget* bubble_widget) { |
| 496 views::corewm::SetWindowVisibilityAnimationType( | 496 wm::SetWindowVisibilityAnimationType( |
| 497 bubble_widget->GetNativeWindow(), | 497 bubble_widget->GetNativeWindow(), |
| 498 views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); | 498 wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); |
| 499 views::corewm::SetWindowVisibilityAnimationTransition( | 499 wm::SetWindowVisibilityAnimationTransition( |
| 500 bubble_widget->GetNativeWindow(), | 500 bubble_widget->GetNativeWindow(), |
| 501 views::corewm::ANIMATE_HIDE); | 501 wm::ANIMATE_HIDE); |
| 502 views::corewm::SetWindowVisibilityAnimationDuration( | 502 wm::SetWindowVisibilityAnimationDuration( |
| 503 bubble_widget->GetNativeWindow(), | 503 bubble_widget->GetNativeWindow(), |
| 504 base::TimeDelta::FromMilliseconds(kAnimationDurationForPopupMS)); | 504 base::TimeDelta::FromMilliseconds(kAnimationDurationForPopupMS)); |
| 505 } | 505 } |
| 506 | 506 |
| 507 aura::Window* TrayBackgroundView::GetBubbleWindowContainer() const { | 507 aura::Window* TrayBackgroundView::GetBubbleWindowContainer() const { |
| 508 return ash::Shell::GetContainer( | 508 return ash::Shell::GetContainer( |
| 509 tray_container()->GetWidget()->GetNativeWindow()->GetRootWindow(), | 509 tray_container()->GetWidget()->GetNativeWindow()->GetRootWindow(), |
| 510 ash::internal::kShellWindowId_SettingBubbleContainer); | 510 ash::internal::kShellWindowId_SettingBubbleContainer); |
| 511 } | 511 } |
| 512 | 512 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 ash::internal::ShelfLayoutManager* shelf = | 623 ash::internal::ShelfLayoutManager* shelf = |
| 624 ShelfLayoutManager::ForShelf(root_window); | 624 ShelfLayoutManager::ForShelf(root_window); |
| 625 bubble_view->SetArrowPaintType( | 625 bubble_view->SetArrowPaintType( |
| 626 (shelf && shelf->IsVisible()) ? | 626 (shelf && shelf->IsVisible()) ? |
| 627 views::BubbleBorder::PAINT_NORMAL : | 627 views::BubbleBorder::PAINT_NORMAL : |
| 628 views::BubbleBorder::PAINT_TRANSPARENT); | 628 views::BubbleBorder::PAINT_TRANSPARENT); |
| 629 } | 629 } |
| 630 | 630 |
| 631 } // namespace internal | 631 } // namespace internal |
| 632 } // namespace ash | 632 } // namespace ash |
| OLD | NEW |