Home | History | Annotate | Download | only in base
      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.
      7 
      8 #ifndef JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_
      9 #define JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_
     10 
     11 #include "base/basictypes.h"
     12 #include "base/memory/weak_ptr.h"
     13 #include "jingle/glue/task_pump.h"
     14 
     15 namespace buzz {
     16 class XmppTaskParentInterface;
     17 }  // namespace buzz
     18 
     19 namespace notifier {
     20 
     21 class FakeBaseTask {
     22  public:
     23   FakeBaseTask();
     24   ~FakeBaseTask();
     25 
     26   base::WeakPtr<buzz::XmppTaskParentInterface> AsWeakPtr();
     27 
     28  private:
     29   jingle_glue::TaskPump task_pump_;
     30   base::WeakPtr<buzz::XmppTaskParentInterface> base_task_;
     31 
     32   DISALLOW_COPY_AND_ASSIGN(FakeBaseTask);
     33 };
     34 
     35 }  // namespace notifier
     36 
     37 #endif  // JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_
     38