From a8328b008044d09a9e7c5dedc177af9c8edb0459 Mon Sep 17 00:00:00 2001 From: "mukai@chromium.org" Date: Thu, 18 Jul 2013 21:26:46 +0000 Subject: Observes work area change and auto-hide for notifications. BUG=249509 R=dewittj@chromium.org Review URL: https://chromiumcodereview.appspot.com/19291004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212431 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/shelf/shelf_layout_manager.cc | 10 +++++----- ash/shelf/shelf_layout_manager.h | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'ash/shelf') diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc index fec998b..18bc444 100644 --- a/ash/shelf/shelf_layout_manager.cc +++ b/ash/shelf/shelf_layout_manager.cc @@ -70,11 +70,6 @@ bool IsDraggingTrayEnabled() { return dragging_tray_allowed; } -int GetPreferredShelfSize() { - return ash::switches::UseAlternateShelfLayout() ? - ShelfLayoutManager::kShelfSize : kLauncherPreferredSize; -} - } // namespace // static @@ -89,6 +84,11 @@ const int ShelfLayoutManager::kAutoHideSize = 3; // static const int ShelfLayoutManager::kShelfSize = 47; +int ShelfLayoutManager::GetPreferredShelfSize() { + return ash::switches::UseAlternateShelfLayout() ? + ShelfLayoutManager::kShelfSize : kLauncherPreferredSize; +} + // ShelfLayoutManager::AutoHideEventFilter ------------------------------------- // Notifies ShelfLayoutManager any time the mouse moves. diff --git a/ash/shelf/shelf_layout_manager.h b/ash/shelf/shelf_layout_manager.h index 939a057..e2d676d 100644 --- a/ash/shelf/shelf_layout_manager.h +++ b/ash/shelf/shelf_layout_manager.h @@ -74,6 +74,10 @@ class ASH_EXPORT ShelfLayoutManager : // settings see ash::switches::UseAlternateShelfLayout). static const int kShelfSize; + // Returns the preferred size for the shelf (either kLauncherPreferredSize or + // kShelfSize). + static int GetPreferredShelfSize(); + explicit ShelfLayoutManager(ShelfWidget* shelf); virtual ~ShelfLayoutManager(); -- cgit v1.1