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

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

Issue 10882024: Add webui handler for promotions on Android NTP. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removing images (added separately in https://chromiumcodereview.appspot.com/10905035/) Created 8 years, 4 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/android/promo_handler.cc ('k') | chrome/chrome_browser.gypi » ('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 5ac46a8258130fe0d977c721ae30a7cc998ee4e7..3da5d6f753d3a3f0c261998302fac8438075348d 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -62,6 +62,7 @@
#else
#include "chrome/browser/ui/webui/ntp/android/bookmarks_handler.h"
#include "chrome/browser/ui/webui/ntp/android/context_menu_handler.h"
+#include "chrome/browser/ui/webui/ntp/android/promo_handler.h"
#endif
using content::BrowserThread;
@@ -132,8 +133,10 @@ NewTabUI::NewTabUI(content::WebUI* web_ui)
#if defined(OS_ANDROID)
// These handlers are specific to the Android NTP page.
- web_ui->AddMessageHandler((new BookmarksHandler()));
- web_ui->AddMessageHandler((new ContextMenuHandler()));
+ web_ui->AddMessageHandler(new BookmarksHandler());
+ web_ui->AddMessageHandler(new ContextMenuHandler());
+ if (!GetProfile()->IsOffTheRecord())
+ web_ui->AddMessageHandler(new PromoHandler());
#else
// Android uses native UI for sync setup.
if (NTPLoginHandler::ShouldShow(GetProfile()))
« no previous file with comments | « chrome/browser/ui/webui/ntp/android/promo_handler.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698