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

Unified Diff: ash/shelf/shelf.h

Issue 1914093002: Refactors DockedWindowLayoutManager in terms of ash/wm/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nuke_aura_window
Patch Set: merge 2 trunk 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
Index: ash/shelf/shelf.h
diff --git a/ash/shelf/shelf.h b/ash/shelf/shelf.h
index 30c829683498d817ce6132428ccf4f1dbdaea883..ff3ee4a461eca8462ea051191beff47264a21626 100644
--- a/ash/shelf/shelf.h
+++ b/ash/shelf/shelf.h
@@ -5,6 +5,8 @@
#ifndef ASH_SHELF_SHELF_H_
#define ASH_SHELF_SHELF_H_
+#include <memory>
+
#include "ash/ash_export.h"
#include "ash/shelf/shelf_constants.h"
#include "ash/shelf/shelf_locking_manager.h"
@@ -37,6 +39,10 @@ class ShelfIconObserver;
class ShelfModel;
class ShelfView;
+namespace wm {
+class WmShelfAura;
+}
+
namespace test {
class ShelfTestAPI;
}
@@ -56,8 +62,8 @@ class ASH_EXPORT Shelf {
// user is logged in yet.
static Shelf* ForWindow(const aura::Window* window);
- void SetAlignment(ShelfAlignment alignment);
- ShelfAlignment alignment() const { return alignment_; }
+ void SetAlignment(wm::ShelfAlignment alignment);
+ wm::ShelfAlignment alignment() const { return alignment_; }
bool IsHorizontalAlignment() const;
// Sets the ShelfAutoHideBehavior. See enum description for details.
@@ -73,12 +79,12 @@ class ASH_EXPORT Shelf {
template <typename T>
T SelectValueForShelfAlignment(T bottom, T left, T right) const {
switch (alignment_) {
- case SHELF_ALIGNMENT_BOTTOM:
- case SHELF_ALIGNMENT_BOTTOM_LOCKED:
+ case wm::SHELF_ALIGNMENT_BOTTOM:
+ case wm::SHELF_ALIGNMENT_BOTTOM_LOCKED:
return bottom;
- case SHELF_ALIGNMENT_LEFT:
+ case wm::SHELF_ALIGNMENT_LEFT:
return left;
- case SHELF_ALIGNMENT_RIGHT:
+ case wm::SHELF_ALIGNMENT_RIGHT:
return right;
}
NOTREACHED();
@@ -139,15 +145,18 @@ class ASH_EXPORT Shelf {
// Returns ApplicationDragAndDropHost for this shelf.
app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList();
+ wm::WmShelfAura* wm_shelf() { return wm_shelf_.get(); }
+
private:
friend class test::ShelfTestAPI;
+ std::unique_ptr<wm::WmShelfAura> wm_shelf_;
ShelfDelegate* delegate_;
ShelfWidget* shelf_widget_;
ShelfView* shelf_view_;
ShelfLockingManager shelf_locking_manager_;
- ShelfAlignment alignment_ = SHELF_ALIGNMENT_BOTTOM;
+ wm::ShelfAlignment alignment_ = wm::SHELF_ALIGNMENT_BOTTOM;
ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER;
DISALLOW_COPY_AND_ASSIGN(Shelf);
« no previous file with comments | « ash/shelf/overflow_button.cc ('k') | ash/shelf/shelf.cc » ('j') | ash/shelf/shelf.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698