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

Unified Diff: chrome/browser/extensions/extension_prefs.cc

Issue 5019005: Add "open as window" menu item to NTP app menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for commit Created 10 years, 1 month 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/extensions/extension_prefs.h ('k') | chrome/browser/extensions/extension_process_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_prefs.cc
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index 57c5c9ba1427f06adde28d8a4b042800ca494958..09b7dd6fcd8dfa1a0e68489d33a74572ecd24679 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -456,12 +456,22 @@ void ExtensionPrefs::SetAllowFileAccess(const std::string& extension_id,
ExtensionPrefs::LaunchType ExtensionPrefs::GetLaunchType(
const std::string& extension_id) {
int value;
- if (ReadExtensionPrefInteger(extension_id, kPrefLaunchType, &value) && (
- value == LAUNCH_PINNED ||
+ if (ReadExtensionPrefInteger(extension_id, kPrefLaunchType, &value) &&
+ (value == LAUNCH_PINNED ||
value == LAUNCH_REGULAR ||
- value == LAUNCH_FULLSCREEN)) {
+ value == LAUNCH_FULLSCREEN ||
+ value == LAUNCH_WINDOW)) {
+
+#if defined(OS_MACOSX)
+ // App windows are not yet supported on mac. Pref sync could make
+ // the launch type LAUNCH_WINDOW, even if there is no UI to set it
+ // on mac.
+ if (value == LAUNCH_WINDOW)
+ return LAUNCH_REGULAR;
+#endif
return static_cast<LaunchType>(value);
}
+
return LAUNCH_REGULAR;
}
« no previous file with comments | « chrome/browser/extensions/extension_prefs.h ('k') | chrome/browser/extensions/extension_process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698