OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 virtual void PendingScriptFinished(PendingScript*) = 0; | 51 virtual void PendingScriptFinished(PendingScript*) = 0; |
52 | 52 |
53 DEFINE_INLINE_VIRTUAL_TRACE() {} | 53 DEFINE_INLINE_VIRTUAL_TRACE() {} |
54 }; | 54 }; |
55 | 55 |
56 // A container for an external script which may be loaded and executed. | 56 // A container for an external script which may be loaded and executed. |
57 // This is used to receive a notification of "script is ready" | 57 // This is used to receive a notification of "script is ready" |
58 // https://html.spec.whatwg.org/#the-script-is-ready via PendingScriptClient. | 58 // https://html.spec.whatwg.org/#the-script-is-ready via PendingScriptClient. |
59 class CORE_EXPORT PendingScript | 59 class CORE_EXPORT PendingScript |
60 : public GarbageCollectedFinalized<PendingScript> { | 60 : public GarbageCollectedFinalized<PendingScript> { |
61 USING_PRE_FINALIZER(PendingScript, Dispose); | |
62 WTF_MAKE_NONCOPYABLE(PendingScript); | 61 WTF_MAKE_NONCOPYABLE(PendingScript); |
63 | 62 |
64 public: | 63 public: |
65 virtual ~PendingScript(); | 64 virtual ~PendingScript(); |
66 | 65 |
67 TextPosition StartingPosition() const { return starting_position_; } | 66 TextPosition StartingPosition() const { return starting_position_; } |
68 void MarkParserBlockingLoadStartTime(); | 67 void MarkParserBlockingLoadStartTime(); |
69 // Returns the time the load of this script started blocking the parser, or | 68 // Returns the time the load of this script started blocking the parser, or |
70 // zero if this script hasn't yet blocked the parser, in | 69 // zero if this script hasn't yet blocked the parser, in |
71 // monotonicallyIncreasingTime. | 70 // monotonicallyIncreasingTime. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 117 |
119 TextPosition starting_position_; // Only used for inline script tags. | 118 TextPosition starting_position_; // Only used for inline script tags. |
120 double parser_blocking_load_start_time_; | 119 double parser_blocking_load_start_time_; |
121 | 120 |
122 Member<PendingScriptClient> client_; | 121 Member<PendingScriptClient> client_; |
123 }; | 122 }; |
124 | 123 |
125 } // namespace blink | 124 } // namespace blink |
126 | 125 |
127 #endif // PendingScript_h | 126 #endif // PendingScript_h |
OLD | NEW |