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

Unified Diff: ash/common/shelf/shelf_layout_manager.h

Issue 2676673005: ash: Clean up shelf GetAlignment() and IsHorizontalAlignment() calls (Closed)
Patch Set: Created 3 years, 10 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/common/shelf/shelf_button.cc ('k') | ash/common/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/shelf_layout_manager.h
diff --git a/ash/common/shelf/shelf_layout_manager.h b/ash/common/shelf/shelf_layout_manager.h
index 9f2834b315af57353b9741a01d420f78b0371f47..4949ea8e65d0fdf3d98b0a000eeee0e0945d0496 100644
--- a/ash/common/shelf/shelf_layout_manager.h
+++ b/ash/common/shelf/shelf_layout_manager.h
@@ -9,7 +9,7 @@
#include "ash/ash_export.h"
#include "ash/common/session/session_state_observer.h"
-#include "ash/common/shelf/shelf_widget.h"
+#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/shell_observer.h"
#include "ash/common/wm/background_animator.h"
#include "ash/common/wm/dock/docked_window_layout_manager_observer.h"
@@ -27,6 +27,7 @@
namespace ui {
class ImplicitAnimationObserver;
+class MouseEvent;
}
namespace ash {
@@ -149,14 +150,11 @@ class ASH_EXPORT ShelfLayoutManager
// Overridden from SessionStateObserver:
void SessionStateChanged(session_manager::SessionState state) override;
- // TODO(msw): Remove these accessors, kept temporarily to simplify changes.
- ShelfAlignment GetAlignment() const { return shelf_widget_->GetAlignment(); }
-
// TODO(harrym|oshima): These templates will be moved to a new Shelf class.
// A helper function for choosing values specific to a shelf alignment.
template <typename T>
T SelectValueForShelfAlignment(T bottom, T left, T right) const {
- switch (GetAlignment()) {
+ switch (wm_shelf_->GetAlignment()) {
case SHELF_ALIGNMENT_BOTTOM:
case SHELF_ALIGNMENT_BOTTOM_LOCKED:
return bottom;
@@ -171,12 +169,9 @@ class ASH_EXPORT ShelfLayoutManager
template <typename T>
T PrimaryAxisValue(T horizontal, T vertical) const {
- return IsHorizontalAlignment() ? horizontal : vertical;
+ return wm_shelf_->IsHorizontalAlignment() ? horizontal : vertical;
}
- // Is the shelf's alignment horizontal?
- bool IsHorizontalAlignment() const;
-
// Returns how the shelf background should be painted.
ShelfBackgroundType GetShelfBackgroundType() const;
« no previous file with comments | « ash/common/shelf/shelf_button.cc ('k') | ash/common/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698