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

Side by Side 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, 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ash/launcher/arc_app_window_launcher_item_controller .h" 5 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller .h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" 9 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
10 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" 10 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h"
(...skipping 29 matching lines...) Expand all
40 40
41 ash::ShelfMenuModel* ArcAppWindowLauncherItemController::CreateApplicationMenu( 41 ash::ShelfMenuModel* ArcAppWindowLauncherItemController::CreateApplicationMenu(
42 int event_flags) { 42 int event_flags) {
43 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags)); 43 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags));
44 } 44 }
45 45
46 ChromeLauncherAppMenuItems 46 ChromeLauncherAppMenuItems
47 ArcAppWindowLauncherItemController::GetApplicationList(int event_flags) { 47 ArcAppWindowLauncherItemController::GetApplicationList(int event_flags) {
48 ChromeLauncherAppMenuItems items = 48 ChromeLauncherAppMenuItems items =
49 AppWindowLauncherItemController::GetApplicationList(event_flags); 49 AppWindowLauncherItemController::GetApplicationList(event_flags);
50 size_t i = 0; 50 for (auto it = windows().begin(); it != windows().end(); ++it) {
51 for (auto it = windows().begin(); it != windows().end(); ++it, ++i) {
52 // TODO(khmel): resolve correct icon here. 51 // TODO(khmel): resolve correct icon here.
52 size_t i = std::distance(windows().begin(), it);
53 gfx::Image image; 53 gfx::Image image;
54 aura::Window* window = (*it)->GetNativeWindow(); 54 aura::Window* window = (*it)->GetNativeWindow();
55 items.push_back(new ChromeLauncherAppMenuItemV2App( 55 items.push_back(new ChromeLauncherAppMenuItemV2App(
56 (window ? window->title() : GetTitle()), &image, app_id(), 56 ((window && !window->title().empty()) ? window->title() : GetTitle()),
57 launcher_controller(), i, i == 0 /* has_leading_separator */)); 57 &image, app_id(), launcher_controller(), i,
58 i == 0 /* has_leading_separator */));
58 } 59 }
59 return items; 60 return items;
60 } 61 }
OLDNEW
« 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