| 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 // A notifier that uses p2p notifications based on XMPP push | 5 // A notifier that uses p2p notifications based on XMPP push |
| 6 // notifications. Used only for sync integration tests. | 6 // notifications. Used only for sync integration tests. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_P2P_NOTIFIER_H_ | 8 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_P2P_NOTIFIER_H_ |
| 9 #define CHROME_BROWSER_SYNC_NOTIFIER_P2P_NOTIFIER_H_ | 9 #define CHROME_BROWSER_SYNC_NOTIFIER_P2P_NOTIFIER_H_ |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 15 #include "chrome/browser/sync/notifier/sync_notifier.h" | 15 #include "chrome/browser/sync/notifier/sync_notifier.h" |
| 16 #include "chrome/browser/sync/syncable/model_type.h" | 16 #include "chrome/browser/sync/syncable/model_type.h" |
| 17 #include "jingle/notifier/listener/talk_mediator.h" | 17 #include "jingle/notifier/listener/talk_mediator.h" |
| 18 | 18 |
| 19 class MessageLoop; |
| 20 |
| 19 namespace notifier { | 21 namespace notifier { |
| 20 struct NotifierOptions; | 22 struct NotifierOptions; |
| 21 } // namespace | 23 } // namespace |
| 22 | 24 |
| 23 namespace sync_notifier { | 25 namespace sync_notifier { |
| 24 | 26 |
| 25 class P2PNotifier | 27 class P2PNotifier |
| 26 : public SyncNotifier, | 28 : public SyncNotifier, |
| 27 public notifier::TalkMediator::Delegate { | 29 public notifier::TalkMediator::Delegate { |
| 28 public: | 30 public: |
| (...skipping 25 matching lines...) Expand all Loading... |
| 54 | 56 |
| 55 // The actual notification listener. | 57 // The actual notification listener. |
| 56 scoped_ptr<notifier::TalkMediator> talk_mediator_; | 58 scoped_ptr<notifier::TalkMediator> talk_mediator_; |
| 57 // Whether we called Login() on |talk_mediator_| yet. | 59 // Whether we called Login() on |talk_mediator_| yet. |
| 58 bool logged_in_; | 60 bool logged_in_; |
| 59 // Whether |talk_mediator_| has notified us that notifications are | 61 // Whether |talk_mediator_| has notified us that notifications are |
| 60 // enabled. | 62 // enabled. |
| 61 bool notifications_enabled_; | 63 bool notifications_enabled_; |
| 62 | 64 |
| 63 syncable::ModelTypeSet enabled_types_; | 65 syncable::ModelTypeSet enabled_types_; |
| 66 MessageLoop* construction_message_loop_; |
| 67 MessageLoop* method_message_loop_; |
| 64 }; | 68 }; |
| 65 | 69 |
| 66 } | 70 } // namespace sync_notifier |
| 67 #endif // CHROME_BROWSER_SYNC_NOTIFIER_P2P_NOTIFIER_H_ | 71 #endif // CHROME_BROWSER_SYNC_NOTIFIER_P2P_NOTIFIER_H_ |
| OLD | NEW |