OLD | NEW |
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_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_VIEW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "views/view.h" | 9 #include "views/view.h" |
10 | 10 |
11 namespace views { | 11 namespace views { |
12 class Label; | 12 class Label; |
13 class ProgressBar; | 13 class ProgressBar; |
14 class Throbber; | 14 class Throbber; |
15 } // namespace views | 15 } // namespace views |
16 | 16 |
17 namespace chromeos { | 17 namespace chromeos { |
18 | 18 |
19 class ScreenObserver; | 19 class ScreenObserver; |
20 class UpdateController; | |
21 | 20 |
22 // View for the network selection/initial welcome screen. | 21 // View for the network selection/initial welcome screen. |
23 class UpdateView : public views::View { | 22 class UpdateView : public views::View { |
24 public: | 23 public: |
25 explicit UpdateView(ScreenObserver* observer); | 24 explicit UpdateView(ScreenObserver* observer); |
26 virtual ~UpdateView(); | 25 virtual ~UpdateView(); |
27 | 26 |
28 void Init(); | 27 void Init(); |
29 void Reset(); | 28 void Reset(); |
30 void UpdateLocalizedStrings(); | 29 void UpdateLocalizedStrings(); |
31 | 30 |
32 // Sets update controller. | |
33 void set_controller(UpdateController* controller) { | |
34 controller_ = controller; | |
35 } | |
36 | |
37 // Advances view's progress bar. Maximum progress is 100. | 31 // Advances view's progress bar. Maximum progress is 100. |
38 void AddProgress(int progress); | 32 void AddProgress(int progress); |
39 | 33 |
40 // Sets the current value for the progress bar. Maximum progress is 100. | 34 // Sets the current value for the progress bar. Maximum progress is 100. |
41 void SetProgress(int progress); | 35 void SetProgress(int progress); |
42 | 36 |
43 // Shows label with instructions for user to do a manual reboot. | 37 // Shows label with instructions for user to do a manual reboot. |
44 // Usually is not called since we rely on API that will reboot after update. | 38 // Usually is not called since we rely on API that will reboot after update. |
45 void ShowManualRebootInfo(); | 39 void ShowManualRebootInfo(); |
46 | 40 |
(...skipping 26 matching lines...) Expand all Loading... |
73 views::Throbber* throbber_; | 67 views::Throbber* throbber_; |
74 | 68 |
75 // Show curtain view? | 69 // Show curtain view? |
76 bool show_curtain_; | 70 bool show_curtain_; |
77 | 71 |
78 // Show manual reboot label? | 72 // Show manual reboot label? |
79 bool show_manual_reboot_label_; | 73 bool show_manual_reboot_label_; |
80 | 74 |
81 // Notifications receiver. | 75 // Notifications receiver. |
82 chromeos::ScreenObserver* observer_; | 76 chromeos::ScreenObserver* observer_; |
83 // Update controller. | |
84 chromeos::UpdateController* controller_; | |
85 | 77 |
86 DISALLOW_COPY_AND_ASSIGN(UpdateView); | 78 DISALLOW_COPY_AND_ASSIGN(UpdateView); |
87 }; | 79 }; |
88 | 80 |
89 } // namespace chromeos | 81 } // namespace chromeos |
90 | 82 |
91 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_VIEW_H_ | 83 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_VIEW_H_ |
OLD | NEW |