Index: chrome/browser/chromeos/setting_level_bubble_view.cc |
diff --git a/chrome/browser/chromeos/setting_level_bubble_view.cc b/chrome/browser/chromeos/setting_level_bubble_view.cc |
index 5395403da377774c3da5ea731ca88f44c31a294e..a7faa2805908c5450049453040cb655da163b709 100644 |
--- a/chrome/browser/chromeos/setting_level_bubble_view.cc |
+++ b/chrome/browser/chromeos/setting_level_bubble_view.cc |
@@ -32,15 +32,18 @@ SettingLevelBubbleView::SettingLevelBubbleView() |
icon_(NULL) { |
} |
-void SettingLevelBubbleView::Init(SkBitmap* icon, int level_percent) { |
+void SettingLevelBubbleView::Init(SkBitmap* icon, |
+ int level_percent, |
+ bool enabled) { |
DCHECK(icon); |
DCHECK(level_percent >= 0 && level_percent <= 100); |
icon_ = icon; |
progress_bar_ = new views::ProgressBar(); |
AddChildView(progress_bar_); |
- Update(level_percent); |
progress_bar_->EnableCanvasFlippingForRTLUI(true); |
EnableCanvasFlippingForRTLUI(true); |
+ SetLevel(level_percent); |
+ SetEnabled(enabled); |
} |
void SettingLevelBubbleView::SetIcon(SkBitmap* icon) { |
@@ -49,11 +52,15 @@ void SettingLevelBubbleView::SetIcon(SkBitmap* icon) { |
SchedulePaint(); |
} |
-void SettingLevelBubbleView::Update(int level_percent) { |
+void SettingLevelBubbleView::SetLevel(int level_percent) { |
DCHECK(level_percent >= 0 && level_percent <= 100); |
progress_bar_->SetProgress(level_percent); |
} |
+void SettingLevelBubbleView::SetEnabled(bool enabled) { |
+ progress_bar_->SetEnabled(enabled); |
+} |
+ |
void SettingLevelBubbleView::OnPaint(gfx::Canvas* canvas) { |
views::View::OnPaint(canvas); |
canvas->DrawBitmapInt(*icon_, kPadding, (height() - icon_->height()) / 2); |