| OLD | NEW |
| 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 "base/mac/mac_util.h" | 5 #include "base/mac/mac_util.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 #import <IOKit/IOKitLib.h> | 8 #import <IOKit/IOKitLib.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 #include <sys/utsname.h> | 10 #include <sys/utsname.h> |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 StringPiece(begin + number_loc, begin + comma_loc), &major_tmp) || | 689 StringPiece(begin + number_loc, begin + comma_loc), &major_tmp) || |
| 690 !StringToInt( | 690 !StringToInt( |
| 691 StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp)) | 691 StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp)) |
| 692 return false; | 692 return false; |
| 693 *type = ident.substr(0, number_loc); | 693 *type = ident.substr(0, number_loc); |
| 694 *major = major_tmp; | 694 *major = major_tmp; |
| 695 *minor = minor_tmp; | 695 *minor = minor_tmp; |
| 696 return true; | 696 return true; |
| 697 } | 697 } |
| 698 | 698 |
| 699 bool IsSwipeTrackingFromScrollEventsEnabled() { |
| 700 SEL selector = @selector(isSwipeTrackingFromScrollEventsEnabled); |
| 701 return [NSEvent respondsToSelector:selector] |
| 702 && [NSEvent performSelector:selector]; |
| 703 } |
| 704 |
| 699 } // namespace mac | 705 } // namespace mac |
| 700 } // namespace base | 706 } // namespace base |
| OLD | NEW |