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

Unified Diff: ash/shelf/shelf.h

Issue 1877543002: Revise the shelf alignment locking mechanism. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update and cleanup tests. Created 4 years, 8 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/mus/shelf_delegate_mus.cc ('k') | ash/shelf/shelf.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf.h
diff --git a/ash/shelf/shelf.h b/ash/shelf/shelf.h
index b602e93835d265703fdad51d7c9cad9fff16bc3a..30c829683498d817ce6132428ccf4f1dbdaea883 100644
--- a/ash/shelf/shelf.h
+++ b/ash/shelf/shelf.h
@@ -7,6 +7,7 @@
#include "ash/ash_export.h"
#include "ash/shelf/shelf_constants.h"
+#include "ash/shelf/shelf_locking_manager.h"
#include "ash/shelf/shelf_types.h"
#include "ash/shelf/shelf_widget.h"
#include "base/macros.h"
@@ -56,12 +57,9 @@ class ASH_EXPORT Shelf {
static Shelf* ForWindow(const aura::Window* window);
void SetAlignment(ShelfAlignment alignment);
- ShelfAlignment GetAlignment() const;
+ ShelfAlignment alignment() const { return alignment_; }
bool IsHorizontalAlignment() const;
- // TODO(msw): Remove this accessor, kept temporarily to simplify changes.
- ShelfAlignment alignment() const { return GetAlignment(); }
-
// Sets the ShelfAutoHideBehavior. See enum description for details.
void SetAutoHideBehavior(ShelfAutoHideBehavior auto_hide_behavior);
ShelfAutoHideBehavior auto_hide_behavior() const {
@@ -76,6 +74,7 @@ class ASH_EXPORT Shelf {
T SelectValueForShelfAlignment(T bottom, T left, T right) const {
switch (alignment_) {
case SHELF_ALIGNMENT_BOTTOM:
+ case SHELF_ALIGNMENT_BOTTOM_LOCKED:
return bottom;
case SHELF_ALIGNMENT_LEFT:
return left;
@@ -143,15 +142,13 @@ class ASH_EXPORT Shelf {
private:
friend class test::ShelfTestAPI;
- // ShelfView used to display icons.
- ShelfView* shelf_view_;
-
- ShelfAlignment alignment_;
- ShelfAutoHideBehavior auto_hide_behavior_;
-
ShelfDelegate* delegate_;
-
ShelfWidget* shelf_widget_;
+ ShelfView* shelf_view_;
+ ShelfLockingManager shelf_locking_manager_;
+
+ ShelfAlignment alignment_ = SHELF_ALIGNMENT_BOTTOM;
+ ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER;
DISALLOW_COPY_AND_ASSIGN(Shelf);
};
« no previous file with comments | « ash/mus/shelf_delegate_mus.cc ('k') | ash/shelf/shelf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698