2015-06-10 14:58:30 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef MOZ_PROFILE_GATHERER_H
|
|
|
|
#define MOZ_PROFILE_GATHERER_H
|
|
|
|
|
|
|
|
#include "mozilla/dom/Promise.h"
|
|
|
|
|
2015-06-30 12:03:45 -07:00
|
|
|
class GeckoSampler;
|
2015-06-10 14:58:30 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
|
|
|
class ProfileGatherer final : public nsISupports
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
2015-06-30 12:03:45 -07:00
|
|
|
ProfileGatherer(GeckoSampler* aTicker,
|
2015-06-16 19:28:00 -07:00
|
|
|
double aSinceTime,
|
2015-06-10 14:58:30 -07:00
|
|
|
mozilla::dom::Promise* aPromise);
|
|
|
|
void WillGatherOOPProfile();
|
|
|
|
void GatheredOOPProfile();
|
|
|
|
void Start();
|
|
|
|
|
|
|
|
private:
|
|
|
|
~ProfileGatherer() {};
|
|
|
|
void Finish();
|
|
|
|
|
2015-10-17 22:24:48 -07:00
|
|
|
RefPtr<mozilla::dom::Promise> mPromise;
|
2015-06-30 12:03:45 -07:00
|
|
|
GeckoSampler* mTicker;
|
2015-06-16 19:28:00 -07:00
|
|
|
double mSinceTime;
|
2015-06-10 14:58:30 -07:00
|
|
|
uint32_t mPendingProfiles;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2015-06-16 19:28:00 -07:00
|
|
|
#endif
|