Index: chrome/common/extensions/extension.cc |
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc |
index ba5753c67923dd1b962baf616f5660b312517018..2c3550788011bee2dc95713aa1037142a4502c21 100644 |
--- a/chrome/common/extensions/extension.cc |
+++ b/chrome/common/extensions/extension.cc |
@@ -903,6 +903,12 @@ bool Extension::LoadIsApp(const DictionaryValue* manifest, |
if (manifest->HasKey(keys::kApp)) |
is_app_ = true; |
+ if (!CommandLine::ForCurrentProcess()->HasSwitch( |
Mihai Parparita -not on Chrome
2011/11/03 21:37:12
Maybe I'm missing something, but it seems like the
miket_OOO
2011/11/04 22:39:45
Overly subtle manual testing that didn't get clean
|
+ switches::kEnablePlatformApps)) { |
+ if (manifest->HasKey(keys::kPlatformApp)) |
+ is_platform_app_ = true; |
+ } |
+ |
return true; |
} |
@@ -1272,6 +1278,7 @@ Extension::Extension(const FilePath& path, Location location) |
converted_from_user_script_(false), |
is_theme_(false), |
is_app_(false), |
+ is_platform_app_(false), |
is_storage_isolated_(false), |
launch_container_(extension_misc::LAUNCH_TAB), |
launch_width_(0), |
@@ -1512,6 +1519,13 @@ bool Extension::InitFromValue(const DictionaryValue& source, int flags, |
return false; |
} |
+ if (is_platform_app_) { |
+ if (launch_container() != extension_misc::LAUNCH_PANEL) { |
Mihai Parparita -not on Chrome
2011/11/03 21:37:12
Rather than forcing panel to be specified, it migh
miket_OOO
2011/11/04 22:39:45
I thought about this, but the panel dimensions are
|
+ *error = errors::kInvalidLaunchContainerForPlatform; |
+ return false; |
+ } |
+ } |
+ |
// Initialize the permissions (optional). |
ExtensionAPIPermissionSet api_permissions; |
URLPatternSet host_permissions; |