Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(738)

Unified Diff: ui/base/window_open_disposition.h

Issue 11896047: Move the methods in disposition_utils.h and event_disposition.h to ui\base\window_open_disposition.… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix regex in ui.gyp Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | ui/base/window_open_disposition.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/window_open_disposition.h
===================================================================
--- ui/base/window_open_disposition.h (revision 178083)
+++ ui/base/window_open_disposition.h (working copy)
@@ -5,6 +5,8 @@
#ifndef UI_BASE_WINDOW_OPEN_DISPOSITION_H_
#define UI_BASE_WINDOW_OPEN_DISPOSITION_H_
+#include "ui/base/ui_export.h"
+
enum WindowOpenDisposition {
UNKNOWN,
SUPPRESS_OPEN,
@@ -20,4 +22,22 @@
IGNORE_ACTION
};
+namespace ui {
+
+// Translates event flags from a click on a link into the user's desired
+// window disposition. For example, a middle click would mean to open
+// a background tab.
+UI_EXPORT WindowOpenDisposition DispositionFromClick(bool middle_button,
+ bool alt_key,
+ bool ctrl_key,
+ bool meta_key,
+ bool shift_key);
+
+// Translates event flags into what kind of disposition they represents.
+// For example, a middle click would mean to open a background tab.
+// event_flags are the flags as understood by ui::MouseEvent.
+UI_EXPORT WindowOpenDisposition DispositionFromEventFlags(int event_flags);
+
+} // namespace ui
+
#endif // UI_BASE_WINDOW_OPEN_DISPOSITION_H_
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | ui/base/window_open_disposition.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698