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

Side by Side Diff: chrome/browser/ui/app_list/extension_app_item.cc

Issue 12208040: [win] Add a progress bar in the app launcher for app installs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux compile Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/app_list/extension_app_item.h" 5 #include "chrome/browser/ui/app_list/extension_app_item.h"
6 6
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/extensions/context_menu_matcher.h" 8 #include "chrome/browser/extensions/context_menu_matcher.h"
9 #include "chrome/browser/extensions/extension_prefs.h" 9 #include "chrome/browser/extensions/extension_prefs.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 #if defined(OS_CHROMEOS) 201 #if defined(OS_CHROMEOS)
202 return false; 202 return false;
203 #else 203 #else
204 const Extension* extension = GetExtension(); 204 const Extension* extension = GetExtension();
205 return extension && !extension->is_platform_app(); 205 return extension && !extension->is_platform_app();
206 #endif 206 #endif
207 } 207 }
208 208
209 void ExtensionAppItem::Reload() { 209 void ExtensionAppItem::Reload() {
210 const Extension* extension = GetExtension(); 210 const Extension* extension = GetExtension();
211 // If the extension isn't there, show the 'extension is installing' UI. 211 bool is_installing = !extension;
212 if (!extension) { 212 SetIsInstalling(is_installing);
213 if (is_installing) {
213 SetTitle(extension_name_); 214 SetTitle(extension_name_);
214 UpdateIcon(); 215 UpdateIcon();
215 return; 216 return;
216 } 217 }
217 SetTitle(extension->name()); 218 SetTitle(extension->name());
218 LoadImage(extension); 219 LoadImage(extension);
219 } 220 }
220 221
221 syncer::StringOrdinal ExtensionAppItem::GetPageOrdinal() const { 222 syncer::StringOrdinal ExtensionAppItem::GetPageOrdinal() const {
222 return GetExtensionSorting(profile_)->GetPageOrdinal(extension_id_); 223 return GetExtensionSorting(profile_)->GetPageOrdinal(extension_id_);
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 } 587 }
587 588
588 context_menu_model_->AddItemWithStringId(UNINSTALL, 589 context_menu_model_->AddItemWithStringId(UNINSTALL,
589 extension->is_platform_app() ? 590 extension->is_platform_app() ?
590 IDS_APP_LIST_UNINSTALL_ITEM : 591 IDS_APP_LIST_UNINSTALL_ITEM :
591 IDS_EXTENSIONS_UNINSTALL); 592 IDS_EXTENSIONS_UNINSTALL);
592 } 593 }
593 594
594 return context_menu_model_.get(); 595 return context_menu_model_.get();
595 } 596 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/apps_model_builder.cc ('k') | chrome/browser/ui/ash/app_list/app_list_controller_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698