Chromium Code Reviews| 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) { |
|
James Cook
2016/08/17 21:41:33
Dumb question: windows() always has an even number
yoshiki
2016/08/23 08:23:56
The second incremented variable is not "it" but "i
oshima
2016/08/23 19:03:08
FYI: you can get the index by "itr - windows().beg
|
| // 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(), |
|
Mr4D (OOO till 08-26)
2016/08/11 18:46:57
Would it make sense to use GetTitle() if the windo
yoshiki
2016/08/11 19:41:57
Yes. I think showing empty title is weird and shou
oshima
2016/08/16 17:57:18
Did you implement this?
|
| + launcher_controller(), i, i == 0 /* has_leading_separator */)); |
| } |
| return items; |
| } |