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

Side by Side Diff: chrome/browser/chromeos/login/update_screen.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_CHROMEOS_LOGIN_UPDATE_SCREEN_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 10
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/timer.h" 13 #include "base/timer.h"
14 #include "chrome/browser/chromeos/cros/update_library.h" 14 #include "chrome/browser/chromeos/cros/update_library.h"
15 #include "chrome/browser/chromeos/login/update_screen_actor.h"
15 #include "chrome/browser/chromeos/login/wizard_screen.h" 16 #include "chrome/browser/chromeos/login/wizard_screen.h"
16 17
17 namespace chromeos { 18 namespace chromeos {
18 19
19 class ScreenObserver; 20 class ScreenObserver;
20 class UpdateScreenActor;
21 21
22 // Controller for the update screen. It does not depend on the specific 22 // Controller for the update screen. It does not depend on the specific
23 // implementation of the screen showing (Views of WebUI based), the dependency 23 // implementation of the screen showing (Views of WebUI based), the dependency
24 // is moved to the UpdateScreenActor instead. 24 // is moved to the UpdateScreenActor instead.
25 class UpdateScreen: public UpdateLibrary::Observer, 25 class UpdateScreen: public UpdateLibrary::Observer,
26 public UpdateScreenActor::Delegate,
26 public WizardScreen { 27 public WizardScreen {
27 public: 28 public:
28 UpdateScreen(ScreenObserver* screen_observer, UpdateScreenActor* actor); 29 UpdateScreen(ScreenObserver* screen_observer, UpdateScreenActor* actor);
29 virtual ~UpdateScreen(); 30 virtual ~UpdateScreen();
30 31
31 // Overridden from WizardScreen. 32 // Overridden from WizardScreen.
32 virtual void PrepareToShow(); 33 virtual void PrepareToShow();
33 virtual void Show(); 34 virtual void Show();
34 virtual void Hide(); 35 virtual void Hide();
35 36
37 // UpdateScreenActor::Delegate implementation:
38 virtual void CancelUpdate() OVERRIDE;
39 virtual void OnActorDestroyed(UpdateScreenActor* actor) OVERRIDE;
40
36 // Checks for updates and performs an update if needed. Made virtual to 41 // Checks for updates and performs an update if needed. Made virtual to
37 // simplify mocking. 42 // simplify mocking.
38 virtual void StartUpdate(); 43 virtual void StartUpdate();
39 44
40 // Force cancel update. Made virtual to simplify mocking.
41 virtual void CancelUpdate();
42
43 // Reboot check delay get/set, in seconds. 45 // Reboot check delay get/set, in seconds.
44 int reboot_check_delay() const { return reboot_check_delay_; } 46 int reboot_check_delay() const { return reboot_check_delay_; }
45 void SetRebootCheckDelay(int seconds); 47 void SetRebootCheckDelay(int seconds);
46 48
47 // Returns true if this instance is still active (i.e. has not been deleted). 49 // Returns true if this instance is still active (i.e. has not been deleted).
48 static bool HasInstance(UpdateScreen* inst); 50 static bool HasInstance(UpdateScreen* inst);
49 51
50 void SetIgnoreIdleStatus(bool ignore_idle_status); 52 void SetIgnoreIdleStatus(bool ignore_idle_status);
51 53
52 enum ExitReason { 54 enum ExitReason {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 104
103 // Keeps actor which is delegated with all showing operations. 105 // Keeps actor which is delegated with all showing operations.
104 UpdateScreenActor* actor_; 106 UpdateScreenActor* actor_;
105 107
106 DISALLOW_COPY_AND_ASSIGN(UpdateScreen); 108 DISALLOW_COPY_AND_ASSIGN(UpdateScreen);
107 }; 109 };
108 110
109 } // namespace chromeos 111 } // namespace chromeos
110 112
111 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_ 113 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/mock_update_screen.cc ('k') | chrome/browser/chromeos/login/update_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698