Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / jingle / notifier / base / fake_base_task.h
blob2cb6d77755438837b468ae2e9956a05655254459
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
3 // found in the LICENSE file.
4 //
5 // A stand-in for stuff that expects a weak pointer to a BaseTask for
6 // testing.
8 #ifndef JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_
9 #define JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_
11 #include "base/basictypes.h"
12 #include "base/memory/weak_ptr.h"
13 #include "jingle/glue/task_pump.h"
15 namespace buzz {
16 class XmppTaskParentInterface;
17 } // namespace buzz
19 namespace notifier {
21 class FakeBaseTask {
22 public:
23 FakeBaseTask();
24 ~FakeBaseTask();
26 base::WeakPtr<buzz::XmppTaskParentInterface> AsWeakPtr();
28 private:
29 jingle_glue::TaskPump task_pump_;
30 base::WeakPtr<buzz::XmppTaskParentInterface> base_task_;
32 DISALLOW_COPY_AND_ASSIGN(FakeBaseTask);
35 } // namespace notifier
37 #endif // JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_