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

Unified Diff: ash/shelf/shelf_tooltip_manager.cc

Issue 1743493002: Cleanup ash shelf accessor functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert ash/shelf/shelf_widget.cc for browser_tests crash... 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
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shelf/shelf_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_tooltip_manager.cc
diff --git a/ash/shelf/shelf_tooltip_manager.cc b/ash/shelf/shelf_tooltip_manager.cc
index 66f583f8d7b8f204ee91d3d02860dce9efe74e78..3252ae1c16a89f7f7c929929d3be1d7588cfdaca 100644
--- a/ash/shelf/shelf_tooltip_manager.cc
+++ b/ash/shelf/shelf_tooltip_manager.cc
@@ -4,6 +4,7 @@
#include "ash/shelf/shelf_tooltip_manager.h"
+#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_view.h"
#include "ash/shell.h"
@@ -344,12 +345,10 @@ void ShelfTooltipManager::CreateBubble(views::View* anchor,
anchor_ = anchor;
text_ = text;
- views::BubbleBorder::Arrow arrow =
- shelf_layout_manager_->SelectValueForShelfAlignment(
- views::BubbleBorder::BOTTOM_CENTER,
- views::BubbleBorder::LEFT_CENTER,
- views::BubbleBorder::RIGHT_CENTER,
- views::BubbleBorder::TOP_CENTER);
+ Shelf* shelf = shelf_layout_manager_->shelf_widget()->shelf();
+ views::BubbleBorder::Arrow arrow = shelf->SelectValueForShelfAlignment(
+ views::BubbleBorder::BOTTOM_CENTER, views::BubbleBorder::LEFT_CENTER,
+ views::BubbleBorder::RIGHT_CENTER, views::BubbleBorder::TOP_CENTER);
view_ = new ShelfTooltipBubble(anchor, arrow, this);
widget_ = view_->GetWidget();
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shelf/shelf_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698