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

Unified Diff: chrome/browser/cocoa/test_event_utils.h

Issue 173044: This changelist represents the necessary merger of two others:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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 | « chrome/browser/cocoa/location_bar_view_mac.mm ('k') | chrome/browser/cocoa/test_event_utils.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/test_event_utils.h
===================================================================
--- chrome/browser/cocoa/test_event_utils.h (revision 0)
+++ chrome/browser/cocoa/test_event_utils.h (revision 0)
@@ -0,0 +1,35 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_COCOA_TEST_EVENT_UTILS_H_
+#define CHROME_BROWSER_COCOA_TEST_EVENT_UTILS_H_
+
+#import <objc/objc-class.h>
+
+#include "base/logging.h"
+
+// Within a given scope, replace the selector |selector| on |target| with that
+// from |source|.
+class ScopedClassSwizzler {
+ public:
+ ScopedClassSwizzler(Class target, Class source, SEL selector);
+ ~ScopedClassSwizzler();
+
+ private:
+ Method old_selector_impl_;
+ Method new_selector_impl_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedClassSwizzler);
+};
+
+namespace test_event_utils {
+
+// Create a synthetic mouse event for testing. Currently this is very basic,
+// flesh out as needed.
+NSEvent* MakeMouseEvent(NSEventType type, NSUInteger modifiers);
+
+} // namespace test_event_utils
+
+#endif // CHROME_BROWSER_COCOA_TEST_EVENT_UTILS_H_
+
« no previous file with comments | « chrome/browser/cocoa/location_bar_view_mac.mm ('k') | chrome/browser/cocoa/test_event_utils.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698