2015-02-03 21:46:23 -08:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* 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 mozilla_dom_performancemark_h___
|
|
|
|
#define mozilla_dom_performancemark_h___
|
|
|
|
|
|
|
|
#include "mozilla/dom/PerformanceEntry.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
// http://www.w3.org/TR/user-timing/#performancemark
|
2015-03-21 09:28:04 -07:00
|
|
|
class PerformanceMark final : public PerformanceEntry
|
2015-02-03 21:46:23 -08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
PerformanceMark(nsPerformance* aPerformance,
|
|
|
|
const nsAString& aName);
|
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
2015-02-03 21:46:23 -08:00
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual DOMHighResTimeStamp StartTime() const override
|
2015-02-03 21:46:23 -08:00
|
|
|
{
|
|
|
|
return mStartTime;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual ~PerformanceMark();
|
|
|
|
DOMHighResTimeStamp mStartTime;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif /* mozilla_dom_performancemark_h___ */
|