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

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

Issue 14533006: Drag and drop between app list and launcher - First patch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 7 years, 7 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 "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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 } 202 }
203 203
204 bool ExtensionAppItem::HasOverlay() const { 204 bool ExtensionAppItem::HasOverlay() const {
205 return !is_platform_app_ && extension_id_ != extension_misc::kChromeAppId; 205 return !is_platform_app_ && extension_id_ != extension_misc::kChromeAppId;
206 } 206 }
207 207
208 void ExtensionAppItem::Reload() { 208 void ExtensionAppItem::Reload() {
209 const Extension* extension = GetExtension(); 209 const Extension* extension = GetExtension();
210 bool is_installing = !extension; 210 bool is_installing = !extension;
211 SetIsInstalling(is_installing); 211 SetIsInstalling(is_installing);
212 set_app_id(extension_id_);
212 if (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 {
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 context_menu_model_->AddItemWithStringId(DETAILS, 585 context_menu_model_->AddItemWithStringId(DETAILS,
585 IDS_NEW_TAB_APP_DETAILS); 586 IDS_NEW_TAB_APP_DETAILS);
586 context_menu_model_->AddItemWithStringId(UNINSTALL, 587 context_menu_model_->AddItemWithStringId(UNINSTALL,
587 is_platform_app_ ? 588 is_platform_app_ ?
588 IDS_APP_LIST_UNINSTALL_ITEM : 589 IDS_APP_LIST_UNINSTALL_ITEM :
589 IDS_EXTENSIONS_UNINSTALL); 590 IDS_EXTENSIONS_UNINSTALL);
590 } 591 }
591 592
592 return context_menu_model_.get(); 593 return context_menu_model_.get();
593 } 594 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698