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/boot_splash_screen_chromeos.h" | 5 #include "ash/wm/boot_splash_screen_chromeos.h" |
6 | 6 |
7 #include "third_party/skia/include/core/SkBitmap.h" | 7 #include "third_party/skia/include/core/SkBitmap.h" |
8 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
9 #include "ui/aura/window_tree_host.h" | 9 #include "ui/aura/window_tree_host.h" |
10 #include "ui/base/x/x11_util.h" | 10 #include "ui/base/x/x11_util.h" |
11 #include "ui/compositor/layer.h" | 11 #include "ui/compositor/layer.h" |
12 #include "ui/compositor/layer_type.h" | 12 #include "ui/compositor/layer_type.h" |
13 #include "ui/compositor/scoped_layer_animation_settings.h" | 13 #include "ui/compositor/scoped_layer_animation_settings.h" |
14 #include "ui/gfx/canvas.h" | 14 #include "ui/gfx/canvas.h" |
15 | 15 |
16 namespace ash { | 16 namespace ash { |
17 namespace internal { | |
18 | 17 |
19 // ui::LayerDelegate that copies the aura host window's content to a ui::Layer. | 18 // ui::LayerDelegate that copies the aura host window's content to a ui::Layer. |
20 class BootSplashScreen::CopyHostContentLayerDelegate | 19 class BootSplashScreen::CopyHostContentLayerDelegate |
21 : public ui::LayerDelegate { | 20 : public ui::LayerDelegate { |
22 public: | 21 public: |
23 explicit CopyHostContentLayerDelegate(aura::WindowTreeHost* host) | 22 explicit CopyHostContentLayerDelegate(aura::WindowTreeHost* host) |
24 : host_(host) { | 23 : host_(host) { |
25 } | 24 } |
26 | 25 |
27 virtual ~CopyHostContentLayerDelegate() {} | 26 virtual ~CopyHostContentLayerDelegate() {} |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 BootSplashScreen::~BootSplashScreen() { | 64 BootSplashScreen::~BootSplashScreen() { |
66 } | 65 } |
67 | 66 |
68 void BootSplashScreen::StartHideAnimation(base::TimeDelta duration) { | 67 void BootSplashScreen::StartHideAnimation(base::TimeDelta duration) { |
69 ui::ScopedLayerAnimationSettings settings(layer_->GetAnimator()); | 68 ui::ScopedLayerAnimationSettings settings(layer_->GetAnimator()); |
70 settings.SetTransitionDuration(duration); | 69 settings.SetTransitionDuration(duration); |
71 settings.SetPreemptionStrategy(ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS); | 70 settings.SetPreemptionStrategy(ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS); |
72 layer_->SetOpacity(0.0f); | 71 layer_->SetOpacity(0.0f); |
73 } | 72 } |
74 | 73 |
75 } // namespace internal | |
76 } // namespace ash | 74 } // namespace ash |
OLD | NEW |