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

Unified Diff: chrome/browser/dom_ui/app_launcher_handler.cc

Issue 5168004: Revert 66646 - Add "open as window" menu item to NTP app menu.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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/browser_browsertest.cc ('k') | chrome/browser/dom_ui/ntp_resource_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/app_launcher_handler.cc
===================================================================
--- chrome/browser/dom_ui/app_launcher_handler.cc (revision 66663)
+++ chrome/browser/dom_ui/app_launcher_handler.cc (working copy)
@@ -190,14 +190,6 @@
bool showLauncher =
CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAppLauncher);
dictionary->SetBoolean("showLauncher", showLauncher);
-
-#if defined(OS_MACOSX)
- // App windows are not yet implemented on mac.
- bool disable_app_window_launch = true;
-#else
- bool disable_app_window_launch = false;
-#endif
- dictionary->SetBoolean("disableAppWindowLaunch", disable_app_window_launch);
}
void AppLauncherHandler::HandleGetApps(const ListValue* args) {
@@ -256,18 +248,8 @@
old_contents = browser->GetSelectedTabContents();
AnimateAppIcon(extension, rect);
-
- extension_misc::LaunchContainer launch_container =
- extension->launch_container();
- ExtensionPrefs::LaunchType prefs_launch_type =
- extensions_service_->extension_prefs()->GetLaunchType(extension_id);
-
- // If the user chose to open in a window, change the container type.
- if (prefs_launch_type == ExtensionPrefs::LAUNCH_WINDOW)
- launch_container = extension_misc::LAUNCH_WINDOW;
-
TabContents* new_contents = Browser::OpenApplication(
- profile, extension, launch_container, old_contents);
+ profile, extension, extension->launch_container(), old_contents);
if (new_contents != old_contents && browser->tab_count() > 1)
browser->CloseTabContents(old_contents);
@@ -328,7 +310,7 @@
extensions_service_->default_apps()->SetPromoHidden();
}
-// static
+//static
void AppLauncherHandler::RecordWebStoreLaunch(bool promo_active) {
if (!promo_active) return;
@@ -337,7 +319,7 @@
extension_misc::PROMO_BUCKET_BOUNDARY);
}
-// static
+//static
void AppLauncherHandler::RecordAppLaunch(bool promo_active) {
// TODO(jstritar): record app launches that occur when the promo is not
// active using a different histogram.
« no previous file with comments | « chrome/browser/browser_browsertest.cc ('k') | chrome/browser/dom_ui/ntp_resource_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698