OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 EXTENSIONS_COMMON_VIEW_TYPE_H_ | 5 #ifndef EXTENSIONS_COMMON_VIEW_TYPE_H_ |
6 #define EXTENSIONS_COMMON_VIEW_TYPE_H_ | 6 #define EXTENSIONS_COMMON_VIEW_TYPE_H_ |
7 | 7 |
8 namespace extensions { | 8 namespace extensions { |
9 | 9 |
10 // Icky RTTI used by a few systems to distinguish the host type of a given | 10 // Icky RTTI used by a few systems to distinguish the host type of a given |
11 // WebContents. | 11 // WebContents. |
12 // | 12 // |
| 13 // Do not change the order of entries or remove entries in this list as this |
| 14 // is used in ExtensionViewType enum in tools/metrics/histograms/enums.xml. |
| 15 // |
13 // TODO(aa): Remove this and teach those systems to keep track of their own | 16 // TODO(aa): Remove this and teach those systems to keep track of their own |
14 // data. | 17 // data. |
15 enum ViewType { | 18 enum ViewType { |
16 VIEW_TYPE_INVALID, | 19 VIEW_TYPE_INVALID = 0, |
17 VIEW_TYPE_APP_WINDOW, | 20 VIEW_TYPE_APP_WINDOW = 1, |
18 VIEW_TYPE_BACKGROUND_CONTENTS, | 21 VIEW_TYPE_BACKGROUND_CONTENTS = 2, |
19 VIEW_TYPE_COMPONENT, // For custom parts of Chrome if no other type applies. | 22 |
20 VIEW_TYPE_EXTENSION_BACKGROUND_PAGE, | 23 // For custom parts of Chrome if no other type applies. |
21 VIEW_TYPE_EXTENSION_DIALOG, | 24 VIEW_TYPE_COMPONENT = 3, |
22 VIEW_TYPE_EXTENSION_GUEST, | 25 |
23 VIEW_TYPE_EXTENSION_POPUP, | 26 VIEW_TYPE_EXTENSION_BACKGROUND_PAGE = 4, |
24 VIEW_TYPE_LAUNCHER_PAGE, | 27 VIEW_TYPE_EXTENSION_DIALOG = 5, |
25 VIEW_TYPE_PANEL, | 28 VIEW_TYPE_EXTENSION_GUEST = 6, |
26 VIEW_TYPE_TAB_CONTENTS, | 29 VIEW_TYPE_EXTENSION_POPUP = 7, |
27 VIEW_TYPE_LAST = VIEW_TYPE_TAB_CONTENTS | 30 VIEW_TYPE_LAUNCHER_PAGE = 8, |
| 31 VIEW_TYPE_PANEL = 9, |
| 32 VIEW_TYPE_TAB_CONTENTS = 10, |
| 33 |
| 34 VIEW_TYPE_LAST = VIEW_TYPE_TAB_CONTENTS, |
28 }; | 35 }; |
29 | 36 |
30 // Constant strings corresponding to the Type enumeration values. Used | 37 // Constant strings corresponding to the Type enumeration values. Used |
31 // when converting JS arguments. | 38 // when converting JS arguments. |
32 extern const char kViewTypeAll[]; | 39 extern const char kViewTypeAll[]; |
33 extern const char kViewTypeAppWindow[]; | 40 extern const char kViewTypeAppWindow[]; |
34 extern const char kViewTypeBackgroundPage[]; | 41 extern const char kViewTypeBackgroundPage[]; |
35 extern const char kViewTypeExtensionDialog[]; | 42 extern const char kViewTypeExtensionDialog[]; |
36 extern const char kViewTypeLauncherPage[]; | 43 extern const char kViewTypeLauncherPage[]; |
37 extern const char kViewTypePanel[]; | 44 extern const char kViewTypePanel[]; |
38 extern const char kViewTypePopup[]; | 45 extern const char kViewTypePopup[]; |
39 extern const char kViewTypeTabContents[]; | 46 extern const char kViewTypeTabContents[]; |
40 | 47 |
41 } // namespace extensions | 48 } // namespace extensions |
42 | 49 |
43 #endif // EXTENSIONS_COMMON_VIEW_TYPE_H_ | 50 #endif // EXTENSIONS_COMMON_VIEW_TYPE_H_ |
OLD | NEW |