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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_mac.mm

Issue 3770016: Merge 62930 - Fix one-time version check for Mac plugin IME... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552/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
« no previous file with comments | « no previous file | no next file » | 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) 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 #include <QuartzCore/QuartzCore.h> 5 #include <QuartzCore/QuartzCore.h>
6 6
7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" 7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
8 8
9 #include "chrome/browser/chrome_thread.h" 9 #include "chrome/browser/chrome_thread.h"
10 #include "app/app_switches.h" 10 #include "app/app_switches.h"
(...skipping 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 if (pluginImeIdentifier_ == -1) 2511 if (pluginImeIdentifier_ == -1)
2512 return false; 2512 return false;
2513 2513
2514 // ComplexTextInputPanel only works on 10.6+. 2514 // ComplexTextInputPanel only works on 10.6+.
2515 static BOOL sImeSupported = NO; 2515 static BOOL sImeSupported = NO;
2516 static BOOL sHaveCheckedSupport = NO; 2516 static BOOL sHaveCheckedSupport = NO;
2517 if (!sHaveCheckedSupport) { 2517 if (!sHaveCheckedSupport) {
2518 int32 major, minor, bugfix; 2518 int32 major, minor, bugfix;
2519 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix); 2519 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
2520 sImeSupported = major > 10 || (major == 10 && minor > 5); 2520 sImeSupported = major > 10 || (major == 10 && minor > 5);
2521 sHaveCheckedSupport = YES;
2521 } 2522 }
2522 if (!sImeSupported) 2523 if (!sImeSupported)
2523 return false; 2524 return false;
2524 2525
2525 ComplexTextInputPanel* inputPanel = 2526 ComplexTextInputPanel* inputPanel =
2526 [ComplexTextInputPanel sharedComplexTextInputPanel]; 2527 [ComplexTextInputPanel sharedComplexTextInputPanel];
2527 NSString* composited_string = nil; 2528 NSString* composited_string = nil;
2528 BOOL handled = [inputPanel interpretKeyEvent:event 2529 BOOL handled = [inputPanel interpretKeyEvent:event
2529 string:&composited_string]; 2530 string:&composited_string];
2530 if (composited_string) { 2531 if (composited_string) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
2586 if (!string) return NO; 2587 if (!string) return NO;
2587 2588
2588 // If the user is currently using an IME, confirm the IME input, 2589 // If the user is currently using an IME, confirm the IME input,
2589 // and then insert the text from the service, the same as TextEdit and Safari. 2590 // and then insert the text from the service, the same as TextEdit and Safari.
2590 [self confirmComposition]; 2591 [self confirmComposition];
2591 [self insertText:string]; 2592 [self insertText:string];
2592 return YES; 2593 return YES;
2593 } 2594 }
2594 2595
2595 @end 2596 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698