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

Unified Diff: ash/shelf/shelf.cc

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.cc
diff --git a/ash/shelf/shelf.cc b/ash/shelf/shelf.cc
index faa1f4fdbca948384c1b4104f1b57cfd13db2762..e95f21d845902ec6d6568dba98b24a5841553401 100644
--- a/ash/shelf/shelf.cc
+++ b/ash/shelf/shelf.cc
@@ -21,6 +21,7 @@
#include "ash/shell.h"
#include "ash/shell_delegate.h"
#include "ash/shell_window_ids.h"
+#include "ash/wm/aura/wm_shelf_aura.h"
#include "ash/wm/window_properties.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
@@ -49,6 +50,7 @@ Shelf::Shelf(ShelfModel* shelf_model,
shelf_view_->Init();
shelf_widget_->GetContentsView()->AddChildView(shelf_view_);
shelf_widget_->GetNativeView()->SetName(kNativeViewName);
+ wm_shelf_.reset(new wm::WmShelfAura(this));
James Cook 2016/04/26 15:22:34 optional: Maybe comment why this has to be done at
sky 2016/04/26 16:26:02 Done.
}
Shelf::~Shelf() {
@@ -66,12 +68,12 @@ Shelf* Shelf::ForWindow(const aura::Window* window) {
return shelf_widget ? shelf_widget->shelf() : nullptr;
}
-void Shelf::SetAlignment(ShelfAlignment alignment) {
+void Shelf::SetAlignment(wm::ShelfAlignment alignment) {
if (alignment_ == alignment)
return;
if (shelf_locking_manager_.is_locked() &&
- alignment != SHELF_ALIGNMENT_BOTTOM_LOCKED) {
+ alignment != wm::SHELF_ALIGNMENT_BOTTOM_LOCKED) {
shelf_locking_manager_.set_stored_alignment(alignment);
return;
}

Powered by Google App Engine
This is Rietveld 408576698