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

Unified Diff: ash/shelf/shelf_view.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_view.cc
diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc
index 438ac43a6398789d14281459de538110dcf24a00..c537e1a48e2042a547acaa4dbbd3cddc9f526361 100644
--- a/ash/shelf/shelf_view.cc
+++ b/ash/shelf/shelf_view.cc
@@ -10,7 +10,6 @@
#include "ash/ash_switches.h"
#include "ash/drag_drop/drag_image_view.h"
#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/root_window_controller.h"
#include "ash/scoped_target_root_window.h"
#include "ash/shelf/app_list_button.h"
#include "ash/shelf/overflow_bubble.h"
@@ -1838,8 +1837,7 @@ void ShelfView::ShowMenu(ui::MenuModel* menu_model,
views::MenuAnchorPosition menu_alignment = views::MENU_ANCHOR_TOPLEFT;
gfx::Rect anchor_point = gfx::Rect(click_point, gfx::Size());
- ShelfWidget* shelf = RootWindowController::ForShelf(
- GetWidget()->GetNativeView())->shelf();
+ ShelfWidget* shelf = layout_manager_->shelf_widget();
if (!context_menu) {
// Application lists use a bubble.
ShelfAlignment align = shelf->GetAlignment();
@@ -1967,9 +1965,7 @@ bool ShelfView::ShouldShowTooltipForView(const views::View* view) const {
}
int ShelfView::CalculateShelfDistance(const gfx::Point& coordinate) const {
- ShelfWidget* shelf = RootWindowController::ForShelf(
- GetWidget()->GetNativeView())->shelf();
- ShelfAlignment align = shelf->GetAlignment();
+ ShelfAlignment align = layout_manager_->GetAlignment();
const gfx::Rect bounds = GetBoundsInScreen();
int distance = 0;
switch (align) {
« ash/shelf/shelf.h ('K') | « ash/shelf/shelf_layout_manager.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698