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

Unified Diff: ui/views/test/event_generator_delegate_mac.mm

Issue 345243007: Add ScopedObjCClassSwizzler in base/mac, absorbs objc_method_swizzle and ScopedClassSwizzler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Inlude in shiny new gn base_unittests target Created 6 years, 4 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 | « ui/events/test/cocoa_test_event_utils.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/event_generator_delegate_mac.mm
diff --git a/ui/views/test/event_generator_delegate_mac.mm b/ui/views/test/event_generator_delegate_mac.mm
index d0e351a012deb03d5396db1629acab01ebe52638..db94d341f82511a1a6c5039c281c00f89c00de3e 100644
--- a/ui/views/test/event_generator_delegate_mac.mm
+++ b/ui/views/test/event_generator_delegate_mac.mm
@@ -4,13 +4,13 @@
#import <Cocoa/Cocoa.h>
+#import "base/mac/scoped_objc_class_swizzler.h"
#include "base/memory/singleton.h"
#include "ui/events/event_processor.h"
#include "ui/events/event_target.h"
#include "ui/events/event_target_iterator.h"
#include "ui/events/event_targeter.h"
#include "ui/events/test/event_generator.h"
-#import "ui/events/test/cocoa_test_event_utils.h"
#include "ui/gfx/mac/coordinate_conversion.h"
namespace {
@@ -293,7 +293,7 @@ class EventGeneratorDelegateMac : public ui::EventTarget,
ui::test::EventGenerator* owner_;
NSWindow* window_;
- scoped_ptr<ScopedClassSwizzler> swizzle_pressed_;
+ scoped_ptr<base::mac::ScopedObjCClassSwizzler> swizzle_pressed_;
DISALLOW_COPY_AND_ASSIGN(EventGeneratorDelegateMac);
};
@@ -332,7 +332,7 @@ void EventGeneratorDelegateMac::SetContext(ui::test::EventGenerator* owner,
owner_ = owner;
window_ = window;
if (owner_) {
- swizzle_pressed_.reset(new ScopedClassSwizzler(
+ swizzle_pressed_.reset(new base::mac::ScopedObjCClassSwizzler(
[NSEvent class],
[NSEventDonor class],
@selector(pressedMouseButtons)));
« no previous file with comments | « ui/events/test/cocoa_test_event_utils.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698