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

Unified Diff: ash/app_list/app_list_presenter_delegate.cc

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Sync and rebase. Created 3 years, 7 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/app_list/app_list_presenter_delegate.cc
diff --git a/ash/app_list/app_list_presenter_delegate.cc b/ash/app_list/app_list_presenter_delegate.cc
index 212571ee17905d2f59958c33786439eb6ac065a6..a65d07e593b85a30a346935a2025586acaae5808 100644
--- a/ash/app_list/app_list_presenter_delegate.cc
+++ b/ash/app_list/app_list_presenter_delegate.cc
@@ -112,7 +112,7 @@ void AppListPresenterDelegate::Init(app_list::AppListView* view,
if (keyboard_controller)
keyboard_controller->AddObserver(this);
Shell::Get()->AddPreTargetHandler(this);
- WmShelf* shelf = WmShelf::ForWindow(wm_root_window);
+ WmShelf* shelf = WmShelf::ForWindow(root_window);
shelf->AddObserver(this);
// By setting us as DnD recipient, the app list knows that we can
@@ -124,8 +124,8 @@ void AppListPresenterDelegate::Init(app_list::AppListView* view,
void AppListPresenterDelegate::OnShown(int64_t display_id) {
is_visible_ = true;
// Update applist button status when app list visibility is changed.
- WmWindow* root_window =
- ShellPort::Get()->GetRootWindowForDisplayId(display_id);
+ aura::Window* root_window =
+ ShellPort::Get()->GetRootWindowForDisplayId(display_id)->aura_window();
AppListButton* app_list_button =
WmShelf::ForWindow(root_window)->shelf_widget()->GetAppListButton();
if (app_list_button)
@@ -139,9 +139,8 @@ void AppListPresenterDelegate::OnDismissed() {
is_visible_ = false;
// Update applist button status when app list visibility is changed.
- WmWindow* window = WmWindow::Get(view_->GetWidget()->GetNativeWindow());
- AppListButton* app_list_button =
- WmShelf::ForWindow(window)->shelf_widget()->GetAppListButton();
+ WmShelf* shelf = WmShelf::ForWindow(view_->GetWidget()->GetNativeWindow());
+ AppListButton* app_list_button = shelf->shelf_widget()->GetAppListButton();
if (app_list_button)
app_list_button->OnAppListDismissed();
}
@@ -162,7 +161,7 @@ gfx::Vector2d AppListPresenterDelegate::GetVisibilityAnimationOffset(
// App list needs to know the new shelf layout in order to calculate its
// UI layout when AppListView visibility changes.
- WmShelf* shelf = WmShelf::ForWindow(WmWindow::Get(root_window));
+ WmShelf* shelf = WmShelf::ForWindow(root_window);
shelf->UpdateAutoHideState();
switch (shelf->alignment()) {

Powered by Google App Engine
This is Rietveld 408576698