Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / base / cocoa / cocoa_base_utils.h
blobc479f72f2a5ea0dc7b50ce076826f545f958beb8
1 // Copyright 2014 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.
5 #ifndef UI_BASE_COCOA_COCOA_BASE_UTILS_H_
6 #define UI_BASE_COCOA_COCOA_BASE_UTILS_H_
8 #import <Cocoa/Cocoa.h>
10 #include "ui/base/ui_base_export.h"
11 #include "ui/base/window_open_disposition.h"
13 namespace ui {
15 // 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
17 // associated link in a background tab.
18 UI_BASE_EXPORT WindowOpenDisposition
19 WindowOpenDispositionFromNSEvent(NSEvent* event);
21 // Retrieves the WindowOpenDisposition used to open a link from a user gesture
22 // represented by |event|, but instead use the modifier flags given by |flags|,
23 // which is the same format as |-NSEvent modifierFlags|. This allows
24 // substitution of the modifiers without having to create a new event from
25 // scratch.
26 UI_BASE_EXPORT WindowOpenDisposition
27 WindowOpenDispositionFromNSEventWithFlags(NSEvent* event, NSUInteger flags);
29 } // namespace ui
31 #endif // UI_BASE_COCOA_COCOA_BASE_UTILS_H_