blob: 3815da0884275313bce2524b4cbfbed464e7d83f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef EXTENSIONS_COMMON_VIEW_TYPE_H_
#define EXTENSIONS_COMMON_VIEW_TYPE_H_
namespace extensions {
// Icky RTTI used by a few systems to distinguish the host type of a given
// WebContents.
//
// TODO(aa): Remove this and teach those systems to keep track of their own
// data.
enum ViewType {
VIEW_TYPE_INVALID,
// TODO(jamescook): Rename this to VIEW_TYPE_APP_WINDOW after figuring out
// if the strings can be changed. http://crbug.com/344067
VIEW_TYPE_APP_SHELL,
VIEW_TYPE_BACKGROUND_CONTENTS,
VIEW_TYPE_EXTENSION_BACKGROUND_PAGE,
VIEW_TYPE_EXTENSION_DIALOG,
VIEW_TYPE_EXTENSION_INFOBAR,
VIEW_TYPE_EXTENSION_POPUP,
// TODO(jam): remove this once http://crbug.com/137297 is fixed and HTML5
// notifications don't use WebContents.
VIEW_TYPE_NOTIFICATION,
VIEW_TYPE_PANEL,
VIEW_TYPE_TAB_CONTENTS,
VIEW_TYPE_VIRTUAL_KEYBOARD,
VIEW_TYPE_LAST = VIEW_TYPE_VIRTUAL_KEYBOARD
};
// Constant strings corresponding to the Type enumeration values. Used
// when converting JS arguments.
extern const char kViewTypeAll[];
extern const char kViewTypeAppShell[];
extern const char kViewTypeBackgroundPage[];
extern const char kViewTypeExtensionDialog[];
extern const char kViewTypeInfobar[];
extern const char kViewTypeNotification[];
extern const char kViewTypePanel[];
extern const char kViewTypePopup[];
extern const char kViewTypeTabContents[];
} // namespace extensions
#endif // EXTENSIONS_COMMON_VIEW_TYPE_H_
|