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

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

Issue 883603002: Rename StreamlinedHostedApps to NewBookmarkApps in the code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments and variables Created 5 years, 10 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
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_commands.h" 5 #include "chrome/browser/ui/browser_commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 GURL(pref_service->GetString(prefs::kHomePage)))) { 435 GURL(pref_service->GetString(prefs::kHomePage)))) {
436 extra_headers = RLZTracker::GetAccessPointHttpHeader( 436 extra_headers = RLZTracker::GetAccessPointHttpHeader(
437 RLZTracker::ChromeHomePage()); 437 RLZTracker::ChromeHomePage());
438 } 438 }
439 } 439 }
440 #endif // defined(ENABLE_RLZ) && !defined(OS_IOS) 440 #endif // defined(ENABLE_RLZ) && !defined(OS_IOS)
441 441
442 GURL url = browser->profile()->GetHomePage(); 442 GURL url = browser->profile()->GetHomePage();
443 443
444 #if defined(ENABLE_EXTENSIONS) 444 #if defined(ENABLE_EXTENSIONS)
445 // Streamlined hosted apps should return to their launch page when the home 445 // With bookmark apps enabled, hosted apps should return to their launch page
446 // button is pressed. 446 // when the home button is pressed.
447 if (browser->is_app()) { 447 if (browser->is_app()) {
448 const extensions::Extension* extension = 448 const extensions::Extension* extension =
449 extensions::ExtensionRegistry::Get(browser->profile()) 449 extensions::ExtensionRegistry::Get(browser->profile())
450 ->GetExtensionById( 450 ->GetExtensionById(
451 web_app::GetExtensionIdFromApplicationName(browser->app_name()), 451 web_app::GetExtensionIdFromApplicationName(browser->app_name()),
452 extensions::ExtensionRegistry::EVERYTHING); 452 extensions::ExtensionRegistry::EVERYTHING);
453 if (!extension) 453 if (!extension)
454 return; 454 return;
455 455
456 url = extensions::AppLaunchInfo::GetLaunchWebURL(extension); 456 url = extensions::AppLaunchInfo::GetLaunchWebURL(extension);
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 browser->host_desktop_type())); 1278 browser->host_desktop_type()));
1279 app_browser->tab_strip_model()->AppendWebContents(contents, true); 1279 app_browser->tab_strip_model()->AppendWebContents(contents, true);
1280 1280
1281 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1281 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1282 contents->GetRenderViewHost()->SyncRendererPrefs(); 1282 contents->GetRenderViewHost()->SyncRendererPrefs();
1283 app_browser->window()->Show(); 1283 app_browser->window()->Show();
1284 } 1284 }
1285 #endif // defined(ENABLE_EXTENSIONS) 1285 #endif // defined(ENABLE_EXTENSIONS)
1286 1286
1287 } // namespace chrome 1287 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698