2011-06-23 03:39:48 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -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/. */
|
2011-06-23 03:39:48 -07:00
|
|
|
#ifndef nsPerformance_h___
|
|
|
|
#define nsPerformance_h___
|
|
|
|
|
|
|
|
#include "nsIDOMPerformance.h"
|
|
|
|
#include "nsIDOMPerformanceTiming.h"
|
|
|
|
#include "nsIDOMPerformanceNavigation.h"
|
|
|
|
#include "nscore.h"
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsAutoPtr.h"
|
2012-06-14 19:31:55 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2011-06-23 03:39:48 -07:00
|
|
|
|
|
|
|
class nsIURI;
|
|
|
|
class nsDOMNavigationTiming;
|
2011-07-04 09:44:00 -07:00
|
|
|
class nsITimedChannel;
|
2011-06-23 03:39:48 -07:00
|
|
|
|
|
|
|
// Script "performance.timing" object
|
2012-06-14 19:31:55 -07:00
|
|
|
class nsPerformanceTiming MOZ_FINAL : public nsIDOMPerformanceTiming
|
2011-06-23 03:39:48 -07:00
|
|
|
{
|
|
|
|
public:
|
2011-07-04 09:44:00 -07:00
|
|
|
nsPerformanceTiming(nsDOMNavigationTiming* aDOMTiming, nsITimedChannel* aChannel);
|
2011-06-23 03:39:48 -07:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIDOMPERFORMANCETIMING
|
|
|
|
private:
|
|
|
|
~nsPerformanceTiming();
|
2011-07-04 09:44:00 -07:00
|
|
|
nsRefPtr<nsDOMNavigationTiming> mDOMTiming;
|
|
|
|
nsCOMPtr<nsITimedChannel> mChannel;
|
2011-06-23 03:39:48 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
// Script "performance.navigation" object
|
2012-06-14 19:31:55 -07:00
|
|
|
class nsPerformanceNavigation MOZ_FINAL : public nsIDOMPerformanceNavigation
|
2011-06-23 03:39:48 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsPerformanceNavigation(nsDOMNavigationTiming* data);
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIDOMPERFORMANCENAVIGATION
|
|
|
|
private:
|
|
|
|
~nsPerformanceNavigation();
|
|
|
|
nsRefPtr<nsDOMNavigationTiming> mData;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Script "performance" object
|
2012-06-14 19:31:55 -07:00
|
|
|
class nsPerformance MOZ_FINAL : public nsIDOMPerformance
|
2011-06-23 03:39:48 -07:00
|
|
|
{
|
|
|
|
public:
|
2011-07-04 09:44:00 -07:00
|
|
|
nsPerformance(nsDOMNavigationTiming* aDOMTiming, nsITimedChannel* aChannel);
|
2011-06-23 03:39:48 -07:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIDOMPERFORMANCE
|
|
|
|
|
|
|
|
private:
|
|
|
|
~nsPerformance();
|
|
|
|
|
2011-07-04 09:44:00 -07:00
|
|
|
nsRefPtr<nsDOMNavigationTiming> mDOMTiming;
|
|
|
|
nsCOMPtr<nsITimedChannel> mChannel;
|
2011-06-23 03:39:48 -07:00
|
|
|
nsCOMPtr<nsIDOMPerformanceTiming> mTiming;
|
|
|
|
nsCOMPtr<nsIDOMPerformanceNavigation> mNavigation;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsPerformance_h___ */
|
|
|
|
|