Index: chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc |
diff --git a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc |
index f978a25602c47db1663f931ca11220a9ab1f3344..29b7dacf39ac836cc2dbf2ab79ea59860368cf8b 100644 |
--- a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc |
+++ b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc |
@@ -7,6 +7,7 @@ |
#include <stddef.h> |
#include "ash/wm/window_util.h" |
+#include "base/strings/utf_string_conversions.h" |
#include "chrome/browser/chromeos/arc/arc_support_host.h" |
#include "chrome/browser/extensions/launch_util.h" |
#include "chrome/browser/ui/app_list/arc/arc_app_utils.h" |
@@ -66,10 +67,12 @@ bool CanBrowserBeUsedForDirectActivation(Browser* browser, |
AppShortcutLauncherItemController* AppShortcutLauncherItemController::Create( |
const std::string& app_id, |
const std::string& launch_id, |
+ const std::string& title, |
ChromeLauncherController* controller) { |
if (app_id == ArcSupportHost::kHostAppId || app_id == arc::kPlayStoreAppId) |
return new ArcPlaystoreShortcutLauncherItemController(controller); |
- return new AppShortcutLauncherItemController(app_id, launch_id, controller); |
+ return new AppShortcutLauncherItemController(app_id, launch_id, title, |
+ controller); |
} |
// Item controller for an app shortcut. Shortcuts track app and launcher ids, |
@@ -78,8 +81,13 @@ AppShortcutLauncherItemController* AppShortcutLauncherItemController::Create( |
AppShortcutLauncherItemController::AppShortcutLauncherItemController( |
const std::string& app_id, |
const std::string& launch_id, |
+ const std::string& title, |
ChromeLauncherController* controller) |
- : LauncherItemController(TYPE_SHORTCUT, app_id, launch_id, controller), |
+ : LauncherItemController(TYPE_SHORTCUT, |
+ app_id, |
+ launch_id, |
+ title, |
+ controller), |
chrome_launcher_controller_(controller) { |
// To detect V1 applications we use their domain and match them against the |
// used URL. This will also work with applications like Google Drive. |
@@ -211,8 +219,11 @@ AppShortcutLauncherItemController::ItemSelected(const ui::Event& event) { |
} |
base::string16 AppShortcutLauncherItemController::GetTitle() { |
- return LauncherControllerHelper::GetAppTitle(launcher_controller()->profile(), |
- app_id()); |
+ if (!title().empty()) |
+ return base::UTF8ToUTF16(title()); |
+ else |
+ return LauncherControllerHelper::GetAppTitle( |
+ launcher_controller()->profile(), app_id()); |
} |
ash::ShelfMenuModel* AppShortcutLauncherItemController::CreateApplicationMenu( |