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

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
« no previous file with comments | « ash/shelf/shelf_widget.h ('k') | ash/wm/status_area_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_widget.cc
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc
index 1c9e6b2657dedec6d7bcdb2a28c6b794b8ac38a1..8c7733ff2d60dbd6ceb77662bebd992a1245aae5 100644
--- a/ash/shelf/shelf_widget.cc
+++ b/ash/shelf/shelf_widget.cc
@@ -256,9 +256,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:
@@ -361,11 +358,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();
@@ -432,6 +424,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) {
@@ -629,11 +623,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);
}
« no previous file with comments | « ash/shelf/shelf_widget.h ('k') | ash/wm/status_area_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698