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

Unified Diff: ash/common/shelf/shelf.cc

Issue 2268823002: mash: Move more shelf files to ash/common/shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase. Created 4 years, 4 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.h ('k') | ash/common/shelf/shelf_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/shelf.cc
diff --git a/ash/shelf/shelf.cc b/ash/common/shelf/shelf.cc
similarity index 92%
rename from ash/shelf/shelf.cc
rename to ash/common/shelf/shelf.cc
index 239fe40623655aae2e3a85378d9bf7b7f3860713..320195b85923d8feb8f986e4cb878b68229f1bf6 100644
--- a/ash/shelf/shelf.cc
+++ b/ash/common/shelf/shelf.cc
@@ -2,24 +2,24 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/shelf/shelf.h"
+#include "ash/common/shelf/shelf.h"
#include <algorithm>
#include <cmath>
-#include "ash/aura/wm_window_aura.h"
#include "ash/common/shelf/shelf_delegate.h"
#include "ash/common/shelf/shelf_item_delegate.h"
+#include "ash/common/shelf/shelf_layout_manager.h"
#include "ash/common/shelf/shelf_model.h"
#include "ash/common/shelf/shelf_navigator.h"
#include "ash/common/shelf/shelf_view.h"
+#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/wm_lookup.h"
+#include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_shell.h"
+#include "ash/common/wm_window.h"
#include "ash/common/wm_window_property.h"
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ui/aura/window.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/image/image.h"
@@ -54,11 +54,8 @@ Shelf* Shelf::ForPrimaryDisplay() {
}
// static
-Shelf* Shelf::ForWindow(const WmWindow* window) {
- const aura::Window* aura_window = WmWindowAura::GetAuraWindow(window);
- ShelfWidget* shelf_widget =
- RootWindowController::ForWindow(aura_window)->shelf_widget();
- return shelf_widget ? shelf_widget->shelf() : nullptr;
+Shelf* Shelf::ForWindow(WmWindow* window) {
+ return window->GetRootWindowController()->GetShelf()->shelf();
}
void Shelf::SetAlignment(ShelfAlignment alignment) {
« no previous file with comments | « ash/common/shelf/shelf.h ('k') | ash/common/shelf/shelf_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698