2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2015-02-04 08:46:23 +03: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 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 19:28:04 +03:00
|
|
|
class PerformanceMark final : public PerformanceEntry {
|
2015-02-04 08:46:23 +03:00
|
|
|
public:
|
2015-05-25 19:53:07 +03:00
|
|
|
PerformanceMark(nsISupports* aParent, const nsAString& aName,
|
|
|
|
DOMHighResTimeStamp aStartTime);
|
2015-02-04 08:46:23 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual JSObject* WrapObject(JSContext* aCx,
|
|
|
|
JS::Handle<JSObject*> aGivenProto) override;
|
2015-02-04 08:46:23 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual DOMHighResTimeStamp StartTime() const override { return mStartTime; }
|
2015-02-04 08:46:23 +03:00
|
|
|
|
2017-07-27 10:05:51 +03:00
|
|
|
size_t SizeOfIncludingThis(
|
|
|
|
mozilla::MallocSizeOf aMallocSizeOf) const override;
|
|
|
|
|
2015-02-04 08:46:23 +03:00
|
|
|
protected:
|
|
|
|
virtual ~PerformanceMark();
|
|
|
|
DOMHighResTimeStamp mStartTime;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif /* mozilla_dom_performancemark_h___ */
|