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

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

Issue 25286002: Update OS version functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: uma Created 7 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) 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 NOTREACHED() << "Failed to load bundle"; 120 NOTREACHED() << "Failed to load bundle";
121 return false; 121 return false;
122 } 122 }
123 sandbox_tests_bundle_ = [tests_bundle retain]; 123 sandbox_tests_bundle_ = [tests_bundle retain];
124 [objc_getClass("RendererSandboxTestsRunner") setLogFunction:LogTestMessage]; 124 [objc_getClass("RendererSandboxTestsRunner") setLogFunction:LogTestMessage];
125 } 125 }
126 return true; 126 return true;
127 } 127 }
128 128
129 bool RendererMainPlatformDelegate::EnableSandbox() { 129 bool RendererMainPlatformDelegate::EnableSandbox() {
130 // http://openradar.appspot.com/radar?id=1156410 is fixed on OS X 10.9+. 130 // rdar://9251340 http://openradar.me/9251340
131 // See http://crbug.com/31225 and http://crbug.com/152566 131 // See http://crbug.com/31225 and http://crbug.com/152566
132 // To check if this is broken: 132 // To check if this is broken:
133 // 1. Enable Multi language input (simplified chinese) 133 // 1. Enable Multi language input (simplified chinese)
134 // 2. Ensure "Show/Hide Trackpad Handwriting" shortcut works. 134 // 2. Ensure "Show/Hide Trackpad Handwriting" shortcut works.
135 // (ctrl+shift+space). 135 // (ctrl+shift+space).
136 // 3. Now open a new tab in Google Chrome or start Google Chrome 136 // 3. Now open a new tab in Google Chrome or start Google Chrome
137 // 4. Try ctrl+shift+space shortcut again. Shortcut will not work, IME will 137 // 4. Try ctrl+shift+space shortcut again. Shortcut will not work, IME will
138 // either not appear or (worse) not disappear on ctrl-shift-space. 138 // either not appear or (worse) not disappear on ctrl-shift-space.
139 // (Run `ps aux | grep Chinese` (10.6/10.7) or `ps aux | grep Trackpad` 139 // (Run `ps aux | grep Chinese` (10.6/10.7) or `ps aux | grep Trackpad`
140 // and then kill that pid to make it go away.) 140 // and then kill that pid to make it go away.)
141 // 141 //
142 // Chinese Handwriting was introduced in 10.6 and is confirmed broken on 142 // Chinese Handwriting was introduced in 10.6 and is confirmed broken on
143 // 10.6, 10.7, and 10.8. It's reportedly fixed on 10.9. 143 // 10.6, 10.7, and 10.8. It's fixed on 10.9.
144 bool needs_ime_hack = !base::mac::IsOSLaterThanMountainLion_DontCallThis(); 144 bool needs_ime_hack = base::mac::IsOSMountainLionOrEarlier();
145 145
146 if (needs_ime_hack) { 146 if (needs_ime_hack) {
147 mach_error_t err = mach_override_ptr( 147 mach_error_t err = mach_override_ptr(
148 (void*)&TISCreateInputSourceList, 148 (void*)&TISCreateInputSourceList,
149 (void*)&CrTISCreateInputSourceList, 149 (void*)&CrTISCreateInputSourceList,
150 NULL); 150 NULL);
151 CHECK_EQ(err_none, err); 151 CHECK_EQ(err_none, err);
152 152
153 // Override the private CFLog function so that the console is not spammed 153 // Override the private CFLog function so that the console is not spammed
154 // by TIS failing to connect to HIServices over XPC. 154 // by TIS failing to connect to HIServices over XPC.
(...skipping 26 matching lines...) Expand all
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

Powered by Google App Engine
This is Rietveld 408576698