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 CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_UPDATE_SCREEN_ACTOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_UPDATE_SCREEN_ACTOR_H_
8 #include "base/time/time.h"
12 class UpdateScreenActor
{
14 // Indices for corresponding info messages during update stage.
15 enum ProgressMessage
{
16 PROGRESS_MESSAGE_UPDATE_AVAILABLE
= 0,
17 PROGRESS_MESSAGE_INSTALLING_UPDATE
,
18 PROGRESS_MESSAGE_VERIFYING
,
19 PROGRESS_MESSAGE_FINALIZING
24 virtual ~Delegate() {}
25 // Force cancel update.
26 virtual void CancelUpdate() = 0;
27 virtual void OnActorDestroyed(UpdateScreenActor
* actor
) = 0;
28 virtual void OnConnectToNetworkRequested(
29 const std::string
& service_path
) = 0;
32 virtual ~UpdateScreenActor() {}
34 // Sets screen this actor belongs to.
35 virtual void SetDelegate(Delegate
* screen
) = 0;
38 virtual void Show() = 0;
41 virtual void Hide() = 0;
43 virtual void PrepareToShow() = 0;
45 // Shows manual reboot info message.
46 virtual void ShowManualRebootInfo() = 0;
48 // Sets current progress in percents.
49 virtual void SetProgress(int progress
) = 0;
51 // Shows estimated time left message.
52 virtual void ShowEstimatedTimeLeft(bool visible
) = 0;
54 // Sets current estimation for time left in the downloading stage.
55 virtual void SetEstimatedTimeLeft(const base::TimeDelta
& time
) = 0;
57 // Shows message under progress bar.
58 virtual void ShowProgressMessage(bool visible
) = 0;
60 // Sets message under progress bar.
61 virtual void SetProgressMessage(ProgressMessage message
) = 0;
63 // Shows screen curtains.
64 virtual void ShowCurtain(bool visible
) = 0;
67 } // namespace chromeos
69 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_UPDATE_SCREEN_ACTOR_H_