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

Unified Diff: webkit/plugins/npapi/webplugin_delegate_impl_mac.mm

Issue 7144007: Improve and unify Mac OS X run-time version checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/npapi/webplugin_delegate_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
===================================================================
--- webkit/plugins/npapi/webplugin_delegate_impl_mac.mm (revision 88826)
+++ webkit/plugins/npapi/webplugin_delegate_impl_mac.mm (working copy)
@@ -12,12 +12,12 @@
#include <set>
#include "base/file_util.h"
+#include "base/mac/mac_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/metrics/stats_counters.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
-#include "base/sys_info.h"
#include "base/sys_string_conversions.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "webkit/glue/webkit_glue.h"
@@ -1007,8 +1007,9 @@
}
void WebPluginDelegateImpl::StartIme() {
+ // Currently the plugin IME implementation only works on 10.6.
if (instance()->event_model() != NPEventModelCocoa ||
- !IsImeSupported()) {
+ base::mac::IsOSLeopardOrEarlier()) {
return;
}
if (ime_enabled_)
@@ -1017,19 +1018,6 @@
plugin_->StartIme();
}
-bool WebPluginDelegateImpl::IsImeSupported() {
- // Currently the plugin IME implementation only works on 10.6.
- static BOOL sImeSupported = NO;
- static BOOL sHaveCheckedSupport = NO;
- if (!sHaveCheckedSupport) {
- int32 major, minor, bugfix;
- base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
- sImeSupported = major > 10 || (major == 10 && minor > 5);
- sHaveCheckedSupport = YES;
- }
- return sImeSupported;
-}
-
#pragma mark -
#pragma mark Core Animation Support
« no previous file with comments | « webkit/plugins/npapi/webplugin_delegate_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698