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

Side by Side Diff: chrome/browser/ui/app_list/app_list_service_mac.mm

Issue 1579863003: Convert Pass()→std::move() for Mac build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #import "chrome/browser/ui/app_list/app_list_service_mac.h" 5 #import "chrome/browser/ui/app_list/app_list_service_mac.h"
6 6
7 #include <ApplicationServices/ApplicationServices.h> 7 #include <ApplicationServices/ApplicationServices.h>
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
11 #include <utility>
12
11 #include "base/bind.h" 13 #include "base/bind.h"
12 #include "base/command_line.h" 14 #include "base/command_line.h"
13 #include "base/files/file_util.h" 15 #include "base/files/file_util.h"
14 #include "base/lazy_instance.h" 16 #include "base/lazy_instance.h"
15 #include "base/memory/singleton.h" 17 #include "base/memory/singleton.h"
16 #include "base/message_loop/message_loop.h" 18 #include "base/message_loop/message_loop.h"
17 #include "base/prefs/pref_service.h" 19 #include "base/prefs/pref_service.h"
18 #import "chrome/browser/app_controller_mac.h" 20 #import "chrome/browser/app_controller_mac.h"
19 #include "chrome/browser/browser_process.h" 21 #include "chrome/browser/browser_process.h"
20 #include "chrome/browser/extensions/extension_service.h" 22 #include "chrome/browser/extensions/extension_service.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 int installed_version = 146 int installed_version =
145 local_state->GetInteger(prefs::kAppLauncherShortcutVersion); 147 local_state->GetInteger(prefs::kAppLauncherShortcutVersion);
146 148
147 // If this is a first-time install, add a dock icon. Otherwise just update 149 // If this is a first-time install, add a dock icon. Otherwise just update
148 // the target, and wait for OSX to refresh its icon caches. This might not 150 // the target, and wait for OSX to refresh its icon caches. This might not
149 // occur until a reboot, but OSX does not offer a nicer way. Deleting cache 151 // occur until a reboot, but OSX does not offer a nicer way. Deleting cache
150 // files on disk and killing processes can easily result in icon corruption. 152 // files on disk and killing processes can easily result in icon corruption.
151 if (installed_version == 0) 153 if (installed_version == 0)
152 shortcut_locations.in_quick_launch_bar = true; 154 shortcut_locations.in_quick_launch_bar = true;
153 155
154 web_app::CreateNonAppShortcut(shortcut_locations, shortcut_info.Pass()); 156 web_app::CreateNonAppShortcut(shortcut_locations, std::move(shortcut_info));
155 157
156 local_state->SetInteger(prefs::kAppLauncherShortcutVersion, 158 local_state->SetInteger(prefs::kAppLauncherShortcutVersion,
157 kShortcutVersion); 159 kShortcutVersion);
158 } 160 }
159 161
160 NSRunningApplication* ActiveApplicationNotChrome() { 162 NSRunningApplication* ActiveApplicationNotChrome() {
161 NSArray* applications = [[NSWorkspace sharedWorkspace] runningApplications]; 163 NSArray* applications = [[NSWorkspace sharedWorkspace] runningApplications];
162 for (NSRunningApplication* application in applications) { 164 for (NSRunningApplication* application in applications) {
163 if (![application isActive]) 165 if (![application isActive])
164 continue; 166 continue;
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 581
580 - (void)animationDidEnd:(NSAnimation*)animation { 582 - (void)animationDidEnd:(NSAnimation*)animation {
581 content::BrowserThread::PostTask( 583 content::BrowserThread::PostTask(
582 content::BrowserThread::UI, 584 content::BrowserThread::UI,
583 FROM_HERE, 585 FROM_HERE,
584 base::Bind(&AppListServiceMac::WindowAnimationDidEnd, 586 base::Bind(&AppListServiceMac::WindowAnimationDidEnd,
585 base::Unretained(GetActiveInstance()))); 587 base::Unretained(GetActiveInstance())));
586 } 588 }
587 589
588 @end 590 @end
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.cc ('k') | chrome/browser/ui/cocoa/accelerators_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698