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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_SYNC_SETUP_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_SYNC_SETUP_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_SYNC_SETUP_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_SYNC_SETUP_HANDLER_H_
7 7
8 #include "chrome/browser/prefs/pref_member.h"
8 #include "chrome/browser/ui/webui/sync_setup_handler.h" 9 #include "chrome/browser/ui/webui/sync_setup_handler.h"
9 10
10 // The handler for Javascript messages related to the sync setup UI in the new 11 // The handler for Javascript messages related to the sync setup UI in the new
11 // tab page. 12 // tab page.
12 class NewTabSyncSetupHandler : public SyncSetupHandler { 13 class NewTabSyncSetupHandler : public SyncSetupHandler {
14 public:
15 // Checks if the sync promo should be visible.
16 static bool ShouldShowSyncPromo();
17
18 // WebUIMessageHandler implementation.
19 virtual WebUIMessageHandler* Attach(WebUI* web_ui);
20 virtual void RegisterMessages();
21
22 // NotificationObserver implementation.
23 virtual void Observe(int type,
24 const NotificationSource& source,
25 const NotificationDetails& details);
26
13 protected: 27 protected:
14 virtual void ShowSetupUI(); 28 virtual void ShowSetupUI();
29
30 // Javascript callback handler to initialize the sync promo UI.
31 void HandleInitializeSyncPromo(const ListValue* args);
32
33 // Javascript callback handler to collapse the sync promo.
34 void HandleCollapseSyncPromo(const ListValue* args);
35
36 // Javascript callback handler to expand the sync promo.
37 void HandleExpandSyncPromo(const ListValue* args);
38
39 private:
40 // Sends the sync login name to the page.
41 void UpdateLogin();
42
43 // Preference for the sync login name.
44 StringPrefMember username_pref_;
15 }; 45 };
16 46
17 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_SYNC_SETUP_HANDLER_H_ 47 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_SYNC_SETUP_HANDLER_H_
OLDNEW
« 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