Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/update_screen_handler.h

Issue 7774009: [cros] check for updates in WebUI OOBE can be cancelled in dev builds. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Added OnActorDestroyed to UpdateScreen::Delegate. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_UPDATE_SCREEN_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_UPDATE_SCREEN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_UPDATE_SCREEN_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_UPDATE_SCREEN_HANDLER_H_
7 7
8 #include "chrome/browser/chromeos/login/update_screen_actor.h" 8 #include "chrome/browser/chromeos/login/update_screen_actor.h"
9 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 9 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
10 10
11 namespace chromeos { 11 namespace chromeos {
12 12
13 class UpdateScreenHandler : public UpdateScreenActor, 13 class UpdateScreenHandler : public UpdateScreenActor,
14 public BaseScreenHandler { 14 public BaseScreenHandler {
15 public: 15 public:
16 UpdateScreenHandler(); 16 UpdateScreenHandler();
17 virtual ~UpdateScreenHandler(); 17 virtual ~UpdateScreenHandler();
18 18
19 // BaseScreenHandler implementation: 19 // BaseScreenHandler implementation:
20 virtual void GetLocalizedStrings(base::DictionaryValue* localized_strings); 20 virtual void GetLocalizedStrings(base::DictionaryValue* localized_strings);
21 virtual void Initialize(); 21 virtual void Initialize();
22 22
23 // UpdateScreenActor implementation: 23 // UpdateScreenActor implementation:
24 virtual void SetDelegate(UpdateScreenActor::Delegate* screen) OVERRIDE;
24 virtual void Show(); 25 virtual void Show();
25 virtual void Hide(); 26 virtual void Hide();
26 virtual void PrepareToShow(); 27 virtual void PrepareToShow();
27 virtual void ShowManualRebootInfo(); 28 virtual void ShowManualRebootInfo();
28 virtual void SetProgress(int progress); 29 virtual void SetProgress(int progress);
29 virtual void ShowCurtain(bool enable); 30 virtual void ShowCurtain(bool enable);
30 virtual void ShowPreparingUpdatesInfo(bool visible); 31 virtual void ShowPreparingUpdatesInfo(bool visible);
31 32
32 // WebUIMessageHandler implementation: 33 // WebUIMessageHandler implementation:
33 virtual void RegisterMessages(); 34 virtual void RegisterMessages();
34 35
35 private: 36 private:
37 #if !defined(OFFICIAL_BUILD)
38 // Called when user presses Escape to cancel update.
39 void HandleUpdateCancel(const base::ListValue* args);
40 #endif
41
42 UpdateScreenActor::Delegate* screen_;
36 43
37 // Keeps whether screen should be shown right after initialization. 44 // Keeps whether screen should be shown right after initialization.
38 bool show_on_init_; 45 bool show_on_init_;
39 46
40 DISALLOW_COPY_AND_ASSIGN(UpdateScreenHandler); 47 DISALLOW_COPY_AND_ASSIGN(UpdateScreenHandler);
41 }; 48 };
42 49
43 } // namespace chromeos 50 } // namespace chromeos
44 51
45 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_UPDATE_SCREEN_HANDLER_H_ 52 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_UPDATE_SCREEN_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698