OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_VOLUME_BUBBLE_VIEW_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_VOLUME_BUBBLE_VIEW_H_ |
| 7 |
| 8 #include "views/view.h" |
| 9 |
| 10 namespace views { |
| 11 class ProgressBar; |
| 12 } // namespace views |
| 13 |
| 14 class SkBitmap; |
| 15 |
| 16 namespace chromeos { |
| 17 |
| 18 class VolumeBubbleView : public views::View { |
| 19 public: |
| 20 VolumeBubbleView(); |
| 21 |
| 22 // Initialize the view. Set the volume progress bar to the specified position. |
| 23 void Init(int volume_level_percent); |
| 24 |
| 25 // Set the volume progress bar to the specified position and redraw it. |
| 26 void Update(int volume_level_percent); |
| 27 |
| 28 private: |
| 29 // views::View implementation: |
| 30 virtual void Paint(gfx::Canvas* canvas); |
| 31 virtual void Layout(); |
| 32 virtual gfx::Size GetPreferredSize(); |
| 33 |
| 34 views::ProgressBar* progress_bar_; |
| 35 SkBitmap* volume_icon_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(VolumeBubbleView); |
| 38 }; |
| 39 |
| 40 } // namespace chromeos |
| 41 |
| 42 #endif // CHROME_BROWSER_CHROMEOS_VOLUME_BUBBLE_VIEW_H_ |
OLD | NEW |