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 #include "ui/base/cocoa/cocoa_base_utils.h"
7 #include "ui/events/cocoa/cocoa_event_utils.h"
11 WindowOpenDisposition WindowOpenDispositionFromNSEvent(NSEvent* event) {
12 NSUInteger modifiers = [event modifierFlags];
13 return WindowOpenDispositionFromNSEventWithFlags(event, modifiers);
16 WindowOpenDisposition WindowOpenDispositionFromNSEventWithFlags(
17 NSEvent* event, NSUInteger modifiers) {
18 int event_flags = EventFlagsFromNSEventWithModifiers(event, modifiers);
19 return DispositionFromEventFlags(event_flags);