summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/test_event_utils.h
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-07 22:20:14 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-07 22:20:14 +0000
commit35b1eb2a2e8bca7732421539e9094813fc7e77e2 (patch)
tree7145b80fb0892e45a5eb8737833f63cabad6a0b9 /chrome/browser/cocoa/test_event_utils.h
parent9281f8359ca7e19cb067ca9e4995ff158252f44c (diff)
downloadchromium_src-35b1eb2a2e8bca7732421539e9094813fc7e77e2.zip
chromium_src-35b1eb2a2e8bca7732421539e9094813fc7e77e2.tar.gz
chromium_src-35b1eb2a2e8bca7732421539e9094813fc7e77e2.tar.bz2
[Mac] Don't change state from stop to reload when hovered.
Hold the reload button state change from stop to reload until the mouse exits. Also short-circuit the stop message when the real state should be reload. Also prevent multi-clicks from sending multiple actions. Toolbar.xib: reload button made kind of ReloadButton. BUG=47184 TEST=Browse to a slow page, mouse over stop button. Should not go to reload button when throbber (in tab) stops. TEST=After page loaded, click stop. Should not crash. TEST=Hover over reload button. Command-r should start a reload and change the button to stop button. Review URL: http://codereview.chromium.org/2847051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/test_event_utils.h')
-rw-r--r--chrome/browser/cocoa/test_event_utils.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/test_event_utils.h b/chrome/browser/cocoa/test_event_utils.h
index 6b2eba5..f81fc6c 100644
--- a/chrome/browser/cocoa/test_event_utils.h
+++ b/chrome/browser/cocoa/test_event_utils.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_COCOA_TEST_EVENT_UTILS_H_
#define CHROME_BROWSER_COCOA_TEST_EVENT_UTILS_H_
+#include <utility>
+
#import <objc/objc-class.h>
#include "base/logging.h"
@@ -35,7 +37,11 @@ NSEvent* MouseEventAtPoint(NSPoint point, NSEventType type,
NSEvent* LeftMouseDownAtPoint(NSPoint point);
NSEvent* LeftMouseDownAtPointInWindow(NSPoint point, NSWindow* window);
+// Return a mouse down and an up event with the given |clickCount| at
+// |view|'s midpoint.
+std::pair<NSEvent*,NSEvent*> MouseClickInView(NSView* view,
+ NSUInteger clickCount);
+
} // namespace test_event_utils
#endif // CHROME_BROWSER_COCOA_TEST_EVENT_UTILS_H_
-