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_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 |
(...skipping 29 matching lines...) Expand all Loading... |
40 // Force cancel update. Made virtual to simplify mocking. | 40 // Force cancel update. Made virtual to simplify mocking. |
41 virtual void CancelUpdate(); | 41 virtual void CancelUpdate(); |
42 | 42 |
43 // Reboot check delay get/set, in seconds. | 43 // Reboot check delay get/set, in seconds. |
44 int reboot_check_delay() const { return reboot_check_delay_; } | 44 int reboot_check_delay() const { return reboot_check_delay_; } |
45 void SetRebootCheckDelay(int seconds); | 45 void SetRebootCheckDelay(int seconds); |
46 | 46 |
47 // Returns true if this instance is still active (i.e. has not been deleted). | 47 // Returns true if this instance is still active (i.e. has not been deleted). |
48 static bool HasInstance(UpdateScreen* inst); | 48 static bool HasInstance(UpdateScreen* inst); |
49 | 49 |
| 50 void SetIgnoreIdleStatus(bool ignore_idle_status); |
| 51 |
50 enum ExitReason { | 52 enum ExitReason { |
51 REASON_UPDATE_CANCELED, | 53 REASON_UPDATE_CANCELED, |
52 REASON_UPDATE_INIT_FAILED, | 54 REASON_UPDATE_INIT_FAILED, |
53 REASON_UPDATE_NON_CRITICAL, | 55 REASON_UPDATE_NON_CRITICAL, |
54 REASON_UPDATE_ENDED | 56 REASON_UPDATE_ENDED |
55 }; | 57 }; |
56 // Reports update results to the ScreenObserver. | 58 // Reports update results to the ScreenObserver. |
57 virtual void ExitUpdate(ExitReason reason); | 59 virtual void ExitUpdate(ExitReason reason); |
58 | 60 |
59 // UpdateLibrary::Observer implementation: | 61 // UpdateLibrary::Observer implementation: |
(...skipping 24 matching lines...) Expand all Loading... |
84 // Time in seconds after which we decide that the device has not rebooted | 86 // Time in seconds after which we decide that the device has not rebooted |
85 // automatically. If reboot didn't happen during this interval, ask user to | 87 // automatically. If reboot didn't happen during this interval, ask user to |
86 // reboot device manually. | 88 // reboot device manually. |
87 int reboot_check_delay_; | 89 int reboot_check_delay_; |
88 | 90 |
89 // True if in the process of checking for update. | 91 // True if in the process of checking for update. |
90 bool is_checking_for_update_; | 92 bool is_checking_for_update_; |
91 // Flag that is used to detect when update download has just started. | 93 // Flag that is used to detect when update download has just started. |
92 bool is_downloading_update_; | 94 bool is_downloading_update_; |
93 // If true, update deadlines are ignored. | 95 // If true, update deadlines are ignored. |
94 // Note, this is true by default. See "http://crosbug.com/10068". | 96 // Note, this is false by default. |
95 bool is_ignore_update_deadlines_; | 97 bool is_ignore_update_deadlines_; |
96 // Whether the update screen is shown. | 98 // Whether the update screen is shown. |
97 bool is_shown_; | 99 bool is_shown_; |
| 100 // Ignore fist IDLE status that is sent before update screen initiated check. |
| 101 bool ignore_idle_status_; |
98 | 102 |
99 // Keeps actor which is delegated with all showing operations. | 103 // Keeps actor which is delegated with all showing operations. |
100 UpdateScreenActor* actor_; | 104 UpdateScreenActor* actor_; |
101 | 105 |
102 DISALLOW_COPY_AND_ASSIGN(UpdateScreen); | 106 DISALLOW_COPY_AND_ASSIGN(UpdateScreen); |
103 }; | 107 }; |
104 | 108 |
105 } // namespace chromeos | 109 } // namespace chromeos |
106 | 110 |
107 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_ | 111 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_ |
OLD | NEW |