view_type.h revision a1401311d1ab56c4ed0a474bd38c108f75cb0cd9
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 3// found in the LICENSE file. 4 5#ifndef EXTENSIONS_COMMON_VIEW_TYPE_H_ 6#define EXTENSIONS_COMMON_VIEW_TYPE_H_ 7 8namespace extensions { 9 10// Icky RTTI used by a few systems to distinguish the host type of a given 11// WebContents. 12// 13// TODO(aa): Remove this and teach those systems to keep track of their own 14// data. 15enum ViewType { 16 VIEW_TYPE_INVALID, 17 VIEW_TYPE_APP_WINDOW, 18 VIEW_TYPE_BACKGROUND_CONTENTS, 19 VIEW_TYPE_EXTENSION_BACKGROUND_PAGE, 20 VIEW_TYPE_EXTENSION_DIALOG, 21 VIEW_TYPE_EXTENSION_INFOBAR, 22 VIEW_TYPE_EXTENSION_POPUP, 23 // TODO(jam): remove this once http://crbug.com/137297 is fixed and HTML5 24 // notifications don't use WebContents. 25 VIEW_TYPE_NOTIFICATION, 26 VIEW_TYPE_PANEL, 27 VIEW_TYPE_TAB_CONTENTS, 28 VIEW_TYPE_VIRTUAL_KEYBOARD, 29 VIEW_TYPE_LAST = VIEW_TYPE_VIRTUAL_KEYBOARD 30}; 31 32// Constant strings corresponding to the Type enumeration values. Used 33// when converting JS arguments. 34extern const char kViewTypeAll[]; 35extern const char kViewTypeAppWindow[]; 36extern const char kViewTypeBackgroundPage[]; 37extern const char kViewTypeExtensionDialog[]; 38extern const char kViewTypeInfobar[]; 39extern const char kViewTypeNotification[]; 40extern const char kViewTypePanel[]; 41extern const char kViewTypePopup[]; 42extern const char kViewTypeTabContents[]; 43 44} // namespace extensions 45 46#endif // EXTENSIONS_COMMON_VIEW_TYPE_H_ 47