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

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

Issue 23709003: Display an app's short name in the app launcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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
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/browser/extensions/extension_prefs.h" 8 #include "chrome/browser/extensions/extension_prefs.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_sorting.h" 10 #include "chrome/browser/extensions/extension_sorting.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 return !is_platform_app_ && extension_id_ != extension_misc::kChromeAppId; 95 return !is_platform_app_ && extension_id_ != extension_misc::kChromeAppId;
96 #endif 96 #endif
97 } 97 }
98 98
99 void ExtensionAppItem::Reload() { 99 void ExtensionAppItem::Reload() {
100 const Extension* extension = GetExtension(); 100 const Extension* extension = GetExtension();
101 bool is_installing = !extension; 101 bool is_installing = !extension;
102 SetIsInstalling(is_installing); 102 SetIsInstalling(is_installing);
103 set_app_id(extension_id_); 103 set_app_id(extension_id_);
104 if (is_installing) { 104 if (is_installing) {
105 SetTitle(extension_name_); 105 SetTitle(extension_name_);
benwells 2013/08/29 09:14:15 This will be the full name. Are you planning on fi
tmdiep 2013/08/30 02:48:13 Does this need to be handled? I see that when the
106 SetFullName(extension_name_);
106 UpdateIcon(); 107 UpdateIcon();
107 return; 108 return;
108 } 109 }
109 SetTitle(extension->name()); 110 SetTitle(extension->short_name());
111 SetFullName(extension->name());
110 LoadImage(extension); 112 LoadImage(extension);
111 } 113 }
112 114
113 syncer::StringOrdinal ExtensionAppItem::GetPageOrdinal() const { 115 syncer::StringOrdinal ExtensionAppItem::GetPageOrdinal() const {
114 return GetExtensionSorting(profile_)->GetPageOrdinal(extension_id_); 116 return GetExtensionSorting(profile_)->GetPageOrdinal(extension_id_);
115 } 117 }
116 118
117 syncer::StringOrdinal ExtensionAppItem::GetAppLaunchOrdinal() const { 119 syncer::StringOrdinal ExtensionAppItem::GetAppLaunchOrdinal() const {
118 return GetExtensionSorting(profile_)->GetAppLaunchOrdinal(extension_id_); 120 return GetExtensionSorting(profile_)->GetAppLaunchOrdinal(extension_id_);
119 } 121 }
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 context_menu_.reset(new app_list::AppContextMenu( 269 context_menu_.reset(new app_list::AppContextMenu(
268 this, profile_, extension_id_, controller_, is_platform_app_)); 270 this, profile_, extension_id_, controller_, is_platform_app_));
269 } 271 }
270 272
271 return context_menu_->GetMenuModel(); 273 return context_menu_->GetMenuModel();
272 } 274 }
273 275
274 void ExtensionAppItem::ExecuteLaunchCommand(int event_flags) { 276 void ExtensionAppItem::ExecuteLaunchCommand(int event_flags) {
275 Launch(event_flags); 277 Launch(event_flags);
276 } 278 }
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/app_list_item_model.h » ('j') | ui/app_list/test/app_list_test_model.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698