Commit 47feb3a3 authored by calamity@chromium.org's avatar calamity@chromium.org

Fix truncated location bar on maximized streamlined hosted apps.

Streamlined Hosted App windows were having their location bar truncated
when maximized. This was due to using the popup-style location bar to
get the omnibox to be read-only.

This CL changes streamlined hosted apps to use the normal location bar
and sets the omnibox to be read only at a deeper level.

BUG=318607

Review URL: https://codereview.chromium.org/110413007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243705 0039d316-1c4b-4281-b951-d872f2087c98
parent 1a7bacd2
......@@ -289,8 +289,12 @@ void LocationBarView::Init() {
AddChildView(ev_bubble_view_);
// Initialize the Omnibox view.
omnibox_view_ = new OmniboxViewViews(this, profile(), command_updater(),
is_popup_mode_, this, font_list);
omnibox_view_ = new OmniboxViewViews(
this, profile(), command_updater(),
is_popup_mode_ ||
(browser_->is_app() && CommandLine::ForCurrentProcess()->
HasSwitch(switches::kEnableStreamlinedHostedApps)),
this, font_list);
omnibox_view_->Init();
omnibox_view_->SetFocusable(true);
AddChildView(omnibox_view_);
......
......@@ -103,11 +103,6 @@ int GetButtonSpacing() {
ToolbarView::kStandardSpacing : 0;
}
bool IsStreamlinedHostedAppsEnabled() {
return CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableStreamlinedHostedApps);
}
} // namespace
// static
......@@ -136,7 +131,8 @@ ToolbarView::ToolbarView(Browser* browser)
display_mode_ = DISPLAYMODE_LOCATION;
if (browser->SupportsWindowFeature(Browser::FEATURE_TABSTRIP) ||
(browser->is_app() && IsStreamlinedHostedAppsEnabled()))
(browser->is_app() && CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableStreamlinedHostedApps)))
display_mode_ = DISPLAYMODE_NORMAL;
registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
......@@ -193,8 +189,7 @@ void ToolbarView::Init() {
location_bar_ = new LocationBarView(
browser_, browser_->profile(),
browser_->command_controller()->command_updater(), this,
display_mode_ == DISPLAYMODE_LOCATION ||
(browser_->is_app() && IsStreamlinedHostedAppsEnabled()));
display_mode_ == DISPLAYMODE_LOCATION);
reload_ = new ReloadButton(location_bar_,
browser_->command_controller()->command_updater());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment