1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #ifndef mozilla_plugins_ChildTimer_h
9 #define mozilla_plugins_ChildTimer_h
11 #include "PluginMessageUtils.h"
13 #include "base/timer.h"
18 class PluginInstanceChild
;
19 typedef void (*TimerFunc
)(NPP npp
, uint32_t timerID
);
25 * If initialization failed, ID() will return 0.
27 ChildTimer(PluginInstanceChild
* instance
,
33 uint32_t ID() const { return mID
; }
38 bool Equals(ChildTimer
* t
, uint32_t id
) const {
44 PluginInstanceChild
* mInstance
;
48 base::RepeatingTimer
<ChildTimer
> mTimer
;
52 static uint32_t gNextTimerID
;
55 } // namespace plugins
56 } // namespace mozilla
58 #endif // mozilla_plugins_ChildTimer_h