Index: chrome/common/chrome_view_type.h |
=================================================================== |
--- chrome/common/chrome_view_type.h (revision 138369) |
+++ chrome/common/chrome_view_type.h (working copy) |
@@ -6,7 +6,9 @@ |
#define CHROME_COMMON_CHROME_VIEW_TYPE_H_ |
#pragma once |
-#include "content/public/common/view_type.h" |
+namespace content { |
+class WebContents; |
+} |
namespace chrome { |
@@ -16,8 +18,7 @@ |
// TODO(aa): Remove this and teach those systems to keep track of their own |
// data. |
enum ViewType { |
- VIEW_TYPE_CHROME_START = content::VIEW_TYPE_CONTENT_END, |
- |
+ VIEW_TYPE_INVALID, |
VIEW_TYPE_APP_SHELL, |
VIEW_TYPE_BACKGROUND_CONTENTS, |
VIEW_TYPE_EXTENSION_BACKGROUND_PAGE, |
@@ -29,6 +30,11 @@ |
VIEW_TYPE_TAB_CONTENTS, |
}; |
+// Get/Set the type of a WebContents. |
+// GetViewType handles a NULL |tab| for convenience. |
Avi (use Gerrit)
2012/05/23 03:22:52
... and returns what if given NULL?
jam
2012/05/23 04:18:38
Done.
|
+ViewType GetViewType(content::WebContents* tab); |
+void SetViewType(content::WebContents* tab, ViewType type); |
+ |
// Constant strings corresponding to the Type enumeration values. Used |
// when converting JS arguments. |
extern const char kViewTypeAll[]; |