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

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

Issue 2243573002: ARC: Show window title in launcher menu instead of app title (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 | « chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc ('k') | 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 fc3efbea758da1ee8e168080afdd145102d3dfc4..7524f30c2d34bf140b4ea7a8c5599d8338cf2e98 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
@@ -11,6 +11,8 @@
#include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h"
+#include "ui/aura/window.h"
+#include "ui/base/base_window.h"
ArcAppWindowLauncherItemController::ArcAppWindowLauncherItemController(
const std::string& arc_app_id,
@@ -45,12 +47,14 @@ ChromeLauncherAppMenuItems
ArcAppWindowLauncherItemController::GetApplicationList(int event_flags) {
ChromeLauncherAppMenuItems items =
AppWindowLauncherItemController::GetApplicationList(event_flags);
- for (size_t i = 0; i < windows().size(); ++i) {
+ size_t i = 0;
+ for (auto it = windows().begin(); it != windows().end(); ++it, ++i) {
// TODO(khmel): resolve correct icon here.
gfx::Image image;
+ aura::Window* window = (*it)->GetNativeWindow();
items.push_back(new ChromeLauncherAppMenuItemV2App(
- GetTitle(), &image, app_id(), launcher_controller(), i,
- i == 0 /* has_leading_separator */));
+ (window ? window->title() : GetTitle()), &image, app_id(),
+ launcher_controller(), i, i == 0 /* has_leading_separator */));
}
return items;
}
« no previous file with comments | « chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698