| 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 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // Advances view's progress bar. Maximum progress is 100. | 31 // Advances view's progress bar. Maximum progress is 100. |
| 32 void AddProgress(int progress); | 32 void AddProgress(int progress); |
| 33 | 33 |
| 34 // 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. |
| 35 void SetProgress(int progress); | 35 void SetProgress(int progress); |
| 36 | 36 |
| 37 // Shows label with instructions for user to do a manual reboot. | 37 // Shows label with instructions for user to do a manual reboot. |
| 38 // 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. |
| 39 void ShowManualRebootInfo(); | 39 void ShowManualRebootInfo(); |
| 40 | 40 |
| 41 // Shows label for "Preparing updates" state. |
| 42 void ShowPreparingUpdatesInfo(bool visible); |
| 43 |
| 41 // Whether curtain window with throbber and label in the center should | 44 // Whether curtain window with throbber and label in the center should |
| 42 // be shown. | 45 // be shown. |
| 43 void ShowCurtain(bool show_curtain); | 46 void ShowCurtain(bool show_curtain); |
| 44 | 47 |
| 45 // views::View implementation: | 48 // views::View implementation: |
| 46 virtual void Layout(); | 49 virtual void Layout(); |
| 47 | 50 |
| 48 private: | 51 private: |
| 49 // Creates Label control and adds it as a child. | 52 // Creates Label control and adds it as a child. |
| 50 void InitLabel(views::Label** label); | 53 void InitLabel(views::Label** label); |
| 51 | 54 |
| 52 // Updates visibility of the elements. | 55 // Updates visibility of the elements. |
| 53 void UpdateVisibility(); | 56 void UpdateVisibility(); |
| 54 | 57 |
| 55 // Keyboard accelerator to allow cancelling update by hitting escape. | 58 // Keyboard accelerator to allow cancelling update by hitting escape. |
| 56 views::Accelerator escape_accelerator_; | 59 views::Accelerator escape_accelerator_; |
| 57 | 60 |
| 58 // Dialog controls. | 61 // Dialog controls. |
| 59 views::Label* installing_updates_label_; | 62 views::Label* installing_updates_label_; |
| 63 views::Label* preparing_updates_label_; |
| 60 views::Label* reboot_label_; | 64 views::Label* reboot_label_; |
| 61 views::Label* manual_reboot_label_; | 65 views::Label* manual_reboot_label_; |
| 62 views::Label* escape_to_skip_label_; | 66 views::Label* escape_to_skip_label_; |
| 63 views::ProgressBar* progress_bar_; | 67 views::ProgressBar* progress_bar_; |
| 64 | 68 |
| 65 // Curtain views. | 69 // Curtain views. |
| 66 views::Label* checking_label_; | 70 views::Label* checking_label_; |
| 67 views::Throbber* throbber_; | 71 views::Throbber* throbber_; |
| 68 | 72 |
| 69 // Show curtain view? | 73 // Show curtain view? |
| 70 bool show_curtain_; | 74 bool show_curtain_; |
| 71 | 75 |
| 72 // Show manual reboot label? | 76 // Show manual reboot label? |
| 73 bool show_manual_reboot_label_; | 77 bool show_manual_reboot_label_; |
| 74 | 78 |
| 79 // Show preparing updates label? |
| 80 bool show_preparing_updates_label_; |
| 81 |
| 75 // Notifications receiver. | 82 // Notifications receiver. |
| 76 chromeos::ScreenObserver* observer_; | 83 chromeos::ScreenObserver* observer_; |
| 77 | 84 |
| 78 DISALLOW_COPY_AND_ASSIGN(UpdateView); | 85 DISALLOW_COPY_AND_ASSIGN(UpdateView); |
| 79 }; | 86 }; |
| 80 | 87 |
| 81 } // namespace chromeos | 88 } // namespace chromeos |
| 82 | 89 |
| 83 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_VIEW_H_ | 90 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_VIEW_H_ |
| OLD | NEW |