OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/wm/overview/window_selector_panels.h" | 5 #include "ash/wm/overview/window_selector_panels.h" |
6 | 6 |
7 #include "ash/screen_ash.h" | 7 #include "ash/screen_ash.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/wm/overview/scoped_transform_overview_window.h" | 10 #include "ash/wm/overview/scoped_transform_overview_window.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 DCHECK(window()->parent()->id() == internal::kShellWindowId_PanelContainer); | 66 DCHECK(window()->parent()->id() == internal::kShellWindowId_PanelContainer); |
67 internal::PanelLayoutManager* panel_layout_manager = | 67 internal::PanelLayoutManager* panel_layout_manager = |
68 static_cast<internal::PanelLayoutManager*>( | 68 static_cast<internal::PanelLayoutManager*>( |
69 window()->parent()->layout_manager()); | 69 window()->parent()->layout_manager()); |
70 return panel_layout_manager->GetCalloutWidgetForPanel(window()); | 70 return panel_layout_manager->GetCalloutWidgetForPanel(window()); |
71 } | 71 } |
72 | 72 |
73 void ScopedTransformPanelWindow::RestoreCallout() { | 73 void ScopedTransformPanelWindow::RestoreCallout() { |
74 scoped_ptr<ui::LayerAnimationSequence> sequence( | 74 scoped_ptr<ui::LayerAnimationSequence> sequence( |
75 new ui::LayerAnimationSequence); | 75 new ui::LayerAnimationSequence); |
76 ui::LayerAnimationElement::AnimatableProperties paused_properties; | |
77 paused_properties.insert(ui::LayerAnimationElement::OPACITY); | |
78 sequence->AddElement(ui::LayerAnimationElement::CreatePauseElement( | 76 sequence->AddElement(ui::LayerAnimationElement::CreatePauseElement( |
79 paused_properties, base::TimeDelta::FromMilliseconds( | 77 ui::LayerAnimationElement::OPACITY, base::TimeDelta::FromMilliseconds( |
80 ScopedTransformOverviewWindow::kTransitionMilliseconds))); | 78 ScopedTransformOverviewWindow::kTransitionMilliseconds))); |
81 sequence->AddElement(ui::LayerAnimationElement::CreateOpacityElement(1, | 79 sequence->AddElement(ui::LayerAnimationElement::CreateOpacityElement(1, |
82 base::TimeDelta::FromMilliseconds( | 80 base::TimeDelta::FromMilliseconds( |
83 kPanelCalloutFadeInDurationMilliseconds))); | 81 kPanelCalloutFadeInDurationMilliseconds))); |
84 GetCalloutWidget()->GetLayer()->GetAnimator()->StartAnimation( | 82 GetCalloutWidget()->GetLayer()->GetAnimator()->StartAnimation( |
85 sequence.release()); | 83 sequence.release()); |
86 } | 84 } |
87 | 85 |
88 } // namespace | 86 } // namespace |
89 | 87 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 transform.Translate(bounding_rect.x() - bounds.x(), | 173 transform.Translate(bounding_rect.x() - bounds.x(), |
176 bounding_rect.y() - bounds.y()); | 174 bounding_rect.y() - bounds.y()); |
177 transform.PreconcatTransform(bounding_transform); | 175 transform.PreconcatTransform(bounding_transform); |
178 transform.Translate(bounds.x() - bounding_rect.x(), | 176 transform.Translate(bounds.x() - bounding_rect.x(), |
179 bounds.y() - bounding_rect.y()); | 177 bounds.y() - bounding_rect.y()); |
180 (*iter)->SetTransform(root_window, transform, animate); | 178 (*iter)->SetTransform(root_window, transform, animate); |
181 } | 179 } |
182 } | 180 } |
183 | 181 |
184 } // namespace ash | 182 } // namespace ash |
OLD | NEW |