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

Unified Diff: ash/wm/app_list_controller.cc

Issue 11418312: app_list: Improve initial icon loading. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, stop timer when showing widget because no pending icon loads Created 8 years 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/wm/app_list_controller.h ('k') | ui/app_list/app_list_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/app_list_controller.cc
diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc
index bf02979ceaa0d541392fcbd2347378f48ca2418f..012a7c51daaa0cb6f593505dba70119c89fbda28 100644
--- a/ash/wm/app_list_controller.cc
+++ b/ash/wm/app_list_controller.cc
@@ -145,22 +145,17 @@ aura::Window* AppListController::GetWindow() {
void AppListController::SetView(app_list::AppListView* view) {
DCHECK(view_ == NULL);
+ DCHECK(is_visible_);
- if (is_visible_) {
- view_ = view;
- views::Widget* widget = view_->GetWidget();
- widget->AddObserver(this);
- Shell::GetInstance()->AddPreTargetHandler(this);
- Launcher::ForWindow(GetWindow())->AddIconObserver(this);
- widget->GetNativeView()->GetRootWindow()->AddRootWindowObserver(this);
- aura::client::GetFocusClient(widget->GetNativeView())->AddObserver(this);
- widget->SetOpacity(0);
- ScheduleAnimation();
+ view_ = view;
+ views::Widget* widget = view_->GetWidget();
+ widget->AddObserver(this);
+ Shell::GetInstance()->AddPreTargetHandler(this);
+ Launcher::ForWindow(GetWindow())->AddIconObserver(this);
+ widget->GetNativeView()->GetRootWindow()->AddRootWindowObserver(this);
+ aura::client::GetFocusClient(widget->GetNativeView())->AddObserver(this);
- view_->GetWidget()->Show();
- } else {
- view->GetWidget()->Close();
- }
+ view_->ShowWhenReady();
}
void AppListController::ResetView() {
« no previous file with comments | « ash/wm/app_list_controller.h ('k') | ui/app_list/app_list_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698