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

Side by Side Diff: chrome/browser/cocoa/test_event_utils.h

Issue 172082: Create new event_utils.h file for Cocoa-specific event to WindowOpenDispositi... (Closed) Base URL: svn://chrome-svn/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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_COCOA_TEST_EVENT_UTILS_H_
6 #define CHROME_BROWSER_COCOA_TEST_EVENT_UTILS_H_
7
8 #import <objc/objc-class.h>
9
10 #include "base/logging.h"
11
12 // Within a given scope, replace the selector |selector| on |target| with that
13 // from |source|.
14 class ScopedClassSwizzler {
15 public:
16 ScopedClassSwizzler(Class target, Class source, SEL selector);
17 ~ScopedClassSwizzler();
18
19 private:
20 Method old_selector_impl_;
21 Method new_selector_impl_;
22
23 DISALLOW_COPY_AND_ASSIGN(ScopedClassSwizzler);
24 };
25
26 namespace test_event_utils {
27
28 // Create a synthetic mouse event for testing. Currently this is very basic,
29 // flesh out as needed.
30 NSEvent* MakeMouseEvent(NSEventType type, NSUInteger modifiers);
31
32 } // namespace test_event_utils
33
34 #endif // CHROME_BROWSER_COCOA_TEST_EVENT_UTILS_H_
35
OLDNEW
« 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