Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1976)

Unified Diff: ash/shelf/shelf_widget.cc

Issue 22638013: Prevent a user from hiding the shelf via a gesture when there are no visible windows part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698