From aefc7d0cbd7934115a15f1b5b4eb69664f30799a Mon Sep 17 00:00:00 2001 From: "arv@chromium.org" Date: Tue, 20 Apr 2010 20:01:02 +0000 Subject: Add app section to NTP. This changes the NTP to closer match Cole's mocks. Here are some of the differences: 1. Show app icons if the user has any extension apps installed 2. Remove most visited list. Only thumbnail support from now on. 3. Remove the checkboxes for list vs thumb mode. 4. Add a caption for the most visited section. 5. Make the captions click targets for toggling the sections. 6. Multiple collapsed sections are on the same line 7. Move tips to the upper right. 8. Fix bug where we always reserved padding for the promo messages which lead to scrollbars showing up in cases where we don't want them. 9. Use the App icon instead of a dummy icon BUG=41270 TEST=Start with --enable-extension-apps and install some apps. These should show up on the NTP Review URL: http://codereview.chromium.org/1646014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45070 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/dom_ui/new_tab_ui.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'chrome/browser/dom_ui/new_tab_ui.cc') diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc index 62addae..749b8e9 100644 --- a/chrome/browser/dom_ui/new_tab_ui.cc +++ b/chrome/browser/dom_ui/new_tab_ui.cc @@ -17,6 +17,7 @@ #include "base/thread.h" #include "chrome/browser/browser.h" #include "chrome/browser/chrome_thread.h" +#include "chrome/browser/dom_ui/app_launcher_handler.h" #include "chrome/browser/dom_ui/dom_ui_theme_source.h" #include "chrome/browser/dom_ui/most_visited_handler.h" #include "chrome/browser/dom_ui/new_tab_page_sync_handler.h" @@ -504,6 +505,11 @@ NewTabUI::NewTabUI(TabContents* contents) if (ProfileSyncService::IsSyncEnabled()) { AddMessageHandler((new NewTabPageSyncHandler())->Attach(this)); } + if (CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableExtensionApps)) { + ExtensionsService* service = GetProfile()->GetExtensionsService(); + AddMessageHandler((new AppLauncherHandler(service))->Attach(this)); + } AddMessageHandler((new NewTabPageSetHomePageHandler())->Attach(this)); AddMessageHandler((new PromotionalMessageHandler())->Attach(this)); -- cgit v1.1