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

Side by Side Diff: chrome/browser/ui/cocoa/event_utils.h

Issue 6893046: added CTRL+Click and SHIFT+Click handler for context menu, Back and Forward. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: make this patch applicable to the latest trunk Created 9 years, 6 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_COCOA_EVENT_UTILS_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_EVENT_UTILS_H_
6 #define CHROME_BROWSER_UI_COCOA_EVENT_UTILS_H_ 6 #define CHROME_BROWSER_UI_COCOA_EVENT_UTILS_H_
7 #pragma once 7 #pragma once
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 10
11 #include "webkit/glue/window_open_disposition.h" 11 #include "webkit/glue/window_open_disposition.h"
12 12
13 namespace event_utils { 13 namespace event_utils {
14 14
15 // Retrieves a bitsum of ui::EventFlags from NSEvent.
16 int EventFlagsFromNSEvent(NSEvent* event);
17
15 // Retrieves the WindowOpenDisposition used to open a link from a user gesture 18 // Retrieves the WindowOpenDisposition used to open a link from a user gesture
16 // represented by |event|. For example, a Cmd+Click would mean open the 19 // represented by |event|. For example, a Cmd+Click would mean open the
17 // associated link in a background tab. 20 // associated link in a background tab.
18 WindowOpenDisposition WindowOpenDispositionFromNSEvent(NSEvent* event); 21 WindowOpenDisposition WindowOpenDispositionFromNSEvent(NSEvent* event);
19 22
20 // Retrieves the WindowOpenDisposition used to open a link from a user gesture 23 // Retrieves the WindowOpenDisposition used to open a link from a user gesture
21 // represented by |event|, but instead use the modifier flags given by |flags|, 24 // represented by |event|, but instead use the modifier flags given by |flags|,
22 // which is the same format as |-NSEvent modifierFlags|. This allows 25 // which is the same format as |-NSEvent modifierFlags|. This allows
23 // substitution of the modifiers without having to create a new event from 26 // substitution of the modifiers without having to create a new event from
24 // scratch. 27 // scratch.
25 WindowOpenDisposition WindowOpenDispositionFromNSEventWithFlags( 28 WindowOpenDisposition WindowOpenDispositionFromNSEventWithFlags(
26 NSEvent* event, NSUInteger flags); 29 NSEvent* event, NSUInteger flags);
27 30
28 } // namespace event_utils 31 } // namespace event_utils
29 32
30 #endif // CHROME_BROWSER_UI_COCOA_EVENT_UTILS_H_ 33 #endif // CHROME_BROWSER_UI_COCOA_EVENT_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator_browsertest.cc ('k') | chrome/browser/ui/cocoa/event_utils.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698