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

Side by Side Diff: ash/shelf/shelf_widget.cc

Issue 2007003002: mash: Preliminary support for shelf auto-hide (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shutdown
Patch Set: cleanup Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shelf/shelf_widget.h" 5 #include "ash/shelf/shelf_widget.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/focus_cycler.h" 8 #include "ash/focus_cycler.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/session/session_state_delegate.h" 10 #include "ash/session/session_state_delegate.h"
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 if (delegate_view_) 787 if (delegate_view_)
788 return delegate_view_->GetDimmerBoundsForTest(); 788 return delegate_view_->GetDimmerBoundsForTest();
789 return gfx::Rect(); 789 return gfx::Rect();
790 } 790 }
791 791
792 void ShelfWidget::DisableDimmingAnimationsForTest() { 792 void ShelfWidget::DisableDimmingAnimationsForTest() {
793 DCHECK(delegate_view_); 793 DCHECK(delegate_view_);
794 return delegate_view_->disable_dimming_animations_for_test(); 794 return delegate_view_->disable_dimming_animations_for_test();
795 } 795 }
796 796
797 void ShelfWidget::OnMouseEvent(ui::MouseEvent* event) {
798 Widget::OnMouseEvent(event);
799 if (Shell::GetInstance()->in_mus() && shelf_layout_manager_)
800 shelf_layout_manager_->UpdateAutoHideForMouseEvent(event);
801 }
802
803 void ShelfWidget::OnGestureEvent(ui::GestureEvent* event) {
804 Widget::OnGestureEvent(event);
805 if (Shell::GetInstance()->in_mus() && shelf_layout_manager_)
806 shelf_layout_manager_->UpdateAutoHideForGestureEvent(event);
807 }
808
797 void ShelfWidget::WillDeleteShelf() { 809 void ShelfWidget::WillDeleteShelf() {
798 shelf_layout_manager_->RemoveObserver(this); 810 shelf_layout_manager_->RemoveObserver(this);
799 shelf_layout_manager_ = NULL; 811 shelf_layout_manager_ = NULL;
800 } 812 }
801 813
802 } // namespace ash 814 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698