[email protected] | 6647a18 | 2011-08-30 08:20:58 | [diff] [blame] | 1 | // 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 | |||||
9 | namespace browser { | ||||
10 | |||||
11 | WindowOpenDisposition DispositionFromEventFlags(int event_flags) { | ||||
12 | return disposition_utils::DispositionFromClick( | ||||
[email protected] | f8d7423 | 2011-12-20 21:41:07 | [diff] [blame] | 13 | (event_flags & ui::EF_MIDDLE_MOUSE_BUTTON) != 0, |
[email protected] | 6647a18 | 2011-08-30 08:20:58 | [diff] [blame] | 14 | (event_flags & ui::EF_ALT_DOWN) != 0, |
15 | (event_flags & ui::EF_CONTROL_DOWN) != 0, | ||||
[email protected] | a08747c | 2011-08-31 08:02:24 | [diff] [blame] | 16 | (event_flags & ui::EF_COMMAND_DOWN) != 0, |
[email protected] | 6647a18 | 2011-08-30 08:20:58 | [diff] [blame] | 17 | (event_flags & ui::EF_SHIFT_DOWN) != 0); |
18 | } | ||||
19 | |||||
[email protected] | a08747c | 2011-08-31 08:02:24 | [diff] [blame] | 20 | } // namespace browser |