2007-03-22 10:30:00 -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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Base class for the XML and HTML content sinks, which construct a
|
|
|
|
* DOM based on information from the parser.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _nsContentSink_h_
|
|
|
|
#define _nsContentSink_h_
|
|
|
|
|
|
|
|
// Base class for contentsink implementations.
|
|
|
|
|
2013-05-29 13:43:41 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsICSSLoaderObserver.h"
|
|
|
|
#include "nsWeakReference.h"
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsAutoPtr.h"
|
|
|
|
#include "nsGkAtoms.h"
|
|
|
|
#include "nsITimer.h"
|
|
|
|
#include "nsStubDocumentObserver.h"
|
|
|
|
#include "nsIContentSink.h"
|
|
|
|
#include "prlog.h"
|
2008-02-08 14:07:51 -08:00
|
|
|
#include "nsCycleCollectionParticipant.h"
|
2009-06-25 06:13:38 -07:00
|
|
|
#include "nsThreadUtils.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
class nsIDocument;
|
|
|
|
class nsIURI;
|
|
|
|
class nsIChannel;
|
|
|
|
class nsIDocShell;
|
|
|
|
class nsIParser;
|
|
|
|
class nsIAtom;
|
|
|
|
class nsIChannel;
|
|
|
|
class nsIContent;
|
2013-01-04 19:12:24 -08:00
|
|
|
class nsViewManager;
|
2007-03-22 10:30:00 -07:00
|
|
|
class nsNodeInfoManager;
|
2007-04-20 15:59:18 -07:00
|
|
|
class nsScriptLoader;
|
2008-08-27 18:15:32 -07:00
|
|
|
class nsIApplicationCache;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2010-03-02 13:00:53 -08:00
|
|
|
namespace mozilla {
|
|
|
|
namespace css {
|
|
|
|
class Loader;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-06-25 12:59:42 -07:00
|
|
|
#ifdef DEBUG
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
extern PRLogModuleInfo* gContentSinkLogModuleInfo;
|
|
|
|
|
|
|
|
#define SINK_TRACE_CALLS 0x1
|
|
|
|
#define SINK_TRACE_REFLOW 0x2
|
|
|
|
#define SINK_ALWAYS_REFLOW 0x4
|
|
|
|
|
2012-08-09 00:09:40 -07:00
|
|
|
#define SINK_LOG_TEST(_lm, _bit) (int((_lm)->level) & (_bit))
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#define SINK_TRACE(_lm, _bit, _args) \
|
|
|
|
PR_BEGIN_MACRO \
|
|
|
|
if (SINK_LOG_TEST(_lm, _bit)) { \
|
|
|
|
PR_LogPrint _args; \
|
|
|
|
} \
|
|
|
|
PR_END_MACRO
|
|
|
|
|
|
|
|
#else
|
|
|
|
#define SINK_TRACE(_lm, _bit, _args)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#undef SINK_NO_INCREMENTAL
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
|
|
|
|
// 1/2 second fudge factor for window creation
|
|
|
|
#define NS_DELAY_FOR_WINDOW_CREATION 500000
|
|
|
|
|
|
|
|
class nsContentSink : public nsICSSLoaderObserver,
|
|
|
|
public nsSupportsWeakReference,
|
|
|
|
public nsStubDocumentObserver,
|
|
|
|
public nsITimerCallback
|
|
|
|
{
|
2008-02-08 14:07:51 -08:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsContentSink,
|
2012-01-20 03:16:27 -08:00
|
|
|
nsICSSLoaderObserver)
|
2007-03-22 10:30:00 -07:00
|
|
|
// nsITimerCallback
|
|
|
|
NS_DECL_NSITIMERCALLBACK
|
|
|
|
|
|
|
|
// nsICSSLoaderObserver
|
2011-09-28 23:19:26 -07:00
|
|
|
NS_IMETHOD StyleSheetLoaded(nsCSSStyleSheet* aSheet, bool aWasAlternate,
|
2013-05-29 13:43:41 -07:00
|
|
|
nsresult aStatus) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2008-07-16 20:16:23 -07:00
|
|
|
virtual nsresult ProcessMETATag(nsIContent* aContent);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// nsIContentSink implementation helpers
|
2008-10-30 14:31:00 -07:00
|
|
|
NS_HIDDEN_(nsresult) WillParseImpl(void);
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_HIDDEN_(nsresult) WillInterruptImpl(void);
|
|
|
|
NS_HIDDEN_(nsresult) WillResumeImpl(void);
|
|
|
|
NS_HIDDEN_(nsresult) DidProcessATokenImpl(void);
|
|
|
|
NS_HIDDEN_(void) WillBuildModelImpl(void);
|
2011-09-28 23:19:26 -07:00
|
|
|
NS_HIDDEN_(void) DidBuildModelImpl(bool aTerminated);
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_HIDDEN_(void) DropParserAndPerfHint(void);
|
2011-09-28 23:19:26 -07:00
|
|
|
bool IsScriptExecutingImpl();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
void NotifyAppend(nsIContent* aContent, uint32_t aStartIndex);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// nsIDocumentObserver
|
2010-10-20 00:41:05 -07:00
|
|
|
NS_DECL_NSIDOCUMENTOBSERVER_BEGINUPDATE
|
|
|
|
NS_DECL_NSIDOCUMENTOBSERVER_ENDUPDATE
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
virtual void UpdateChildCounts() = 0;
|
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
bool IsTimeToNotify();
|
|
|
|
bool LinkContextIsOurDocument(const nsSubstring& aAnchor);
|
2012-05-21 06:31:00 -07:00
|
|
|
bool Decode5987Format(nsAString& aEncoded);
|
2009-06-28 15:44:22 -07:00
|
|
|
|
2010-04-27 02:57:32 -07:00
|
|
|
static void InitializeStatics();
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
protected:
|
|
|
|
nsContentSink();
|
|
|
|
virtual ~nsContentSink();
|
|
|
|
|
2008-08-27 18:15:32 -07:00
|
|
|
enum CacheSelectionAction {
|
|
|
|
// There is no offline cache manifest specified by the document,
|
|
|
|
// or the document was loaded from a cache other than the one it
|
|
|
|
// specifies via its manifest attribute and IS NOT a top-level
|
|
|
|
// document, or an error occurred during the cache selection
|
|
|
|
// algorithm.
|
|
|
|
CACHE_SELECTION_NONE = 0,
|
|
|
|
|
|
|
|
// The offline cache manifest must be updated.
|
|
|
|
CACHE_SELECTION_UPDATE = 1,
|
|
|
|
|
|
|
|
// The document was loaded from a cache other than the one it
|
|
|
|
// specifies via its manifest attribute and IS a top-level
|
|
|
|
// document. In this case, the document is marked as foreign in
|
|
|
|
// the cache it was loaded from and must be reloaded from the
|
|
|
|
// correct cache (the one it specifies).
|
2008-11-05 16:01:07 -08:00
|
|
|
CACHE_SELECTION_RELOAD = 2,
|
|
|
|
|
|
|
|
// Some conditions require we must reselect the cache without the manifest
|
|
|
|
CACHE_SELECTION_RESELECT_WITHOUT_MANIFEST = 3
|
2008-08-27 18:15:32 -07:00
|
|
|
};
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
nsresult Init(nsIDocument* aDoc, nsIURI* aURI,
|
|
|
|
nsISupports* aContainer, nsIChannel* aChannel);
|
|
|
|
|
|
|
|
nsresult ProcessHTTPHeaders(nsIChannel* aChannel);
|
|
|
|
nsresult ProcessHeaderData(nsIAtom* aHeader, const nsAString& aValue,
|
2012-07-30 07:20:58 -07:00
|
|
|
nsIContent* aContent = nullptr);
|
2012-08-28 10:10:07 -07:00
|
|
|
nsresult ProcessLinkHeader(const nsAString& aLinkData);
|
|
|
|
nsresult ProcessLink(const nsSubstring& aAnchor,
|
2011-06-07 13:19:06 -07:00
|
|
|
const nsSubstring& aHref, const nsSubstring& aRel,
|
|
|
|
const nsSubstring& aTitle, const nsSubstring& aType,
|
|
|
|
const nsSubstring& aMedia);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
virtual nsresult ProcessStyleLink(nsIContent* aElement,
|
|
|
|
const nsSubstring& aHref,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool aAlternate,
|
2007-03-22 10:30:00 -07:00
|
|
|
const nsSubstring& aTitle,
|
|
|
|
const nsSubstring& aType,
|
|
|
|
const nsSubstring& aMedia);
|
|
|
|
|
2012-09-07 11:06:31 -07:00
|
|
|
void PrefetchHref(const nsAString &aHref, nsINode *aSource,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool aExplicit);
|
2008-08-27 18:15:32 -07:00
|
|
|
|
2008-11-07 15:00:26 -08:00
|
|
|
// aHref can either be the usual URI format or of the form "//www.hostname.com"
|
|
|
|
// without a scheme.
|
|
|
|
void PrefetchDNS(const nsAString &aHref);
|
|
|
|
|
2008-08-27 18:15:32 -07:00
|
|
|
// Gets the cache key (used to identify items in a cache) of the channel.
|
|
|
|
nsresult GetChannelCacheKey(nsIChannel* aChannel, nsACString& aCacheKey);
|
|
|
|
|
|
|
|
// There is an offline cache manifest attribute specified and the
|
|
|
|
// document is allowed to use the offline cache. Process the cache
|
|
|
|
// selection algorithm for this document and the manifest. Result is
|
|
|
|
// an action that must be taken on the manifest, see
|
|
|
|
// CacheSelectionAction enum above.
|
|
|
|
//
|
|
|
|
// @param aLoadApplicationCache
|
|
|
|
// The application cache from which the load originated, if
|
|
|
|
// any.
|
|
|
|
// @param aManifestURI
|
|
|
|
// The manifest URI listed in the document.
|
|
|
|
// @param aFetchedWithHTTPGetOrEquiv
|
|
|
|
// TRUE if this was fetched using the HTTP GET method.
|
|
|
|
// @param aAction
|
|
|
|
// Out parameter, returns the action that should be performed
|
|
|
|
// by the calling function.
|
|
|
|
nsresult SelectDocAppCache(nsIApplicationCache *aLoadApplicationCache,
|
|
|
|
nsIURI *aManifestURI,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool aFetchedWithHTTPGetOrEquiv,
|
2008-08-27 18:15:32 -07:00
|
|
|
CacheSelectionAction *aAction);
|
|
|
|
|
|
|
|
// There is no offline cache manifest attribute specified. Process
|
|
|
|
// the cache selection algorithm w/o the manifest. Result is an
|
|
|
|
// action that must be taken, see CacheSelectionAction enum
|
|
|
|
// above. In case the offline cache manifest has to be updated the
|
|
|
|
// manifest URI is returned in aManifestURI.
|
|
|
|
//
|
|
|
|
// @param aLoadApplicationCache
|
|
|
|
// The application cache from which the load originated, if
|
|
|
|
// any.
|
|
|
|
// @param aManifestURI
|
|
|
|
// Out parameter, returns the manifest URI of the cache that
|
|
|
|
// was selected.
|
|
|
|
// @param aAction
|
|
|
|
// Out parameter, returns the action that should be performed
|
|
|
|
// by the calling function.
|
|
|
|
nsresult SelectDocAppCacheNoManifest(nsIApplicationCache *aLoadApplicationCache,
|
|
|
|
nsIURI **aManifestURI,
|
|
|
|
CacheSelectionAction *aAction);
|
|
|
|
|
2009-06-28 15:44:22 -07:00
|
|
|
public:
|
2008-08-27 18:15:32 -07:00
|
|
|
// Searches for the offline cache manifest attribute and calls one
|
|
|
|
// of the above defined methods to select the document's application
|
|
|
|
// cache, let it be associated with the document and eventually
|
|
|
|
// schedule the cache update process.
|
2011-05-13 01:31:12 -07:00
|
|
|
// This method MUST be called with the empty string as the argument
|
|
|
|
// when there is no manifest attribute!
|
2010-02-01 23:43:18 -08:00
|
|
|
void ProcessOfflineManifest(const nsAString& aManifestSpec);
|
|
|
|
|
|
|
|
// Extracts the manifest attribute from the element if it is the root
|
|
|
|
// element and calls the above method.
|
2008-01-16 13:54:33 -08:00
|
|
|
void ProcessOfflineManifest(nsIContent *aElement);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2009-06-28 15:44:22 -07:00
|
|
|
protected:
|
2011-05-12 09:07:42 -07:00
|
|
|
// Tries to scroll to the URI's named anchor. Once we've successfully
|
|
|
|
// done that, further calls to this method will be ignored.
|
|
|
|
void ScrollToRef();
|
2007-04-20 15:59:18 -07:00
|
|
|
|
|
|
|
// Start layout. If aIgnorePendingSheets is true, this will happen even if
|
|
|
|
// we still have stylesheet loads pending. Otherwise, we'll wait until the
|
|
|
|
// stylesheets are all done loading.
|
2009-06-28 15:44:22 -07:00
|
|
|
public:
|
2011-09-28 23:19:26 -07:00
|
|
|
void StartLayout(bool aIgnorePendingSheets);
|
2010-08-27 22:54:57 -07:00
|
|
|
|
|
|
|
static void NotifyDocElementCreated(nsIDocument* aDoc);
|
|
|
|
|
2009-06-28 15:44:22 -07:00
|
|
|
protected:
|
2007-03-22 10:30:00 -07:00
|
|
|
void
|
2012-08-22 08:56:38 -07:00
|
|
|
FavorPerformanceHint(bool perfOverStarvation, uint32_t starvationDelay);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
inline int32_t GetNotificationInterval()
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
if (mDynamicLowerValue) {
|
|
|
|
return 1000;
|
|
|
|
}
|
|
|
|
|
2010-04-27 02:57:32 -07:00
|
|
|
return sNotificationInterval;
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual nsresult FlushTags() = 0;
|
|
|
|
|
2007-07-10 20:42:11 -07:00
|
|
|
// Later on we might want to make this more involved somehow
|
|
|
|
// (e.g. stop waiting after some timeout or whatnot).
|
2011-09-28 23:19:26 -07:00
|
|
|
bool WaitForPendingSheets() { return mPendingSheetCount > 0; }
|
2007-07-10 20:42:11 -07:00
|
|
|
|
2009-06-25 06:13:38 -07:00
|
|
|
void DoProcessLinkHeader();
|
|
|
|
|
2012-01-20 03:16:27 -08:00
|
|
|
void StopDeflecting() {
|
|
|
|
mDeflectedCount = sPerfDeflectCount;
|
|
|
|
}
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
private:
|
|
|
|
// People shouldn't be allocating this class directly. All subclasses should
|
|
|
|
// be allocated using a zeroing operator new.
|
|
|
|
void* operator new(size_t sz) CPP_THROW_NEW; // Not to be implemented
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
nsCOMPtr<nsIDocument> mDocument;
|
2012-01-20 03:16:27 -08:00
|
|
|
nsRefPtr<nsParserBase> mParser;
|
2007-03-22 10:30:00 -07:00
|
|
|
nsCOMPtr<nsIURI> mDocumentURI;
|
|
|
|
nsCOMPtr<nsIDocShell> mDocShell;
|
2010-03-02 13:00:53 -08:00
|
|
|
nsRefPtr<mozilla::css::Loader> mCSSLoader;
|
2007-03-22 10:30:00 -07:00
|
|
|
nsRefPtr<nsNodeInfoManager> mNodeInfoManager;
|
2007-04-20 15:59:18 -07:00
|
|
|
nsRefPtr<nsScriptLoader> mScriptLoader;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// back off timer notification after count
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t mBackoffCount;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// Time of last notification
|
2007-04-20 15:59:18 -07:00
|
|
|
// Note: mLastNotificationTime is only valid once mLayoutStarted is true.
|
2007-03-22 10:30:00 -07:00
|
|
|
PRTime mLastNotificationTime;
|
|
|
|
|
|
|
|
// Timer used for notification
|
|
|
|
nsCOMPtr<nsITimer> mNotificationTimer;
|
|
|
|
|
|
|
|
// Have we already called BeginUpdate for this set of content changes?
|
2012-08-22 08:56:38 -07:00
|
|
|
uint8_t mBeganUpdate : 1;
|
|
|
|
uint8_t mLayoutStarted : 1;
|
|
|
|
uint8_t mDynamicLowerValue : 1;
|
|
|
|
uint8_t mParsing : 1;
|
|
|
|
uint8_t mDroppedTimer : 1;
|
2007-04-20 15:59:18 -07:00
|
|
|
// If true, we deferred starting layout until sheets load
|
2012-08-22 08:56:38 -07:00
|
|
|
uint8_t mDeferredLayoutStart : 1;
|
2007-07-10 20:42:11 -07:00
|
|
|
// If true, we deferred notifications until sheets load
|
2012-08-22 08:56:38 -07:00
|
|
|
uint8_t mDeferredFlushTags : 1;
|
2009-05-17 07:22:55 -07:00
|
|
|
// If false, we're not ourselves a document observer; that means we
|
|
|
|
// shouldn't be performing any more content model notifications,
|
|
|
|
// since we're not longer updating our child counts.
|
2012-08-22 08:56:38 -07:00
|
|
|
uint8_t mIsDocumentObserver : 1;
|
2012-01-20 04:03:49 -08:00
|
|
|
// True if this is parser is a fragment parser or an HTML DOMParser.
|
|
|
|
// XML DOMParser leaves this to false for now!
|
2012-08-22 08:56:38 -07:00
|
|
|
uint8_t mRunsToCompletion : 1;
|
2011-05-12 09:07:42 -07:00
|
|
|
|
2009-05-19 08:54:42 -07:00
|
|
|
//
|
2007-03-22 10:30:00 -07:00
|
|
|
// -- Can interrupt parsing members --
|
2009-05-19 08:54:42 -07:00
|
|
|
//
|
|
|
|
|
|
|
|
// The number of tokens that have been processed since we measured
|
|
|
|
// if it's time to return to the main event loop.
|
2012-08-22 08:56:38 -07:00
|
|
|
uint32_t mDeflectedCount;
|
2009-05-19 08:54:42 -07:00
|
|
|
|
|
|
|
// Is there currently a pending event?
|
2011-09-28 23:19:26 -07:00
|
|
|
bool mHasPendingEvent;
|
2009-05-19 08:54:42 -07:00
|
|
|
|
|
|
|
// When to return to the main event loop
|
2012-08-22 08:56:38 -07:00
|
|
|
uint32_t mCurrentParseEndTime;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t mBeginLoadTime;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// Last mouse event or keyboard event time sampled by the content
|
|
|
|
// sink
|
2012-08-22 08:56:38 -07:00
|
|
|
uint32_t mLastSampledUserEventTime;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t mInMonolithicContainer;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t mInNotification;
|
|
|
|
uint32_t mUpdatesInNotification;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
uint32_t mPendingSheetCount;
|
2007-04-20 15:59:18 -07:00
|
|
|
|
2010-04-20 10:22:04 -07:00
|
|
|
nsRevocableEventPtr<nsRunnableMethod<nsContentSink, void, false> >
|
2009-06-25 06:13:38 -07:00
|
|
|
mProcessLinkHeaderEvent;
|
2010-04-27 02:57:32 -07:00
|
|
|
|
|
|
|
// Do we notify based on time?
|
2011-09-28 23:19:26 -07:00
|
|
|
static bool sNotifyOnTimer;
|
2010-04-27 02:57:32 -07:00
|
|
|
// Back off timer notification after count.
|
2012-08-22 08:56:38 -07:00
|
|
|
static int32_t sBackoffCount;
|
2010-04-27 02:57:32 -07:00
|
|
|
// Notification interval in microseconds
|
2012-08-22 08:56:38 -07:00
|
|
|
static int32_t sNotificationInterval;
|
2010-04-27 02:57:32 -07:00
|
|
|
// How many times to deflect in interactive/perf modes
|
2012-08-22 08:56:38 -07:00
|
|
|
static int32_t sInteractiveDeflectCount;
|
|
|
|
static int32_t sPerfDeflectCount;
|
2010-04-27 02:57:32 -07:00
|
|
|
// 0 = don't check for pending events
|
|
|
|
// 1 = don't deflect if there are pending events
|
|
|
|
// 2 = bail if there are pending events
|
2012-08-22 08:56:38 -07:00
|
|
|
static int32_t sPendingEventMode;
|
2010-04-27 02:57:32 -07:00
|
|
|
// How often to probe for pending events. 1=every token
|
2012-08-22 08:56:38 -07:00
|
|
|
static int32_t sEventProbeRate;
|
2010-04-27 02:57:32 -07:00
|
|
|
// How long to stay off the event loop in interactive/perf modes
|
2012-08-22 08:56:38 -07:00
|
|
|
static int32_t sInteractiveParseTime;
|
|
|
|
static int32_t sPerfParseTime;
|
2010-04-27 02:57:32 -07:00
|
|
|
// How long to be in interactive mode after an event
|
2012-08-22 08:56:38 -07:00
|
|
|
static int32_t sInteractiveTime;
|
2010-04-27 02:57:32 -07:00
|
|
|
// How long to stay in perf mode after initial loading
|
2012-08-22 08:56:38 -07:00
|
|
|
static int32_t sInitialPerfTime;
|
2010-04-27 02:57:32 -07:00
|
|
|
// Should we switch between perf-mode and interactive-mode
|
2012-08-22 08:56:38 -07:00
|
|
|
static int32_t sEnablePerfMode;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _nsContentSink_h_
|