Roll third_party/android_tools to the latest: updated the support library to 19.0.1
[chromium-blink-merge.git] / ui / base / window_open_disposition.h
blobfe96aac5f07aeacb3eb9307983738b4877557b28
1 // Copyright 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.
5 #ifndef UI_BASE_WINDOW_OPEN_DISPOSITION_H_
6 #define UI_BASE_WINDOW_OPEN_DISPOSITION_H_
8 #include "ui/base/ui_base_export.h"
10 enum WindowOpenDisposition {
12 #define WINDOW_OPEN_DISPOSITION(label, value) label = value,
13 #include "window_open_disposition_list.h"
14 #undef WINDOW_OPEN_DISPOSITION
18 namespace ui {
20 // Translates event flags from a click on a link into the user's desired
21 // window disposition. For example, a middle click would mean to open
22 // a background tab.
23 UI_BASE_EXPORT WindowOpenDisposition DispositionFromClick(bool middle_button,
24 bool alt_key,
25 bool ctrl_key,
26 bool meta_key,
27 bool shift_key);
29 // Translates event flags into what kind of disposition they represents.
30 // For example, a middle click would mean to open a background tab.
31 // event_flags are the flags as understood by ui::MouseEvent.
32 UI_BASE_EXPORT WindowOpenDisposition DispositionFromEventFlags(int event_flags);
34 } // namespace ui
36 #endif // UI_BASE_WINDOW_OPEN_DISPOSITION_H_