| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_OOBE_PROGRESS_BAR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_OOBE_PROGRESS_BAR_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_OOBE_PROGRESS_BAR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_OOBE_PROGRESS_BAR_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // Set and get the progress bar progress in range [0, steps_.size() - 1]. | 29 // Set and get the progress bar progress in range [0, steps_.size() - 1]. |
| 30 void SetProgress(size_t progress); | 30 void SetProgress(size_t progress); |
| 31 int GetProgress() const { return progress_; } | 31 int GetProgress() const { return progress_; } |
| 32 | 32 |
| 33 // Add progress to current. | 33 // Add progress to current. |
| 34 void AddProgress(size_t tick) { SetProgress(progress_ + tick); } | 34 void AddProgress(size_t tick) { SetProgress(progress_ + tick); } |
| 35 | 35 |
| 36 protected: | 36 protected: |
| 37 // Overridden from View: | 37 // Overridden from View: |
| 38 virtual void LocaleChanged(); | 38 virtual void OnLocaleChanged(); |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 static void InitClass(); | 41 static void InitClass(); |
| 42 | 42 |
| 43 // Graphics. | 43 // Graphics. |
| 44 static SkBitmap* dot_current_; | 44 static SkBitmap* dot_current_; |
| 45 static SkBitmap* dot_empty_; | 45 static SkBitmap* dot_empty_; |
| 46 static SkBitmap* dot_filled_; | 46 static SkBitmap* dot_filled_; |
| 47 static SkBitmap* line_; | 47 static SkBitmap* line_; |
| 48 static SkBitmap* line_left_; | 48 static SkBitmap* line_left_; |
| 49 static SkBitmap* line_right_; | 49 static SkBitmap* line_right_; |
| 50 | 50 |
| 51 gfx::Font font_; | 51 gfx::Font font_; |
| 52 | 52 |
| 53 std::vector<int> steps_; | 53 std::vector<int> steps_; |
| 54 size_t progress_; | 54 size_t progress_; |
| 55 | 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(OobeProgressBar); | 56 DISALLOW_COPY_AND_ASSIGN(OobeProgressBar); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // chromeos | 59 } // chromeos |
| 60 | 60 |
| 61 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_OOBE_PROGRESS_BAR_H_ | 61 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_OOBE_PROGRESS_BAR_H_ |
| OLD | NEW |