| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SYNC_INTERNALS_MESSAGE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SYNC_INTERNALS_MESSAGE_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SYNC_INTERNALS_MESSAGE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SYNC_INTERNALS_MESSAGE_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 // Fires an event to send updated info back to the page. | 52 // Fires an event to send updated info back to the page. |
| 53 void HandleRequestUpdatedAboutInfo(const base::ListValue* args); | 53 void HandleRequestUpdatedAboutInfo(const base::ListValue* args); |
| 54 | 54 |
| 55 // Fires and event to send the list of types back to the page. | 55 // Fires and event to send the list of types back to the page. |
| 56 void HandleRequestListOfTypes(const base::ListValue* args); | 56 void HandleRequestListOfTypes(const base::ListValue* args); |
| 57 | 57 |
| 58 // Handler for getAllNodes message. Needs a |request_id| argument. | 58 // Handler for getAllNodes message. Needs a |request_id| argument. |
| 59 void HandleGetAllNodes(const base::ListValue* args); | 59 void HandleGetAllNodes(const base::ListValue* args); |
| 60 | 60 |
| 61 // Handler for requests to get UserEvents tab visibility. |
| 62 void HandleRequestUserEventsVisibility(const base::ListValue* args); |
| 63 |
| 64 // Handler for writeUserEvent message. |
| 65 void HandleWriteUserEvent(const base::ListValue* args); |
| 66 |
| 61 // syncer::JsEventHandler implementation. | 67 // syncer::JsEventHandler implementation. |
| 62 void HandleJsEvent(const std::string& name, | 68 void HandleJsEvent(const std::string& name, |
| 63 const syncer::JsEventDetails& details) override; | 69 const syncer::JsEventDetails& details) override; |
| 64 | 70 |
| 65 // Callback used in GetAllNodes. | 71 // Callback used in GetAllNodes. |
| 66 void OnReceivedAllNodes(int request_id, | 72 void OnReceivedAllNodes(int request_id, |
| 67 std::unique_ptr<base::ListValue> nodes); | 73 std::unique_ptr<base::ListValue> nodes); |
| 68 | 74 |
| 69 // syncer::SyncServiceObserver implementation. | 75 // syncer::SyncServiceObserver implementation. |
| 70 void OnStateChanged(syncer::SyncService* sync) override; | 76 void OnStateChanged(syncer::SyncService* sync) override; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 138 |
| 133 // An abstraction of who creates the about sync info value map. | 139 // An abstraction of who creates the about sync info value map. |
| 134 AboutSyncDataDelegate about_sync_data_delegate_; | 140 AboutSyncDataDelegate about_sync_data_delegate_; |
| 135 | 141 |
| 136 base::WeakPtrFactory<SyncInternalsMessageHandler> weak_ptr_factory_; | 142 base::WeakPtrFactory<SyncInternalsMessageHandler> weak_ptr_factory_; |
| 137 | 143 |
| 138 DISALLOW_COPY_AND_ASSIGN(SyncInternalsMessageHandler); | 144 DISALLOW_COPY_AND_ASSIGN(SyncInternalsMessageHandler); |
| 139 }; | 145 }; |
| 140 | 146 |
| 141 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_INTERNALS_MESSAGE_HANDLER_H_ | 147 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_INTERNALS_MESSAGE_HANDLER_H_ |
| OLD | NEW |