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

Unified Diff: ash/first_run/first_run_helper_impl.cc

Issue 2288993002: ash: Move AppList support to ShelfWidget, expose ShelfWidget in WmShelf (Closed)
Patch Set: 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
Index: ash/first_run/first_run_helper_impl.cc
diff --git a/ash/first_run/first_run_helper_impl.cc b/ash/first_run/first_run_helper_impl.cc
index 71b1e6cab9f1d3606b8574165597c593f9bf8eb7..0acba3a52963147ce8e7fec65a314422d8ee5c3f 100644
--- a/ash/first_run/first_run_helper_impl.cc
+++ b/ash/first_run/first_run_helper_impl.cc
@@ -5,9 +5,11 @@
#include "ash/first_run/first_run_helper_impl.h"
#include "ash/common/shelf/app_list_button.h"
-#include "ash/common/shelf/shelf.h"
+#include "ash/common/shelf/shelf_widget.h"
+#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/system/tray/system_tray.h"
+#include "ash/common/wm_lookup.h"
#include "ash/shell.h"
#include "base/logging.h"
#include "ui/app_list/views/app_list_view.h"
@@ -53,8 +55,9 @@ views::Widget* FirstRunHelperImpl::GetOverlayWidget() {
}
gfx::Rect FirstRunHelperImpl::GetAppListButtonBounds() {
- Shelf* shelf = Shelf::ForPrimaryDisplay();
- AppListButton* app_button = shelf->GetAppListButton();
+ WmShelf* shelf =
+ WmShelf::ForWindow(WmLookup::Get()->GetWindowForWidget(widget_));
msw 2016/08/29 22:58:08 nit/q: Why look up widget_ instead of using WmShel
James Cook 2016/08/29 23:49:25 No particularly good reason. Switched to WmShell::
+ AppListButton* app_button = shelf->shelf_widget()->GetAppListButton();
return app_button->GetBoundsInScreen();
}

Powered by Google App Engine
This is Rietveld 408576698