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/status_area_widget_delegate.h" | 5 #include "ash/system/status_area_widget_delegate.h" |
6 | 6 |
7 #include "ash/ash_export.h" | 7 #include "ash/ash_export.h" |
8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
9 #include "ash/focus_cycler.h" | 9 #include "ash/focus_cycler.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 public: | 31 public: |
32 explicit StatusAreaWidgetDelegateAnimationSettings(ui::Layer* layer) | 32 explicit StatusAreaWidgetDelegateAnimationSettings(ui::Layer* layer) |
33 : ui::ScopedLayerAnimationSettings(layer->GetAnimator()) { | 33 : ui::ScopedLayerAnimationSettings(layer->GetAnimator()) { |
34 SetTransitionDuration( | 34 SetTransitionDuration( |
35 base::TimeDelta::FromMilliseconds(kAnimationDurationMs)); | 35 base::TimeDelta::FromMilliseconds(kAnimationDurationMs)); |
36 SetPreemptionStrategy( | 36 SetPreemptionStrategy( |
37 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 37 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
38 SetTweenType(gfx::Tween::EASE_IN_OUT); | 38 SetTweenType(gfx::Tween::EASE_IN_OUT); |
39 } | 39 } |
40 | 40 |
41 virtual ~StatusAreaWidgetDelegateAnimationSettings() {} | 41 ~StatusAreaWidgetDelegateAnimationSettings() override {} |
42 | 42 |
43 private: | 43 private: |
44 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidgetDelegateAnimationSettings); | 44 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidgetDelegateAnimationSettings); |
45 }; | 45 }; |
46 | 46 |
47 } // namespace | 47 } // namespace |
48 | 48 |
49 namespace ash { | 49 namespace ash { |
50 | 50 |
51 StatusAreaWidgetDelegate::StatusAreaWidgetDelegate() | 51 StatusAreaWidgetDelegate::StatusAreaWidgetDelegate() |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 void StatusAreaWidgetDelegate::ChildVisibilityChanged(View* child) { | 163 void StatusAreaWidgetDelegate::ChildVisibilityChanged(View* child) { |
164 UpdateLayout(); | 164 UpdateLayout(); |
165 } | 165 } |
166 | 166 |
167 void StatusAreaWidgetDelegate::UpdateWidgetSize() { | 167 void StatusAreaWidgetDelegate::UpdateWidgetSize() { |
168 if (GetWidget()) | 168 if (GetWidget()) |
169 GetWidget()->SetSize(GetPreferredSize()); | 169 GetWidget()->SetSize(GetPreferredSize()); |
170 } | 170 } |
171 | 171 |
172 } // namespace ash | 172 } // namespace ash |
OLD | NEW |