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

Unified Diff: chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc

Issue 2269003002: Show the app title when the window title is empty for ARC apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc
index 7524f30c2d34bf140b4ea7a8c5599d8338cf2e98..e74ed8855e6890b282c0131e7ecdf814d37f0f69 100644
--- a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc
@@ -47,14 +47,15 @@ ChromeLauncherAppMenuItems
ArcAppWindowLauncherItemController::GetApplicationList(int event_flags) {
ChromeLauncherAppMenuItems items =
AppWindowLauncherItemController::GetApplicationList(event_flags);
- size_t i = 0;
- for (auto it = windows().begin(); it != windows().end(); ++it, ++i) {
+ for (auto it = windows().begin(); it != windows().end(); ++it) {
// TODO(khmel): resolve correct icon here.
+ size_t i = std::distance(windows().begin(), it);
gfx::Image image;
aura::Window* window = (*it)->GetNativeWindow();
items.push_back(new ChromeLauncherAppMenuItemV2App(
- (window ? window->title() : GetTitle()), &image, app_id(),
- launcher_controller(), i, i == 0 /* has_leading_separator */));
+ ((window && !window->title().empty()) ? window->title() : GetTitle()),
+ &image, app_id(), launcher_controller(), i,
+ i == 0 /* has_leading_separator */));
}
return items;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698