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

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

Issue 7792048: WindowOpenDisposition should not be exposed in base and ui modules. (mac) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed a bug... Created 9 years, 3 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/event_disposition.cc ('k') | chrome/browser/ui/cocoa/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
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 represented by |event|,
16 int EventFlagsFromNSEvent(NSEvent* event);
17
18 // Retrieves a bitsum of ui::EventFlags represented by |event|,
19 // but instead use the modifier flags given by |modifiers|,
20 // which is the same format as |-NSEvent modifierFlags|. This allows
21 // substitution of the modifiers without having to create a new event from
22 // scratch.
23 int EventFlagsFromNSEventWithModifiers(NSEvent* event, NSUInteger modifiers);
24
15 // Retrieves the WindowOpenDisposition used to open a link from a user gesture 25 // 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 26 // represented by |event|. For example, a Cmd+Click would mean open the
17 // associated link in a background tab. 27 // associated link in a background tab.
18 WindowOpenDisposition WindowOpenDispositionFromNSEvent(NSEvent* event); 28 WindowOpenDisposition WindowOpenDispositionFromNSEvent(NSEvent* event);
19 29
20 // Retrieves the WindowOpenDisposition used to open a link from a user gesture 30 // 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|, 31 // represented by |event|, but instead use the modifier flags given by |flags|,
22 // which is the same format as |-NSEvent modifierFlags|. This allows 32 // which is the same format as |-NSEvent modifierFlags|. This allows
23 // substitution of the modifiers without having to create a new event from 33 // substitution of the modifiers without having to create a new event from
24 // scratch. 34 // scratch.
25 WindowOpenDisposition WindowOpenDispositionFromNSEventWithFlags( 35 WindowOpenDisposition WindowOpenDispositionFromNSEventWithFlags(
26 NSEvent* event, NSUInteger flags); 36 NSEvent* event, NSUInteger flags);
27 37
28 } // namespace event_utils 38 } // namespace event_utils
29 39
30 #endif // CHROME_BROWSER_UI_COCOA_EVENT_UTILS_H_ 40 #endif // CHROME_BROWSER_UI_COCOA_EVENT_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/event_disposition.cc ('k') | chrome/browser/ui/cocoa/event_utils.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698