| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 SYNC_INTERNAL_API_JS_SYNC_MANAGER_OBSERVER_H_ | 5 #ifndef SYNC_INTERNAL_API_JS_SYNC_MANAGER_OBSERVER_H_ |
| 6 #define SYNC_INTERNAL_API_JS_SYNC_MANAGER_OBSERVER_H_ | 6 #define SYNC_INTERNAL_API_JS_SYNC_MANAGER_OBSERVER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // Routes SyncManager events to a JsEventHandler. | 26 // Routes SyncManager events to a JsEventHandler. |
| 27 class JsSyncManagerObserver : public sync_api::SyncManager::Observer { | 27 class JsSyncManagerObserver : public sync_api::SyncManager::Observer { |
| 28 public: | 28 public: |
| 29 JsSyncManagerObserver(); | 29 JsSyncManagerObserver(); |
| 30 virtual ~JsSyncManagerObserver(); | 30 virtual ~JsSyncManagerObserver(); |
| 31 | 31 |
| 32 void SetJsEventHandler(const WeakHandle<JsEventHandler>& event_handler); | 32 void SetJsEventHandler(const WeakHandle<JsEventHandler>& event_handler); |
| 33 | 33 |
| 34 // sync_api::SyncManager::Observer implementation. | 34 // sync_api::SyncManager::Observer implementation. |
| 35 virtual void OnSyncCycleCompleted( | 35 virtual void OnSyncCycleCompleted( |
| 36 const sessions::SyncSessionSnapshot* snapshot) OVERRIDE; | 36 const sessions::SyncSessionSnapshot& snapshot) OVERRIDE; |
| 37 virtual void OnConnectionStatusChange( | 37 virtual void OnConnectionStatusChange( |
| 38 sync_api::ConnectionStatus status) OVERRIDE; | 38 sync_api::ConnectionStatus status) OVERRIDE; |
| 39 virtual void OnUpdatedToken(const std::string& token) OVERRIDE; | 39 virtual void OnUpdatedToken(const std::string& token) OVERRIDE; |
| 40 virtual void OnPassphraseRequired( | 40 virtual void OnPassphraseRequired( |
| 41 sync_api::PassphraseRequiredReason reason, | 41 sync_api::PassphraseRequiredReason reason, |
| 42 const sync_pb::EncryptedData& pending_keys) OVERRIDE; | 42 const sync_pb::EncryptedData& pending_keys) OVERRIDE; |
| 43 virtual void OnPassphraseAccepted() OVERRIDE; | 43 virtual void OnPassphraseAccepted() OVERRIDE; |
| 44 virtual void OnBootstrapTokenUpdated( | 44 virtual void OnBootstrapTokenUpdated( |
| 45 const std::string& bootstrap_token) OVERRIDE; | 45 const std::string& bootstrap_token) OVERRIDE; |
| 46 virtual void OnEncryptedTypesChanged( | 46 virtual void OnEncryptedTypesChanged( |
| (...skipping 13 matching lines...) Expand all Loading... |
| 60 const std::string& name, const JsEventDetails& details); | 60 const std::string& name, const JsEventDetails& details); |
| 61 | 61 |
| 62 WeakHandle<JsEventHandler> event_handler_; | 62 WeakHandle<JsEventHandler> event_handler_; |
| 63 | 63 |
| 64 DISALLOW_COPY_AND_ASSIGN(JsSyncManagerObserver); | 64 DISALLOW_COPY_AND_ASSIGN(JsSyncManagerObserver); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } // namespace browser_sync | 67 } // namespace browser_sync |
| 68 | 68 |
| 69 #endif // SYNC_INTERNAL_API_JS_SYNC_MANAGER_OBSERVER_H_ | 69 #endif // SYNC_INTERNAL_API_JS_SYNC_MANAGER_OBSERVER_H_ |
| OLD | NEW |