summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/new_tab_ui.cc
diff options
context:
space:
mode:
authorarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-20 20:01:02 +0000
committerarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-20 20:01:02 +0000
commitaefc7d0cbd7934115a15f1b5b4eb69664f30799a (patch)
tree8217c74e55e409730abbdc3459d4b5182daa0a76 /chrome/browser/dom_ui/new_tab_ui.cc
parentbe2ca9217d4ffae79966494eaf6ce58507237f61 (diff)
downloadchromium_src-aefc7d0cbd7934115a15f1b5b4eb69664f30799a.zip
chromium_src-aefc7d0cbd7934115a15f1b5b4eb69664f30799a.tar.gz
chromium_src-aefc7d0cbd7934115a15f1b5b4eb69664f30799a.tar.bz2
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
Diffstat (limited to 'chrome/browser/dom_ui/new_tab_ui.cc')
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc6
1 files changed, 6 insertions, 0 deletions
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));