Chromium Code Reviews| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 198 } | 198 } |
| 199 | 199 |
| 200 bool ExtensionAppItem::HasOverlay() const { | 200 bool ExtensionAppItem::HasOverlay() const { |
| 201 return !is_platform_app_ && extension_id_ != extension_misc::kChromeAppId; | 201 return !is_platform_app_ && extension_id_ != extension_misc::kChromeAppId; |
| 202 } | 202 } |
| 203 | 203 |
| 204 void ExtensionAppItem::Reload() { | 204 void ExtensionAppItem::Reload() { |
| 205 const Extension* extension = GetExtension(); | 205 const Extension* extension = GetExtension(); |
| 206 bool is_installing = !extension; | 206 bool is_installing = !extension; |
| 207 SetIsInstalling(is_installing); | 207 SetIsInstalling(is_installing); |
| 208 set_app_id(extension->id()); | |
|
koz (OOO until 15th September)
2013/05/03 01:19:51
This should be set_app_id(extension_id_) as extens
Mr4D (OOO till 08-26)
2013/05/07 04:31:01
Done.
| |
| 208 if (is_installing) { | 209 if (is_installing) { |
| 209 SetTitle(extension_name_); | 210 SetTitle(extension_name_); |
| 210 UpdateIcon(); | 211 UpdateIcon(); |
| 211 return; | 212 return; |
| 212 } | 213 } |
| 213 SetTitle(extension->name()); | 214 SetTitle(extension->name()); |
| 214 LoadImage(extension); | 215 LoadImage(extension); |
| 215 } | 216 } |
| 216 | 217 |
| 217 syncer::StringOrdinal ExtensionAppItem::GetPageOrdinal() const { | 218 syncer::StringOrdinal ExtensionAppItem::GetPageOrdinal() const { |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 576 context_menu_model_->AddItemWithStringId(DETAILS, | 577 context_menu_model_->AddItemWithStringId(DETAILS, |
| 577 IDS_NEW_TAB_APP_DETAILS); | 578 IDS_NEW_TAB_APP_DETAILS); |
| 578 context_menu_model_->AddItemWithStringId(UNINSTALL, | 579 context_menu_model_->AddItemWithStringId(UNINSTALL, |
| 579 is_platform_app_ ? | 580 is_platform_app_ ? |
| 580 IDS_APP_LIST_UNINSTALL_ITEM : | 581 IDS_APP_LIST_UNINSTALL_ITEM : |
| 581 IDS_EXTENSIONS_UNINSTALL); | 582 IDS_EXTENSIONS_UNINSTALL); |
| 582 } | 583 } |
| 583 | 584 |
| 584 return context_menu_model_.get(); | 585 return context_menu_model_.get(); |
| 585 } | 586 } |
| OLD | NEW |