OLD | NEW |
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_PAGE_SYNC_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_SYNC_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_SYNC_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_SYNC_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 virtual ~NewTabPageSyncHandler(); | 25 virtual ~NewTabPageSyncHandler(); |
26 | 26 |
27 // WebUIMessageHandler implementation. | 27 // WebUIMessageHandler implementation. |
28 virtual WebUIMessageHandler* Attach(WebUI* web_ui) OVERRIDE; | 28 virtual WebUIMessageHandler* Attach(WebUI* web_ui) OVERRIDE; |
29 virtual void RegisterMessages() OVERRIDE; | 29 virtual void RegisterMessages() OVERRIDE; |
30 | 30 |
31 // Callback for "GetSyncMessage". | 31 // Callback for "GetSyncMessage". |
32 void HandleGetSyncMessage(const base::ListValue* args); | 32 void HandleGetSyncMessage(const base::ListValue* args); |
33 // Callback for "SyncLinkClicked". | 33 // Callback for "SyncLinkClicked". |
34 void HandleSyncLinkClicked(const base::ListValue* args); | 34 void HandleSyncLinkClicked(const base::ListValue* args); |
| 35 // Callback for "SyncTypeLinkClicked". |
| 36 void HandleSyncTypeLinkClicked(const base::ListValue* args); |
35 | 37 |
36 // ProfileSyncServiceObserver | 38 // ProfileSyncServiceObserver |
37 virtual void OnStateChanged() OVERRIDE; | 39 virtual void OnStateChanged() OVERRIDE; |
38 | 40 |
39 private: | 41 private: |
40 enum MessageType { | 42 enum MessageType { |
41 HIDE, | 43 HIDE, |
42 SYNC_ERROR, | 44 SYNC_ERROR, |
43 SYNC_PROMO | 45 SYNC_PROMO |
44 }; | 46 }; |
(...skipping 19 matching lines...) Expand all Loading... |
64 // Used to make sure we don't register ourselves twice if the user refreshes | 66 // Used to make sure we don't register ourselves twice if the user refreshes |
65 // the new tab page. | 67 // the new tab page. |
66 bool waiting_for_initial_page_load_; | 68 bool waiting_for_initial_page_load_; |
67 | 69 |
68 DISALLOW_COPY_AND_ASSIGN(NewTabPageSyncHandler); | 70 DISALLOW_COPY_AND_ASSIGN(NewTabPageSyncHandler); |
69 }; | 71 }; |
70 | 72 |
71 bool IsGoogleGAIACookieInstalled(); | 73 bool IsGoogleGAIACookieInstalled(); |
72 | 74 |
73 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_SYNC_HANDLER_H_ | 75 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_SYNC_HANDLER_H_ |
OLD | NEW |