| Index: chrome/browser/ui/browser.cc
|
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
| index 12dde57accf9cf12ebabe8852aca63b9be60c3de..d1056a22fd8493d07c3bf5204e976a869eba4c02 100644
|
| --- a/chrome/browser/ui/browser.cc
|
| +++ b/chrome/browser/ui/browser.cc
|
| @@ -251,7 +251,6 @@ Browser::CreateParams::CreateParams(Profile* profile,
|
| : type(TYPE_TABBED),
|
| profile(profile),
|
| host_desktop_type(host_desktop_type),
|
| - app_type(APP_TYPE_HOST),
|
| initial_show_state(ui::SHOW_STATE_DEFAULT),
|
| is_session_restore(false),
|
| window(NULL) {
|
| @@ -263,7 +262,6 @@ Browser::CreateParams::CreateParams(Type type,
|
| : type(type),
|
| profile(profile),
|
| host_desktop_type(host_desktop_type),
|
| - app_type(APP_TYPE_HOST),
|
| initial_show_state(ui::SHOW_STATE_DEFAULT),
|
| is_session_restore(false),
|
| window(NULL) {
|
| @@ -281,7 +279,6 @@ Browser::CreateParams Browser::CreateParams::CreateForApp(
|
|
|
| CreateParams params(type, profile, host_desktop_type);
|
| params.app_name = app_name;
|
| - params.app_type = APP_TYPE_CHILD;
|
| params.initial_bounds = window_bounds;
|
|
|
| return params;
|
| @@ -333,7 +330,6 @@ Browser::Browser(const CreateParams& params)
|
| tab_strip_model_(new TabStripModel(tab_strip_model_delegate_.get(),
|
| params.profile)),
|
| app_name_(params.app_name),
|
| - app_type_(params.app_type),
|
| cancel_download_confirmation_state_(NOT_PROMPTED),
|
| override_bounds_(params.initial_bounds),
|
| initial_show_state_(params.initial_show_state),
|
| @@ -2186,22 +2182,20 @@ void Browser::TabDetachedAtImpl(content::WebContents* contents,
|
| }
|
|
|
| bool Browser::ShouldShowLocationBar() const {
|
| - if (!is_app()) {
|
| - // Hide the URL for singleton settings windows.
|
| - // TODO(stevenjb): We could avoid this check by setting a Browser
|
| - // property for "system" windows, possibly shared with hosted app windows.
|
| - // crbug.com/350128.
|
| - if (chrome::IsSettingsWindow(this))
|
| - return false;
|
| + // Trusted apps and system windows (e.g. settings) do not show a location bar.
|
| + if (type() == TYPE_TRUSTED_POPUP)
|
| + return false;
|
| +
|
| + // Other non-app browsers always show a location bar.
|
| + if (!is_app())
|
| return true;
|
| - }
|
|
|
| - // Normally apps do not show a location bar.
|
| - if (app_type() != APP_TYPE_HOST ||
|
| - app_name() == DevToolsWindow::kDevToolsApp ||
|
| + // Normally non trusted app windows do not show a location bar.
|
| + if (app_name() == DevToolsWindow::kDevToolsApp ||
|
| !CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kEnableStreamlinedHostedApps))
|
| + switches::kEnableStreamlinedHostedApps)) {
|
| return false;
|
| + }
|
|
|
| // If kEnableStreamlinedHostedApps is true, show the locaiton bar for non
|
| // legacy packaged apps.
|
|
|