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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | ui/base/window_open_disposition.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_BASE_WINDOW_OPEN_DISPOSITION_H_ 5 #ifndef UI_BASE_WINDOW_OPEN_DISPOSITION_H_
6 #define UI_BASE_WINDOW_OPEN_DISPOSITION_H_ 6 #define UI_BASE_WINDOW_OPEN_DISPOSITION_H_
7 7
8 #include "ui/base/ui_export.h"
9
8 enum WindowOpenDisposition { 10 enum WindowOpenDisposition {
9 UNKNOWN, 11 UNKNOWN,
10 SUPPRESS_OPEN, 12 SUPPRESS_OPEN,
11 CURRENT_TAB, 13 CURRENT_TAB,
12 // Indicates that only one tab with the url should exist in the same window. 14 // Indicates that only one tab with the url should exist in the same window.
13 SINGLETON_TAB, 15 SINGLETON_TAB,
14 NEW_FOREGROUND_TAB, 16 NEW_FOREGROUND_TAB,
15 NEW_BACKGROUND_TAB, 17 NEW_BACKGROUND_TAB,
16 NEW_POPUP, 18 NEW_POPUP,
17 NEW_WINDOW, 19 NEW_WINDOW,
18 SAVE_TO_DISK, 20 SAVE_TO_DISK,
19 OFF_THE_RECORD, 21 OFF_THE_RECORD,
20 IGNORE_ACTION 22 IGNORE_ACTION
21 }; 23 };
22 24
25 namespace ui {
26
27 // Translates event flags from a click on a link into the user's desired
28 // window disposition. For example, a middle click would mean to open
29 // a background tab.
30 UI_EXPORT WindowOpenDisposition DispositionFromClick(bool middle_button,
31 bool alt_key,
32 bool ctrl_key,
33 bool meta_key,
34 bool shift_key);
35
36 // Translates event flags into what kind of disposition they represents.
37 // For example, a middle click would mean to open a background tab.
38 // event_flags are the flags as understood by ui::MouseEvent.
39 UI_EXPORT WindowOpenDisposition DispositionFromEventFlags(int event_flags);
40
41 } // namespace ui
42
23 #endif // UI_BASE_WINDOW_OPEN_DISPOSITION_H_ 43 #endif // UI_BASE_WINDOW_OPEN_DISPOSITION_H_
OLDNEW
« 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