| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #import "chrome/browser/ui/cocoa/objc_method_swizzle.h" | 5 #import "chrome/common/mac/objc_method_swizzle.h" |
| 6 | 6 |
| 7 #import "base/logging.h" | 7 #import "base/logging.h" |
| 8 #import "base/memory/scoped_nsobject.h" | 8 #import "base/memory/scoped_nsobject.h" |
| 9 #import "chrome/app/breakpad_mac.h" | 9 #import "chrome/app/breakpad_mac.h" |
| 10 | 10 |
| 11 namespace ObjcEvilDoers { | 11 namespace ObjcEvilDoers { |
| 12 | 12 |
| 13 Method GetImplementedInstanceMethod(Class aClass, SEL aSelector) { | 13 Method GetImplementedInstanceMethod(Class aClass, SEL aSelector) { |
| 14 Method method = NULL; | 14 Method method = NULL; |
| 15 unsigned int methodCount = 0; | 15 unsigned int methodCount = 0; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 } | 50 } |
| 51 | 51 |
| 52 IMP ret = method_getImplementation(original); | 52 IMP ret = method_getImplementation(original); |
| 53 if (ret) { | 53 if (ret) { |
| 54 method_exchangeImplementations(original, alternate); | 54 method_exchangeImplementations(original, alternate); |
| 55 } | 55 } |
| 56 return ret; | 56 return ret; |
| 57 } | 57 } |
| 58 | 58 |
| 59 } // namespace ObjcEvilDoers | 59 } // namespace ObjcEvilDoers |
| OLD | NEW |