Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / webui / chromeos / login / update_screen_handler.h
blobbc7823edaf6df832bd6d6742252136661635aeca
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_UI_WEBUI_CHROMEOS_LOGIN_UPDATE_SCREEN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_UPDATE_SCREEN_HANDLER_H_
8 #include <string>
10 #include "base/compiler_specific.h"
11 #include "chrome/browser/chromeos/login/screens/update_screen_actor.h"
12 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
13 #include "chrome/browser/ui/webui/chromeos/login/network_dropdown_handler.h"
15 namespace chromeos {
17 class UpdateScreenHandler : public UpdateScreenActor,
18 public BaseScreenHandler,
19 public NetworkDropdownHandler::Observer {
20 public:
21 UpdateScreenHandler();
22 virtual ~UpdateScreenHandler();
24 // BaseScreenHandler implementation:
25 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE;
26 virtual void Initialize() OVERRIDE;
28 // UpdateScreenActor implementation:
29 virtual void SetDelegate(UpdateScreenActor::Delegate* screen) OVERRIDE;
30 virtual void Show() OVERRIDE;
31 virtual void Hide() OVERRIDE;
32 virtual void PrepareToShow() OVERRIDE;
33 virtual void ShowManualRebootInfo() OVERRIDE;
34 virtual void SetProgress(int progress) OVERRIDE;
35 virtual void ShowEstimatedTimeLeft(bool visible) OVERRIDE;
36 virtual void SetEstimatedTimeLeft(const base::TimeDelta& time) OVERRIDE;
37 virtual void ShowProgressMessage(bool visible) OVERRIDE;
38 virtual void SetProgressMessage(ProgressMessage message) OVERRIDE;
39 virtual void ShowCurtain(bool visible) OVERRIDE;
41 // WebUIMessageHandler implementation:
42 virtual void RegisterMessages() OVERRIDE;
44 private:
45 // NetworkDropdownHandler::Observer implementation:
46 virtual void OnConnectToNetworkRequested(
47 const std::string& service_path) OVERRIDE;
49 #if !defined(OFFICIAL_BUILD)
50 // Called when user presses Escape to cancel update.
51 void HandleUpdateCancel();
52 #endif
54 UpdateScreenActor::Delegate* screen_;
56 // Keeps whether screen should be shown right after initialization.
57 bool show_on_init_;
59 DISALLOW_COPY_AND_ASSIGN(UpdateScreenHandler);
62 } // namespace chromeos
64 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_UPDATE_SCREEN_HANDLER_H_