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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_page_handler.h

Issue 11953021: Don't show the apps page on the NTP if the app launcher is installed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move getShouldShowApps message to onLoad. Created 7 years, 11 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/resources/ntp4/new_tab.js ('k') | chrome/browser/ui/webui/ntp/new_tab_page_handler.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_page_handler.h
diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_handler.h b/chrome/browser/ui/webui/ntp/new_tab_page_handler.h
index 9db1182b29ac50043398a08fffad0b3b0ca524fa..34cc843949a55e76f64fd92bb6441f6c1f94be21 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_page_handler.h
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_handler.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_
#define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_
+#include "base/memory/weak_ptr.h"
#include "base/values.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/web_ui_message_handler.h"
@@ -15,7 +16,8 @@ class Profile;
// Handler for general New Tab Page functionality that does not belong in a
// more specialized handler.
-class NewTabPageHandler : public content::WebUIMessageHandler {
+class NewTabPageHandler : public content::WebUIMessageHandler,
+ public base::SupportsWeakPtr<NewTabPageHandler> {
public:
NewTabPageHandler();
@@ -55,6 +57,12 @@ class NewTabPageHandler : public content::WebUIMessageHandler {
// Callback for "logTimeToClick".
void HandleLogTimeToClick(const base::ListValue* args);
+ // Callback for the "getShouldShowApps" message.
+ void HandleGetShouldShowApps(const base::ListValue* args);
+
+ // Callback from extensions::UpdateIsAppLauncherEnabled().
+ void GotIsAppLauncherEnabled(bool is_enabled);
+
// Tracks the number of times the user has switches pages (for UMA).
size_t page_switch_count_;
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.js ('k') | chrome/browser/ui/webui/ntp/new_tab_page_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698