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

Unified Diff: chrome/browser/ui/extensions/application_launch.cc

Issue 187443008: Elim Browser::AppType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and add non trusted type test Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/chrome_pages.cc ('k') | chrome/browser/ui/settings_window_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/extensions/application_launch.cc
diff --git a/chrome/browser/ui/extensions/application_launch.cc b/chrome/browser/ui/extensions/application_launch.cc
index beb23cd8d63126d2636470c54a54b6712c50830c..06edc7da869b1108b23630959ba6e4887f9836de 100644
--- a/chrome/browser/ui/extensions/application_launch.cc
+++ b/chrome/browser/ui/extensions/application_launch.cc
@@ -190,22 +190,25 @@ WebContents* OpenApplicationWindow(const AppLaunchParams& params) {
DCHECK(!url_input.is_empty() || extension);
GURL url = UrlForExtension(extension, url_input);
- Browser::CreateParams browser_params(
- Browser::TYPE_POPUP, profile, params.desktop_type);
-
- browser_params.app_name = extension ?
+ std::string app_name = extension ?
web_app::GenerateApplicationNameFromExtensionId(extension->id()) :
web_app::GenerateApplicationNameFromURL(url);
+ gfx::Rect initial_bounds;
if (!params.override_bounds.IsEmpty()) {
- browser_params.initial_bounds = params.override_bounds;
+ initial_bounds = params.override_bounds;
} else if (extension) {
- browser_params.initial_bounds.set_width(
+ initial_bounds.set_width(
extensions::AppLaunchInfo::GetLaunchWidth(extension));
- browser_params.initial_bounds.set_height(
+ initial_bounds.set_height(
extensions::AppLaunchInfo::GetLaunchHeight(extension));
}
+ Browser::CreateParams browser_params(
+ Browser::CreateParams::CreateForApp(
+ Browser::TYPE_TRUSTED_POPUP, app_name, initial_bounds,
+ profile, params.desktop_type));
+
browser_params.initial_show_state = DetermineWindowShowState(profile,
params.container,
extension);
« no previous file with comments | « chrome/browser/ui/chrome_pages.cc ('k') | chrome/browser/ui/settings_window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698