Index: chrome/browser/ui/browser.h |
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h |
index 8b9788ca0761fbba7c7c9db58f693dd4557896a0..defa8c6b49254c02c964c504238e47d3839aae61 100644 |
--- a/chrome/browser/ui/browser.h |
+++ b/chrome/browser/ui/browser.h |
@@ -111,16 +111,9 @@ class Browser : public TabStripModelObserver, |
enum Type { |
// If you add a new type, consider updating the test |
// BrowserTest.StartMaximized. |
- TYPE_TABBED = 1, |
- TYPE_POPUP = 2 |
- }; |
- |
- // Distinguishes between browsers that host an app (opened from |
- // ApplicationLauncher::OpenApplication), and child browsers created by an app |
- // from Browser::CreateForApp (e.g. by windows.open or the extension API). |
- enum AppType { |
- APP_TYPE_HOST = 1, |
- APP_TYPE_CHILD = 2 |
+ TYPE_TABBED = 1, // A tabbed browser |
+ TYPE_POPUP = 2, // A popup window opened by a browser page or an app |
+ TYPE_HOSTED_POPUP = 3 // A popup window for a hosted app or system page |
Ben Goodger (Google)
2014/03/19 17:30:19
I would be inclined to come up with a different na
stevenjb
2014/04/04 00:04:10
'TRUSTED' was actually my first thought also, alth
|
}; |
// Possible elements of the Browser window. |
@@ -175,15 +168,6 @@ class Browser : public TabStripModelObserver, |
// The host desktop the browser is created on. |
chrome::HostDesktopType host_desktop_type; |
- // The application name that is also the name of the window to the shell. |
- // This name should be set when: |
- // 1) we launch an application via an application shortcut or extension API. |
- // 2) we launch an undocked devtool window. |
- std::string app_name; |
- |
- // Type of app (host or child). See description of AppType. |
- AppType app_type; |
- |
// The bounds of the window to open. |
gfx::Rect initial_bounds; |
@@ -194,6 +178,17 @@ class Browser : public TabStripModelObserver, |
// Supply a custom BrowserWindow implementation, to be used instead of the |
// default. Intended for testing. |
BrowserWindow* window; |
+ |
+ private: |
+ friend class Browser; |
+ |
+ // The application name that is also the name of the window to the shell. |
+ // Do not set this value directly, use CreateForApp. |
+ // This name will be set for: |
+ // 1) v1 applications launched via an application shortcut or extension API. |
+ // 2) undocked devtool windows. |
+ // 3) popup windows spawned from v1 applications. |
+ std::string app_name; |
}; |
// Constructors, Creation, Showing ////////////////////////////////////////// |
@@ -230,7 +225,6 @@ class Browser : public TabStripModelObserver, |
Type type() const { return type_; } |
const std::string& app_name() const { return app_name_; } |
- AppType app_type() const { return app_type_; } |
Profile* profile() const { return profile_; } |
gfx::Rect override_bounds() const { return override_bounds_; } |
@@ -456,7 +450,9 @@ class Browser : public TabStripModelObserver, |
const blink::WebGestureEvent& event) OVERRIDE; |
bool is_type_tabbed() const { return type_ == TYPE_TABBED; } |
- bool is_type_popup() const { return type_ == TYPE_POPUP; } |
+ bool is_type_popup() const { |
+ return type_ == TYPE_POPUP || type_ == TYPE_HOSTED_POPUP; |
+ } |
bool is_app() const; |
bool is_devtools() const; |
@@ -824,9 +820,6 @@ class Browser : public TabStripModelObserver, |
// 2) we launch an undocked devtool window. |
std::string app_name_; |
- // Type of app (host or child). See description of AppType. |
- AppType app_type_; |
- |
// Unique identifier of this browser for session restore. This id is only |
// unique within the current session, and is not guaranteed to be unique |
// across sessions. |