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 stand-in for stuff that expects a weak pointer to a BaseTask for | 5 // A stand-in for stuff that expects a weak pointer to a BaseTask for |
6 // testing. | 6 // testing. |
7 | 7 |
8 #ifndef JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_ | 8 #ifndef JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_ |
9 #define JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_ | 9 #define JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_ |
10 #pragma once | |
11 | 10 |
12 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
13 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
14 #include "jingle/notifier/base/task_pump.h" | 13 #include "jingle/notifier/base/task_pump.h" |
15 | 14 |
16 namespace buzz { | 15 namespace buzz { |
17 class XmppTaskParentInterface; | 16 class XmppTaskParentInterface; |
18 } // namespace buzz | 17 } // namespace buzz |
19 | 18 |
20 namespace notifier { | 19 namespace notifier { |
21 | 20 |
22 class FakeBaseTask { | 21 class FakeBaseTask { |
23 public: | 22 public: |
24 FakeBaseTask(); | 23 FakeBaseTask(); |
25 ~FakeBaseTask(); | 24 ~FakeBaseTask(); |
26 | 25 |
27 base::WeakPtr<buzz::XmppTaskParentInterface> AsWeakPtr(); | 26 base::WeakPtr<buzz::XmppTaskParentInterface> AsWeakPtr(); |
28 | 27 |
29 private: | 28 private: |
30 notifier::TaskPump task_pump_; | 29 notifier::TaskPump task_pump_; |
31 base::WeakPtr<buzz::XmppTaskParentInterface> base_task_; | 30 base::WeakPtr<buzz::XmppTaskParentInterface> base_task_; |
32 | 31 |
33 DISALLOW_COPY_AND_ASSIGN(FakeBaseTask); | 32 DISALLOW_COPY_AND_ASSIGN(FakeBaseTask); |
34 }; | 33 }; |
35 | 34 |
36 } // namespace notifier | 35 } // namespace notifier |
37 | 36 |
38 #endif // JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_ | 37 #endif // JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_ |
OLD | NEW |