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

Side by Side Diff: chrome/browser/dom_ui/options/advanced_options_utils_mac.mm

Issue 3828009: Move scoped_nsdisable_screen_update from base to app/mac... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "chrome/browser/dom_ui/options/advanced_options_utils.h" 7 #include "chrome/browser/dom_ui/options/advanced_options_utils.h"
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/scoped_aedesc.h" 10 #include "base/mac/scoped_aedesc.h"
11 11
12 void AdvancedOptionsUtilities::ShowNetworkProxySettings( 12 void AdvancedOptionsUtilities::ShowNetworkProxySettings(
13 TabContents* tab_contents) { 13 TabContents* tab_contents) {
14 NSArray* itemsToOpen = [NSArray arrayWithObject:[NSURL fileURLWithPath: 14 NSArray* itemsToOpen = [NSArray arrayWithObject:[NSURL fileURLWithPath:
15 @"/System/Library/PreferencePanes/Network.prefPane"]]; 15 @"/System/Library/PreferencePanes/Network.prefPane"]];
16 16
17 const char* proxyPrefCommand = "Proxies"; 17 const char* proxyPrefCommand = "Proxies";
18 scoped_aedesc<> openParams; 18 base::mac::ScopedAEDesc<> openParams;
19 OSStatus status = AECreateDesc('ptru', 19 OSStatus status = AECreateDesc('ptru',
20 proxyPrefCommand, 20 proxyPrefCommand,
21 strlen(proxyPrefCommand), 21 strlen(proxyPrefCommand),
22 openParams.OutPointer()); 22 openParams.OutPointer());
23 LOG_IF(ERROR, status != noErr) << "Failed to create open params: " << status; 23 LOG_IF(ERROR, status != noErr) << "Failed to create open params: " << status;
24 24
25 LSLaunchURLSpec launchSpec = { 0 }; 25 LSLaunchURLSpec launchSpec = { 0 };
26 launchSpec.itemURLs = (CFArrayRef)itemsToOpen; 26 launchSpec.itemURLs = (CFArrayRef)itemsToOpen;
27 launchSpec.passThruParams = openParams; 27 launchSpec.passThruParams = openParams;
28 launchSpec.launchFlags = kLSLaunchAsync | kLSLaunchDontAddToRecents; 28 launchSpec.launchFlags = kLSLaunchAsync | kLSLaunchDontAddToRecents;
29 LSOpenFromURLSpec(&launchSpec, NULL); 29 LSOpenFromURLSpec(&launchSpec, NULL);
30 } 30 }
31 31
32 void AdvancedOptionsUtilities::ShowManageSSLCertificates( 32 void AdvancedOptionsUtilities::ShowManageSSLCertificates(
33 TabContents* tab_contents) { 33 TabContents* tab_contents) {
34 NSString* const kKeychainBundleId = @"com.apple.keychainaccess"; 34 NSString* const kKeychainBundleId = @"com.apple.keychainaccess";
35 [[NSWorkspace sharedWorkspace] 35 [[NSWorkspace sharedWorkspace]
36 launchAppWithBundleIdentifier:kKeychainBundleId 36 launchAppWithBundleIdentifier:kKeychainBundleId
37 options:0L 37 options:0L
38 additionalEventParamDescriptor:nil 38 additionalEventParamDescriptor:nil
39 launchIdentifier:nil]; 39 launchIdentifier:nil];
40 } 40 }
41 41
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/web_drop_target_unittest.mm ('k') | chrome/browser/geolocation/wifi_data_provider_corewlan_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698