Index: ash/shelf/shelf_widget.cc |
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc |
index 7c478c7d2a3e5de6c0c230a3753a2f7761080554..ee245de6aa7480258a1be135b80b67e770f6028f 100644 |
--- a/ash/shelf/shelf_widget.cc |
+++ b/ash/shelf/shelf_widget.cc |
@@ -254,9 +254,6 @@ class ShelfWidget::DelegateView : public views::WidgetDelegate, |
void SetDimmed(bool dimmed); |
bool GetDimmed() const; |
- // Set the bounds of the widget. |
- void SetWidgetBounds(const gfx::Rect bounds); |
- |
void SetParentLayer(ui::Layer* layer); |
// views::View overrides: |
@@ -359,11 +356,6 @@ bool ShelfWidget::DelegateView::GetDimmed() const { |
return dimmer_.get() && dimmer_->IsVisible(); |
} |
-void ShelfWidget::DelegateView::SetWidgetBounds(const gfx::Rect bounds) { |
- if (dimmer_) |
- dimmer_->SetBounds(bounds); |
-} |
- |
void ShelfWidget::DelegateView::SetParentLayer(ui::Layer* layer) { |
layer->Add(&opaque_background_); |
ReorderLayers(); |
@@ -430,6 +422,8 @@ void ShelfWidget::DelegateView::ReorderChildLayers(ui::Layer* parent_layer) { |
void ShelfWidget::DelegateView::OnBoundsChanged(const gfx::Rect& old_bounds) { |
opaque_background_.SetBounds(GetLocalBounds()); |
+ if (dimmer_) |
+ dimmer_->SetBounds(GetBoundsInScreen()); |
} |
void ShelfWidget::DelegateView::ForceUndimming(bool force) { |
@@ -600,11 +594,6 @@ void ShelfWidget::ShutdownStatusAreaWidget() { |
status_area_widget_ = NULL; |
} |
-void ShelfWidget::SetWidgetBounds(const gfx::Rect& rect) { |
- Widget::SetBounds(rect); |
- delegate_view_->SetWidgetBounds(rect); |
-} |
- |
void ShelfWidget::ForceUndimming(bool force) { |
delegate_view_->ForceUndimming(force); |
} |