diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-14 22:33:05 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-14 22:33:05 +0000 |
commit | 947fc0d47d45a01dc8608b3043254db66ae2a9da (patch) | |
tree | c1ec741201722ed9f4ad2d1e92ec4703ee57d8ea /chrome/browser/cocoa/event_utils.h | |
parent | cc3b22f0e594edd70742ddb79dd9dd5c59cf0186 (diff) | |
download | chromium_src-947fc0d47d45a01dc8608b3043254db66ae2a9da.zip chromium_src-947fc0d47d45a01dc8608b3043254db66ae2a9da.tar.gz chromium_src-947fc0d47d45a01dc8608b3043254db66ae2a9da.tar.bz2 |
Fix command-click on buttons in background windows to perform their action in the context of the background window's controller, not the one associated with the foreground window. Command-click on back/fwd button in a background window doesn't have any special open disposition like it does in fg window.
BUG=16191
TEST=menus, key commands, button command dispatching should all still work for foreground and background windows. Test cmd-clicking buttons in a browser when a non-browser is the foreground window.
Review URL: http://codereview.chromium.org/543044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36287 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/event_utils.h')
-rw-r--r-- | chrome/browser/cocoa/event_utils.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/event_utils.h b/chrome/browser/cocoa/event_utils.h index 7d0f87b..7921187 100644 --- a/chrome/browser/cocoa/event_utils.h +++ b/chrome/browser/cocoa/event_utils.h @@ -16,6 +16,14 @@ namespace event_utils { // associated link in a background tab. WindowOpenDisposition WindowOpenDispositionFromNSEvent(NSEvent* event); +// Retrieves the WindowOpenDisposition used to open a link from a user gesture +// represented by |event|, but instead use the modifier flags given by |flags|, +// which is the same format as |-NSEvent modifierFlags|. This allows +// substitution of the modifiers without having to create a new event from +// scratch. +WindowOpenDisposition WindowOpenDispositionFromNSEventWithFlags( + NSEvent* event, NSUInteger flags); + } // namespace event_utils #endif // CHROME_BROWSER_COCOA_EVENT_UTILS_H_ |