1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/base/public/nsITimedChannel.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,68 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#include "nsISupports.idl" 1.9 +%{C++ 1.10 +namespace mozilla { 1.11 +class TimeStamp; 1.12 +} 1.13 +%} 1.14 + 1.15 +native TimeStamp(mozilla::TimeStamp); 1.16 + 1.17 +// All properties return zero if the value is not available 1.18 +[scriptable, uuid(E94AB245-B40D-4154-8B7F-B6E0F2461031)] 1.19 +interface nsITimedChannel : nsISupports { 1.20 + // Set this attribute to true to enable collection of timing data. 1.21 + // channelCreationTime will be available even with this attribute set to 1.22 + // false. 1.23 + attribute boolean timingEnabled; 1.24 + 1.25 + // The number of redirects 1.26 + attribute uint16_t redirectCount; 1.27 + 1.28 + [noscript] readonly attribute TimeStamp channelCreation; 1.29 + [noscript] readonly attribute TimeStamp asyncOpen; 1.30 + 1.31 + // The following are only set when the document is not (only) read from the 1.32 + // cache 1.33 + [noscript] readonly attribute TimeStamp domainLookupStart; 1.34 + [noscript] readonly attribute TimeStamp domainLookupEnd; 1.35 + [noscript] readonly attribute TimeStamp connectStart; 1.36 + [noscript] readonly attribute TimeStamp connectEnd; 1.37 + [noscript] readonly attribute TimeStamp requestStart; 1.38 + [noscript] readonly attribute TimeStamp responseStart; 1.39 + [noscript] readonly attribute TimeStamp responseEnd; 1.40 + 1.41 + // The redirect attributes timings must be writeble, se we can transfer 1.42 + // the data from one channel to the redirected channel. 1.43 + [noscript] attribute TimeStamp redirectStart; 1.44 + [noscript] attribute TimeStamp redirectEnd; 1.45 + 1.46 + // The initiator type 1.47 + [noscript] attribute AString initiatorType; 1.48 + 1.49 + // This flag should be set to false only if a cross-domain redirect occurred 1.50 + [noscript] attribute boolean allRedirectsSameOrigin; 1.51 + 1.52 + // The following are only set if the document is (partially) read from the 1.53 + // cache 1.54 + [noscript] readonly attribute TimeStamp cacheReadStart; 1.55 + [noscript] readonly attribute TimeStamp cacheReadEnd; 1.56 + 1.57 + // All following are PRTime versions of the above. 1.58 + readonly attribute PRTime channelCreationTime; 1.59 + readonly attribute PRTime asyncOpenTime; 1.60 + readonly attribute PRTime domainLookupStartTime; 1.61 + readonly attribute PRTime domainLookupEndTime; 1.62 + readonly attribute PRTime connectStartTime; 1.63 + readonly attribute PRTime connectEndTime; 1.64 + readonly attribute PRTime requestStartTime; 1.65 + readonly attribute PRTime responseStartTime; 1.66 + readonly attribute PRTime responseEndTime; 1.67 + readonly attribute PRTime cacheReadStartTime; 1.68 + readonly attribute PRTime cacheReadEndTime; 1.69 + readonly attribute PRTime redirectStartTime; 1.70 + readonly attribute PRTime redirectEndTime; 1.71 +};