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

Side by Side Diff: chrome/browser/chromeos/login/update_screen.h

Issue 8585025: chromeos: Change all clients of UpdateLibrary to use UpdateEngineClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 9 years, 1 month 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/dbus/update_engine_client.h"
15 #include "chrome/browser/chromeos/login/update_screen_actor.h" 15 #include "chrome/browser/chromeos/login/update_screen_actor.h"
16 #include "chrome/browser/chromeos/login/wizard_screen.h" 16 #include "chrome/browser/chromeos/login/wizard_screen.h"
17 17
18 namespace chromeos { 18 namespace chromeos {
19 19
20 class ScreenObserver; 20 class ScreenObserver;
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 UpdateEngineClient::Observer,
26 public UpdateScreenActor::Delegate, 26 public UpdateScreenActor::Delegate,
27 public WizardScreen { 27 public WizardScreen {
28 public: 28 public:
29 UpdateScreen(ScreenObserver* screen_observer, UpdateScreenActor* actor); 29 UpdateScreen(ScreenObserver* screen_observer, UpdateScreenActor* actor);
30 virtual ~UpdateScreen(); 30 virtual ~UpdateScreen();
31 31
32 // Overridden from WizardScreen. 32 // Overridden from WizardScreen.
33 virtual void PrepareToShow(); 33 virtual void PrepareToShow();
34 virtual void Show(); 34 virtual void Show();
35 virtual void Hide(); 35 virtual void Hide();
(...skipping 17 matching lines...) Expand all
53 53
54 enum ExitReason { 54 enum ExitReason {
55 REASON_UPDATE_CANCELED, 55 REASON_UPDATE_CANCELED,
56 REASON_UPDATE_INIT_FAILED, 56 REASON_UPDATE_INIT_FAILED,
57 REASON_UPDATE_NON_CRITICAL, 57 REASON_UPDATE_NON_CRITICAL,
58 REASON_UPDATE_ENDED 58 REASON_UPDATE_ENDED
59 }; 59 };
60 // Reports update results to the ScreenObserver. 60 // Reports update results to the ScreenObserver.
61 virtual void ExitUpdate(ExitReason reason); 61 virtual void ExitUpdate(ExitReason reason);
62 62
63 // UpdateLibrary::Observer implementation: 63 // UpdateEngineClient::Observer implementation:
64 virtual void UpdateStatusChanged(const UpdateLibrary::Status& status); 64 virtual void UpdateStatusChanged(
65 const UpdateEngineClient::Status& status) OVERRIDE;
65 66
66 private: 67 private:
67 FRIEND_TEST_ALL_PREFIXES(UpdateScreenTest, TestBasic); 68 FRIEND_TEST_ALL_PREFIXES(UpdateScreenTest, TestBasic);
68 FRIEND_TEST_ALL_PREFIXES(UpdateScreenTest, TestUpdateAvailable); 69 FRIEND_TEST_ALL_PREFIXES(UpdateScreenTest, TestUpdateAvailable);
69 70
70 // Returns true if there is critical system update that requires installation 71 // Returns true if there is critical system update that requires installation
71 // and immediate reboot. 72 // and immediate reboot.
72 bool HasCriticalUpdate(); 73 bool HasCriticalUpdate();
73 74
74 // Timer notification handlers. 75 // Timer notification handlers.
(...skipping 29 matching lines...) Expand all
104 105
105 // Keeps actor which is delegated with all showing operations. 106 // Keeps actor which is delegated with all showing operations.
106 UpdateScreenActor* actor_; 107 UpdateScreenActor* actor_;
107 108
108 DISALLOW_COPY_AND_ASSIGN(UpdateScreen); 109 DISALLOW_COPY_AND_ASSIGN(UpdateScreen);
109 }; 110 };
110 111
111 } // namespace chromeos 112 } // namespace chromeos
112 113
113 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_ 114 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/dbus/mock_dbus_thread_manager.cc ('k') | chrome/browser/chromeos/login/update_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698