| 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 "ui/app_list/views/apps_grid_view.h" | 5 #include "ui/app_list/views/apps_grid_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 void AppsGridView::ScheduleShowHideAnimation(bool show) { | 669 void AppsGridView::ScheduleShowHideAnimation(bool show) { |
| 670 // Stop any previous animation. | 670 // Stop any previous animation. |
| 671 layer()->GetAnimator()->StopAnimating(); | 671 layer()->GetAnimator()->StopAnimating(); |
| 672 | 672 |
| 673 // Set initial state. | 673 // Set initial state. |
| 674 SetVisible(true); | 674 SetVisible(true); |
| 675 layer()->SetOpacity(show ? 0.0f : 1.0f); | 675 layer()->SetOpacity(show ? 0.0f : 1.0f); |
| 676 | 676 |
| 677 ui::ScopedLayerAnimationSettings animation(layer()->GetAnimator()); | 677 ui::ScopedLayerAnimationSettings animation(layer()->GetAnimator()); |
| 678 animation.AddObserver(this); | 678 animation.AddObserver(this); |
| 679 animation.SetTweenType(gfx::Tween::EASE_IN_2); | 679 animation.SetTweenType( |
| 680 show ? kFolderFadeInTweenType : kFolderFadeOutTweenType); |
| 680 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds( | 681 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds( |
| 681 show ? kFolderTransitionInDurationMs : kFolderTransitionOutDurationMs)); | 682 show ? kFolderTransitionInDurationMs : kFolderTransitionOutDurationMs)); |
| 682 | 683 |
| 683 layer()->SetOpacity(show ? 1.0f : 0.0f); | 684 layer()->SetOpacity(show ? 1.0f : 0.0f); |
| 684 } | 685 } |
| 685 | 686 |
| 686 void AppsGridView::InitiateDragFromReparentItemInRootLevelGridView( | 687 void AppsGridView::InitiateDragFromReparentItemInRootLevelGridView( |
| 687 AppListItemView* original_drag_view, | 688 AppListItemView* original_drag_view, |
| 688 const gfx::Rect& drag_view_rect, | 689 const gfx::Rect& drag_view_rect, |
| 689 const gfx::Point& drag_point) { | 690 const gfx::Point& drag_point) { |
| (...skipping 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2045 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, | 2046 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, |
| 2046 bool is_target_folder) { | 2047 bool is_target_folder) { |
| 2047 AppListItemView* target_view = | 2048 AppListItemView* target_view = |
| 2048 static_cast<AppListItemView*>( | 2049 static_cast<AppListItemView*>( |
| 2049 GetViewAtSlotOnCurrentPage(target_index.slot)); | 2050 GetViewAtSlotOnCurrentPage(target_index.slot)); |
| 2050 if (target_view) | 2051 if (target_view) |
| 2051 target_view->SetAsAttemptedFolderTarget(is_target_folder); | 2052 target_view->SetAsAttemptedFolderTarget(is_target_folder); |
| 2052 } | 2053 } |
| 2053 | 2054 |
| 2054 } // namespace app_list | 2055 } // namespace app_list |
| OLD | NEW |