Index: chrome/browser/ui/views/app_list/win/app_list_service_win.cc |
diff --git a/chrome/browser/ui/views/app_list/win/app_list_service_win.cc b/chrome/browser/ui/views/app_list/win/app_list_service_win.cc |
index b213b93be0f63eb291e5478b678da1c237e00569..dc0faee3ef12a17063c1d621838d7a9976d8cb15 100644 |
--- a/chrome/browser/ui/views/app_list/win/app_list_service_win.cc |
+++ b/chrome/browser/ui/views/app_list/win/app_list_service_win.cc |
@@ -276,7 +276,9 @@ void AppListServiceWin::OnLoadProfileForWarmup(Profile* initial_profile) { |
} |
void AppListServiceWin::SetAppListNextPaintCallback(void (*callback)()) { |
- app_list::AppListView::SetNextPaintCallback(callback); |
+ // This should only be called during startup. |
+ DCHECK(!shower().app_list()); |
+ next_paint_callback_ = base::Bind(callback); |
} |
void AppListServiceWin::HandleFirstRun() { |
@@ -364,6 +366,10 @@ void AppListServiceWin::OnViewBeingDestroyed() { |
} |
void AppListServiceWin::OnViewCreated() { |
+ if (!next_paint_callback_.is_null()) { |
+ shower().app_list()->SetNextPaintCallback(next_paint_callback_); |
+ next_paint_callback_.Reset(); |
+ } |
SetWindowAttributes(shower().app_list()->GetHWND()); |
activation_tracker_.reset(new ActivationTrackerWin(this)); |
} |