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

Side by Side Diff: ui/base/window_open_disposition.h

Issue 484603004: New C++ -> Java enum build rule + parser/generator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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 | « ui/android/ui_android.gyp ('k') | ui/base/window_open_disposition_list.h » ('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 2011 The Chromium Authors. All rights reserved. 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 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_base_export.h" 8 #include "ui/base/ui_base_export.h"
9 9
10 // A Java counterpart will be generated for this enum.
11 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.ui
10 enum WindowOpenDisposition { 12 enum WindowOpenDisposition {
11 13 UNKNOWN,
12 #define WINDOW_OPEN_DISPOSITION(label, value) label = value, 14 SUPPRESS_OPEN,
13 #include "window_open_disposition_list.h" 15 CURRENT_TAB,
14 #undef WINDOW_OPEN_DISPOSITION 16 // Indicates that only one tab with the url should exist in the same window.
15 17 SINGLETON_TAB,
18 NEW_FOREGROUND_TAB,
19 NEW_BACKGROUND_TAB,
20 NEW_POPUP,
21 NEW_WINDOW,
22 SAVE_TO_DISK,
23 OFF_THE_RECORD,
24 IGNORE_ACTION,
25 // Update when adding a new disposition.
26 WINDOW_OPEN_DISPOSITION_LAST = IGNORE_ACTION
16 }; 27 };
17 28
18 namespace ui { 29 namespace ui {
19 30
20 // Translates event flags from a click on a link into the user's desired 31 // 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 32 // window disposition. For example, a middle click would mean to open
22 // a background tab. 33 // a background tab.
23 UI_BASE_EXPORT WindowOpenDisposition DispositionFromClick(bool middle_button, 34 UI_BASE_EXPORT WindowOpenDisposition DispositionFromClick(bool middle_button,
24 bool alt_key, 35 bool alt_key,
25 bool ctrl_key, 36 bool ctrl_key,
26 bool meta_key, 37 bool meta_key,
27 bool shift_key); 38 bool shift_key);
28 39
29 // Translates event flags into what kind of disposition they represents. 40 // Translates event flags into what kind of disposition they represents.
30 // For example, a middle click would mean to open a background tab. 41 // For example, a middle click would mean to open a background tab.
31 // event_flags are the flags as understood by ui::MouseEvent. 42 // event_flags are the flags as understood by ui::MouseEvent.
32 UI_BASE_EXPORT WindowOpenDisposition DispositionFromEventFlags(int event_flags); 43 UI_BASE_EXPORT WindowOpenDisposition DispositionFromEventFlags(int event_flags);
33 44
34 } // namespace ui 45 } // namespace ui
35 46
36 #endif // UI_BASE_WINDOW_OPEN_DISPOSITION_H_ 47 #endif // UI_BASE_WINDOW_OPEN_DISPOSITION_H_
OLDNEW
« no previous file with comments | « ui/android/ui_android.gyp ('k') | ui/base/window_open_disposition_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698