| OLD | NEW |
| 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 "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
| 9 #include "chrome/browser/extensions/context_menu_matcher.h" | 9 #include "chrome/browser/extensions/context_menu_matcher.h" |
| 10 #include "chrome/browser/extensions/extension_prefs.h" | 10 #include "chrome/browser/extensions/extension_prefs.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 | 217 |
| 218 void ExtensionAppItem::Reload() { | 218 void ExtensionAppItem::Reload() { |
| 219 const Extension* extension = GetExtension(); | 219 const Extension* extension = GetExtension(); |
| 220 bool is_installing = !extension; | 220 bool is_installing = !extension; |
| 221 SetIsInstalling(is_installing); | 221 SetIsInstalling(is_installing); |
| 222 if (is_installing) { | 222 if (is_installing) { |
| 223 SetTitle(extension_name_); | 223 SetTitle(extension_name_); |
| 224 UpdateIcon(); | 224 UpdateIcon(); |
| 225 return; | 225 return; |
| 226 } | 226 } |
| 227 SetAppId(extension->id()); |
| 227 SetTitle(extension->name()); | 228 SetTitle(extension->name()); |
| 228 LoadImage(extension); | 229 LoadImage(extension); |
| 229 } | 230 } |
| 230 | 231 |
| 231 syncer::StringOrdinal ExtensionAppItem::GetPageOrdinal() const { | 232 syncer::StringOrdinal ExtensionAppItem::GetPageOrdinal() const { |
| 232 return GetExtensionSorting(profile_)->GetPageOrdinal(extension_id_); | 233 return GetExtensionSorting(profile_)->GetPageOrdinal(extension_id_); |
| 233 } | 234 } |
| 234 | 235 |
| 235 syncer::StringOrdinal ExtensionAppItem::GetAppLaunchOrdinal() const { | 236 syncer::StringOrdinal ExtensionAppItem::GetAppLaunchOrdinal() const { |
| 236 return GetExtensionSorting(profile_)->GetAppLaunchOrdinal(extension_id_); | 237 return GetExtensionSorting(profile_)->GetAppLaunchOrdinal(extension_id_); |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 context_menu_model_->AddItemWithStringId(DETAILS, | 607 context_menu_model_->AddItemWithStringId(DETAILS, |
| 607 IDS_NEW_TAB_APP_DETAILS); | 608 IDS_NEW_TAB_APP_DETAILS); |
| 608 context_menu_model_->AddItemWithStringId(UNINSTALL, | 609 context_menu_model_->AddItemWithStringId(UNINSTALL, |
| 609 is_platform_app_ ? | 610 is_platform_app_ ? |
| 610 IDS_APP_LIST_UNINSTALL_ITEM : | 611 IDS_APP_LIST_UNINSTALL_ITEM : |
| 611 IDS_EXTENSIONS_UNINSTALL); | 612 IDS_EXTENSIONS_UNINSTALL); |
| 612 } | 613 } |
| 613 | 614 |
| 614 return context_menu_model_.get(); | 615 return context_menu_model_.get(); |
| 615 } | 616 } |
| OLD | NEW |