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

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: Created 7 years 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 282
283 return params; 283 return params;
284 } 284 }
285 285
286 // static 286 // static
287 Browser::CreateParams Browser::CreateParams::CreateForDevTools( 287 Browser::CreateParams Browser::CreateParams::CreateForDevTools(
288 Profile* profile, 288 Profile* profile,
289 chrome::HostDesktopType host_desktop_type) { 289 chrome::HostDesktopType host_desktop_type) {
290 CreateParams params(TYPE_POPUP, profile, host_desktop_type); 290 CreateParams params(TYPE_POPUP, profile, host_desktop_type);
291 params.app_name = DevToolsWindow::kDevToolsApp; 291 params.app_name = DevToolsWindow::kDevToolsApp;
292 params.app_type = APP_TYPE_CHILD;
sky 2013/12/12 17:03:35 Why are you changing the app_type? I have to admit
calamity 2013/12/13 02:02:54 My bad. Done.
292 return params; 293 return params;
293 } 294 }
294 295
295 //////////////////////////////////////////////////////////////////////////////// 296 ////////////////////////////////////////////////////////////////////////////////
296 // Browser, InterstitialObserver: 297 // Browser, InterstitialObserver:
297 298
298 class Browser::InterstitialObserver : public content::WebContentsObserver { 299 class Browser::InterstitialObserver : public content::WebContentsObserver {
299 public: 300 public:
300 InterstitialObserver(Browser* browser, content::WebContents* web_contents) 301 InterstitialObserver(Browser* browser, content::WebContents* web_contents)
301 : WebContentsObserver(web_contents), 302 : WebContentsObserver(web_contents),
(...skipping 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after
2163 if (!hide_ui_for_fullscreen) { 2164 if (!hide_ui_for_fullscreen) {
2164 if (!is_type_tabbed()) 2165 if (!is_type_tabbed())
2165 features |= FEATURE_TITLEBAR; 2166 features |= FEATURE_TITLEBAR;
2166 2167
2167 if (is_type_tabbed()) 2168 if (is_type_tabbed())
2168 features |= FEATURE_TABSTRIP; 2169 features |= FEATURE_TABSTRIP;
2169 2170
2170 if (is_type_tabbed()) 2171 if (is_type_tabbed())
2171 features |= FEATURE_TOOLBAR; 2172 features |= FEATURE_TOOLBAR;
2172 2173
2173 if (!is_app() || CommandLine::ForCurrentProcess()->HasSwitch( 2174 if (!is_app() || (app_type() == APP_TYPE_HOST &&
sky 2013/12/12 17:03:35 Wouldn't it be better to special case devtools rat
calamity 2013/12/13 02:02:54 Done.
2174 switches::kEnableStreamlinedHostedApps)) 2175 CommandLine::ForCurrentProcess()->HasSwitch(
2176 switches::kEnableStreamlinedHostedApps)))
2175 features |= FEATURE_LOCATIONBAR; 2177 features |= FEATURE_LOCATIONBAR;
2176 } 2178 }
2177 return !!(features & feature); 2179 return !!(features & feature);
2178 } 2180 }
2179 2181
2180 void Browser::UpdateBookmarkBarState(BookmarkBarStateChangeReason reason) { 2182 void Browser::UpdateBookmarkBarState(BookmarkBarStateChangeReason reason) {
2181 BookmarkBar::State state; 2183 BookmarkBar::State state;
2182 // The bookmark bar is hidden in fullscreen mode, unless on the new tab page. 2184 // The bookmark bar is hidden in fullscreen mode, unless on the new tab page.
2183 if (browser_defaults::bookmarks_enabled && 2185 if (browser_defaults::bookmarks_enabled &&
2184 profile_->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar) && 2186 profile_->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar) &&
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
2298 if (contents && !allow_js_access) { 2300 if (contents && !allow_js_access) {
2299 contents->web_contents()->GetController().LoadURL( 2301 contents->web_contents()->GetController().LoadURL(
2300 target_url, 2302 target_url,
2301 content::Referrer(), 2303 content::Referrer(),
2302 content::PAGE_TRANSITION_LINK, 2304 content::PAGE_TRANSITION_LINK,
2303 std::string()); // No extra headers. 2305 std::string()); // No extra headers.
2304 } 2306 }
2305 2307
2306 return contents != NULL; 2308 return contents != NULL;
2307 } 2309 }
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