blob: 0830f3488a8bddb2f8708155cb562838fda0c21a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/base/cocoa/cocoa_base_utils.h"
#include "ui/events/cocoa/cocoa_event_utils.h"
namespace ui {
WindowOpenDisposition WindowOpenDispositionFromNSEvent(NSEvent* event) {
NSUInteger modifiers = [event modifierFlags];
return WindowOpenDispositionFromNSEventWithFlags(event, modifiers);
}
WindowOpenDisposition WindowOpenDispositionFromNSEventWithFlags(
NSEvent* event, NSUInteger modifiers) {
int event_flags = EventFlagsFromNSEventWithModifiers(event, modifiers);
return DispositionFromEventFlags(event_flags);
}
} // namespace ui
|