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

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: Adressed nits (and a broken unit test and a git hiccup) 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 if (is_installing) { 208 if (is_installing) {
209 SetTitle(extension_name_); 209 SetTitle(extension_name_);
210 UpdateIcon(); 210 UpdateIcon();
211 return; 211 return;
212 } 212 }
213 SetAppId(extension->id());
benwells 2013/05/02 06:40:05 You should call SetAppId(extension_id) before the
Mr4D (OOO till 08-26) 2013/05/03 00:23:17 Done.
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 {
218 return GetExtensionSorting(profile_)->GetPageOrdinal(extension_id_); 219 return GetExtensionSorting(profile_)->GetPageOrdinal(extension_id_);
219 } 220 }
220 221
221 syncer::StringOrdinal ExtensionAppItem::GetAppLaunchOrdinal() const { 222 syncer::StringOrdinal ExtensionAppItem::GetAppLaunchOrdinal() const {
222 return GetExtensionSorting(profile_)->GetAppLaunchOrdinal(extension_id_); 223 return GetExtensionSorting(profile_)->GetAppLaunchOrdinal(extension_id_);
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698