Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 112623003: Remove toolbar from extension windows in streamlined hosted apps mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile error Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 2145 matching lines...) Expand 10 before | Expand all | Expand 10 after
2156 if (!hide_ui_for_fullscreen) { 2156 if (!hide_ui_for_fullscreen) {
2157 if (!is_type_tabbed()) 2157 if (!is_type_tabbed())
2158 features |= FEATURE_TITLEBAR; 2158 features |= FEATURE_TITLEBAR;
2159 2159
2160 if (is_type_tabbed()) 2160 if (is_type_tabbed())
2161 features |= FEATURE_TABSTRIP; 2161 features |= FEATURE_TABSTRIP;
2162 2162
2163 if (is_type_tabbed()) 2163 if (is_type_tabbed())
2164 features |= FEATURE_TOOLBAR; 2164 features |= FEATURE_TOOLBAR;
2165 2165
2166 if (!is_app() || CommandLine::ForCurrentProcess()->HasSwitch( 2166 if (!is_app() || ((app_type() == APP_TYPE_HOST ||
2167 switches::kEnableStreamlinedHostedApps)) 2167 app_name() == DevToolsWindow::kDevToolsApp) &&
2168 CommandLine::ForCurrentProcess()->HasSwitch(
2169 switches::kEnableStreamlinedHostedApps))) {
2168 features |= FEATURE_LOCATIONBAR; 2170 features |= FEATURE_LOCATIONBAR;
2171 }
2169 } 2172 }
2170 return !!(features & feature); 2173 return !!(features & feature);
2171 } 2174 }
2172 2175
2173 void Browser::UpdateBookmarkBarState(BookmarkBarStateChangeReason reason) { 2176 void Browser::UpdateBookmarkBarState(BookmarkBarStateChangeReason reason) {
2174 BookmarkBar::State state; 2177 BookmarkBar::State state;
2175 // The bookmark bar is hidden in fullscreen mode, unless on the new tab page. 2178 // The bookmark bar is hidden in fullscreen mode, unless on the new tab page.
2176 if (browser_defaults::bookmarks_enabled && 2179 if (browser_defaults::bookmarks_enabled &&
2177 profile_->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar) && 2180 profile_->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar) &&
2178 !ShouldHideUIForFullscreen()) { 2181 !ShouldHideUIForFullscreen()) {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2291 if (contents && !allow_js_access) { 2294 if (contents && !allow_js_access) {
2292 contents->web_contents()->GetController().LoadURL( 2295 contents->web_contents()->GetController().LoadURL(
2293 target_url, 2296 target_url,
2294 content::Referrer(), 2297 content::Referrer(),
2295 content::PAGE_TRANSITION_LINK, 2298 content::PAGE_TRANSITION_LINK,
2296 std::string()); // No extra headers. 2299 std::string()); // No extra headers.
2297 } 2300 }
2298 2301
2299 return contents != NULL; 2302 return contents != NULL;
2300 } 2303 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698