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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_ui.cc

Issue 9567027: aura: Remove apps from NTP4 and disable NTP4 intro bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.h ('k') | chrome/browser/ui/webui/ntp/ntp_resource_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/new_tab_ui.cc
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
index 2fb839fc64afd415f06c35dfc320b1c6afa9747a..c36ab5c93eb8b648fa04d93c0d408518f5a25199 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -122,11 +122,14 @@ NewTabUI::NewTabUI(content::WebUI* web_ui)
if (GetProfile()->IsSyncAccessible())
web_ui->AddMessageHandler(new NewTabPageSyncHandler());
#endif
- ExtensionService* service = GetProfile()->GetExtensionService();
- // We might not have an ExtensionService (on ChromeOS when not logged in
- // for example).
- if (service)
- web_ui->AddMessageHandler(new AppLauncherHandler(service));
+
+ if (ShouldShowAppsPage()) {
+ ExtensionService* service = GetProfile()->GetExtensionService();
+ // We might not have an ExtensionService (on ChromeOS when not logged in
+ // for example).
+ if (service)
+ web_ui->AddMessageHandler(new AppLauncherHandler(service));
+ }
web_ui->AddMessageHandler(new NewTabPageHandler());
web_ui->AddMessageHandler(new FaviconWebUIHandler());
@@ -288,6 +291,16 @@ bool NewTabUI::ShouldShowAppInstallHint() {
}
// static
+bool NewTabUI::ShouldShowAppsPage() {
+#if defined(USE_AURA)
+ // Ash shows apps in app list thus should not show apps page in NTP4.
+ return false;
flackr 2012/03/05 21:18:53 Aura compact mode does not have an apps page so we
+#else
+ return true;
+#endif
+}
+
+// static
bool NewTabUI::IsSuggestionsPageEnabled() {
return CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableSuggestionsTabPage);
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.h ('k') | chrome/browser/ui/webui/ntp/ntp_resource_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698