Only fsync leveldb's directory when the manifest is being updated.
[chromium-blink-merge.git] / ash / wm / boot_splash_screen.h
blobdc4538b8d8ce13eaf5649ace2f08e34f77712339
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
3 // found in the LICENSE file.
5 #ifndef ASH_WM_BOOT_SPLASH_SCREEN_H_
6 #define ASH_WM_BOOT_SPLASH_SCREEN_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/time.h"
14 namespace aura {
15 class RootWindow;
18 namespace ui {
19 class Layer;
20 class LayerDelegate;
23 namespace ash {
24 namespace internal {
26 // BootSplashScreen manages a ui::Layer, stacked at the top of the root layer's
27 // children, that displays a copy of the initial contents of the host window.
28 // This allows us to continue displaying the Chrome OS boot splash screen (which
29 // is displayed before Ash starts) after the compositor has taken over so we can
30 // animate the transition between the splash screen and the login screen.
31 class BootSplashScreen {
32 public:
33 explicit BootSplashScreen(aura::RootWindow* root_window);
34 ~BootSplashScreen();
36 // Begins animating |layer_|'s opacity to 0 over |duration|.
37 void StartHideAnimation(base::TimeDelta duration);
39 private:
40 class CopyHostContentLayerDelegate;
42 // Copies the host window's content to |layer_|.
43 scoped_ptr<CopyHostContentLayerDelegate> layer_delegate_;
45 scoped_ptr<ui::Layer> layer_;
47 DISALLOW_COPY_AND_ASSIGN(BootSplashScreen);
50 } // namespace internal
51 } // namespace ash
53 #endif // ASH_WM_BOOT_SPLASH_SCREEN_H_