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

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

Issue 7399015: Sync Promo: Add a way to collapse the sync promo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Promo: Add a way to collapse the sync promo Created 9 years, 5 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
Index: chrome/browser/ui/webui/ntp/new_tab_sync_setup_handler.h
===================================================================
--- chrome/browser/ui/webui/ntp/new_tab_sync_setup_handler.h (revision 93571)
+++ chrome/browser/ui/webui/ntp/new_tab_sync_setup_handler.h (working copy)
@@ -5,13 +5,43 @@
#ifndef CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_SYNC_SETUP_HANDLER_H_
#define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_SYNC_SETUP_HANDLER_H_
+#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/ui/webui/sync_setup_handler.h"
// The handler for Javascript messages related to the sync setup UI in the new
// tab page.
class NewTabSyncSetupHandler : public SyncSetupHandler {
+ public:
+ // Checks if the sync promo should be visible.
+ static bool ShouldShowSyncPromo();
+
+ // WebUIMessageHandler implementation.
+ virtual WebUIMessageHandler* Attach(WebUI* web_ui);
+ virtual void RegisterMessages();
+
+ // NotificationObserver implementation.
+ virtual void Observe(int type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
protected:
virtual void ShowSetupUI();
+
+ // Javascript callback handler to initialize the sync promo UI.
+ void HandleInitializeSyncPromo(const ListValue* args);
+
+ // Javascript callback handler to collapse the sync promo.
+ void HandleCollapseSyncPromo(const ListValue* args);
+
+ // Javascript callback handler to expand the sync promo.
+ void HandleExpandSyncPromo(const ListValue* args);
+
+ private:
+ // Sends the sync login name to the page.
+ void UpdateLogin();
+
+ // Preference for the sync login name.
+ StringPrefMember username_pref_;
};
#endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_SYNC_SETUP_HANDLER_H_
« no previous file with comments | « chrome/browser/resources/sync_promo_minimize.png ('k') | chrome/browser/ui/webui/ntp/new_tab_sync_setup_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698