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

Side by Side Diff: chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc

Issue 1550053002: Convert Pass()→std::move() in //chrome/browser/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/app_shortcut_launcher_item_controller.h " 5 #include "chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h "
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "ash/shelf/shelf_model.h" 9 #include "ash/shelf/shelf_model.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 std::vector<content::WebContents*> content_list = GetRunningApplications(); 148 std::vector<content::WebContents*> content_list = GetRunningApplications();
149 149
150 for (size_t i = 0; i < content_list.size(); i++) { 150 for (size_t i = 0; i < content_list.size(); i++) {
151 content::WebContents* web_contents = content_list[i]; 151 content::WebContents* web_contents = content_list[i];
152 // Get the icon. 152 // Get the icon.
153 gfx::Image app_icon = launcher_controller()->GetAppListIcon(web_contents); 153 gfx::Image app_icon = launcher_controller()->GetAppListIcon(web_contents);
154 base::string16 title = launcher_controller()->GetAppListTitle(web_contents); 154 base::string16 title = launcher_controller()->GetAppListTitle(web_contents);
155 items.push_back(new ChromeLauncherAppMenuItemTab( 155 items.push_back(new ChromeLauncherAppMenuItemTab(
156 title, &app_icon, web_contents, i == 0)); 156 title, &app_icon, web_contents, i == 0));
157 } 157 }
158 return items.Pass(); 158 return items;
159 } 159 }
160 160
161 std::vector<content::WebContents*> 161 std::vector<content::WebContents*>
162 AppShortcutLauncherItemController::GetRunningApplications() { 162 AppShortcutLauncherItemController::GetRunningApplications() {
163 std::vector<content::WebContents*> items; 163 std::vector<content::WebContents*> items;
164 164
165 URLPattern refocus_pattern(URLPattern::SCHEME_ALL); 165 URLPattern refocus_pattern(URLPattern::SCHEME_ALL);
166 refocus_pattern.SetMatchAllURLs(true); 166 refocus_pattern.SetMatchAllURLs(true);
167 167
168 if (!refocus_url_.is_empty()) { 168 if (!refocus_url_.is_empty()) {
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 374
375 bool AppShortcutLauncherItemController::AllowNextLaunchAttempt() { 375 bool AppShortcutLauncherItemController::AllowNextLaunchAttempt() {
376 if (last_launch_attempt_.is_null() || 376 if (last_launch_attempt_.is_null() ||
377 last_launch_attempt_ + base::TimeDelta::FromMilliseconds( 377 last_launch_attempt_ + base::TimeDelta::FromMilliseconds(
378 kClickSuppressionInMS) < base::Time::Now()) { 378 kClickSuppressionInMS) < base::Time::Now()) {
379 last_launch_attempt_ = base::Time::Now(); 379 last_launch_attempt_ = base::Time::Now();
380 return true; 380 return true;
381 } 381 }
382 return false; 382 return false;
383 } 383 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_keyboard_ui.cc ('k') | chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698