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

Side by Side Diff: content/renderer/renderer_main_platform_delegate_mac.mm

Issue 16917011: mac: Replace base::mac::ScopedCFTypeRef with base::ScopedCFTypeRef. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with fixed off-by-1 in git-clang-format Created 7 years, 6 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
« no previous file with comments | « content/renderer/pepper/pepper_truetype_font_mac.mm ('k') | crypto/apple_keychain_ios.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/renderer/renderer_main_platform_delegate.h" 5 #include "content/renderer/renderer_main_platform_delegate.h"
6 6
7 #include <Carbon/Carbon.h> 7 #include <Carbon/Carbon.h>
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <objc/runtime.h> 9 #include <objc/runtime.h>
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 CHECK_EQ(err_none, err); 156 CHECK_EQ(err_none, err);
157 } 157 }
158 158
159 // Enable the sandbox. 159 // Enable the sandbox.
160 bool sandbox_initialized = InitializeSandbox(); 160 bool sandbox_initialized = InitializeSandbox();
161 161
162 if (needs_ime_hack) { 162 if (needs_ime_hack) {
163 // After the sandbox is initialized, call into TIS. Doing this before 163 // After the sandbox is initialized, call into TIS. Doing this before
164 // the sandbox is in place will open up renderer access to the 164 // the sandbox is in place will open up renderer access to the
165 // pasteboard and an XPC connection to "com.apple.hiservices-xpcservice". 165 // pasteboard and an XPC connection to "com.apple.hiservices-xpcservice".
166 base::mac::ScopedCFTypeRef<TISInputSourceRef> layout_source( 166 base::ScopedCFTypeRef<TISInputSourceRef> layout_source(
167 TISCopyCurrentKeyboardLayoutInputSource()); 167 TISCopyCurrentKeyboardLayoutInputSource());
168 base::mac::ScopedCFTypeRef<TISInputSourceRef> input_source( 168 base::ScopedCFTypeRef<TISInputSourceRef> input_source(
169 TISCopyCurrentKeyboardInputSource()); 169 TISCopyCurrentKeyboardInputSource());
170 170
171 CFTypeRef source_list[] = { layout_source.get(), input_source.get() }; 171 CFTypeRef source_list[] = { layout_source.get(), input_source.get() };
172 g_text_input_services_source_list_ = CFArrayCreate(kCFAllocatorDefault, 172 g_text_input_services_source_list_ = CFArrayCreate(kCFAllocatorDefault,
173 source_list, arraysize(source_list), &kCFTypeArrayCallBacks); 173 source_list, arraysize(source_list), &kCFTypeArrayCallBacks);
174 } 174 }
175 175
176 return sandbox_initialized; 176 return sandbox_initialized;
177 } 177 }
178 178
179 void RendererMainPlatformDelegate::RunSandboxTests(bool no_sandbox) { 179 void RendererMainPlatformDelegate::RunSandboxTests(bool no_sandbox) {
180 Class tests_runner = objc_getClass("RendererSandboxTestsRunner"); 180 Class tests_runner = objc_getClass("RendererSandboxTestsRunner");
181 if (tests_runner) { 181 if (tests_runner) {
182 if (![tests_runner runTests]) 182 if (![tests_runner runTests])
183 LOG(ERROR) << "Running renderer with failing sandbox tests!"; 183 LOG(ERROR) << "Running renderer with failing sandbox tests!";
184 [sandbox_tests_bundle_ unload]; 184 [sandbox_tests_bundle_ unload];
185 [sandbox_tests_bundle_ release]; 185 [sandbox_tests_bundle_ release];
186 sandbox_tests_bundle_ = nil; 186 sandbox_tests_bundle_ = nil;
187 } 187 }
188 } 188 }
189 189
190 } // namespace content 190 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_truetype_font_mac.mm ('k') | crypto/apple_keychain_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698