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

Unified Diff: ash/shelf/shelf.cc

Issue 1743493002: Cleanup ash shelf accessor functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ShelfBrowserTest. Created 4 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
Index: ash/shelf/shelf.cc
diff --git a/ash/shelf/shelf.cc b/ash/shelf/shelf.cc
index 0a02248586537f35ddb025793458a12f53c72db9..c331e66c3359c727e8f5dcfd9014edc715d4bd72 100644
--- a/ash/shelf/shelf.cc
+++ b/ash/shelf/shelf.cc
@@ -18,7 +18,6 @@
#include "ash/shelf/shelf_navigator.h"
#include "ash/shelf/shelf_util.h"
#include "ash/shelf/shelf_view.h"
-#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
#include "ash/shell_delegate.h"
#include "ash/shell_window_ids.h"
@@ -61,14 +60,12 @@ Shelf::~Shelf() {
// static
Shelf* Shelf::ForPrimaryDisplay() {
- ShelfWidget* shelf_widget =
- RootWindowController::ForShelf(Shell::GetPrimaryRootWindow())->shelf();
- return shelf_widget ? shelf_widget->shelf() : NULL;
+ return Shelf::ForWindow(Shell::GetPrimaryRootWindow());
}
// static
-Shelf* Shelf::ForWindow(aura::Window* window) {
- ShelfWidget* shelf_widget = RootWindowController::ForShelf(window)->shelf();
+Shelf* Shelf::ForWindow(const aura::Window* window) {
+ ShelfWidget* shelf_widget = RootWindowController::ForWindow(window)->shelf();
return shelf_widget ? shelf_widget->shelf() : NULL;
}
« ash/shelf/shelf.h ('K') | « ash/shelf/shelf.h ('k') | ash/shelf/shelf_alignment_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698