blob: c45841af1231d1db210caed14a1ab10d6aa75ce8 [file] [log] [blame]
[email protected]6647a182011-08-30 08:20:581// Copyright (c) 2011 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.
4
5#include "chrome/browser/event_disposition.h"
6#include "content/browser/disposition_utils.h"
7#include "ui/base/events.h"
8
9namespace browser {
10
11WindowOpenDisposition DispositionFromEventFlags(int event_flags) {
12 return disposition_utils::DispositionFromClick(
[email protected]f8d74232011-12-20 21:41:0713 (event_flags & ui::EF_MIDDLE_MOUSE_BUTTON) != 0,
[email protected]6647a182011-08-30 08:20:5814 (event_flags & ui::EF_ALT_DOWN) != 0,
15 (event_flags & ui::EF_CONTROL_DOWN) != 0,
[email protected]a08747c2011-08-31 08:02:2416 (event_flags & ui::EF_COMMAND_DOWN) != 0,
[email protected]6647a182011-08-30 08:20:5817 (event_flags & ui::EF_SHIFT_DOWN) != 0);
18}
19
[email protected]a08747c2011-08-31 08:02:2420} // namespace browser