Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: Source/core/dom/IdleCallbackDeadline.h

Issue 1316323002: Remove redundant DocumentLoadTiming references. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove redundant doc-time baselining Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/IdleCallbackDeadline.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IdleCallbackDeadline_h 5 #ifndef IdleCallbackDeadline_h
6 #define IdleCallbackDeadline_h 6 #define IdleCallbackDeadline_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class DocumentLoadTiming;
14
15 class IdleCallbackDeadline : public GarbageCollected<IdleCallbackDeadline>, publ ic ScriptWrappable { 13 class IdleCallbackDeadline : public GarbageCollected<IdleCallbackDeadline>, publ ic ScriptWrappable {
16 DEFINE_WRAPPERTYPEINFO(); 14 DEFINE_WRAPPERTYPEINFO();
17
18 public: 15 public:
19 enum class CallbackType { 16 enum class CallbackType {
20 CalledWhenIdle, 17 CalledWhenIdle,
21 CalledByTimeout 18 CalledByTimeout
22 }; 19 };
23 20
24 DEFINE_INLINE_TRACE() {} 21 static IdleCallbackDeadline* create(double deadlineSeconds, CallbackType cal lbackType)
25 static IdleCallbackDeadline* create(double deadlineMillis, CallbackType call backType, const DocumentLoadTiming& timing)
26 { 22 {
27 return new IdleCallbackDeadline(deadlineMillis, callbackType, timing); 23 return new IdleCallbackDeadline(deadlineSeconds, callbackType);
28 } 24 }
29 25
26 DEFINE_INLINE_TRACE() { }
27
30 double timeRemaining() const; 28 double timeRemaining() const;
31 29
32 bool didTimeout() const 30 bool didTimeout() const
33 { 31 {
34 return m_callbackType == CallbackType::CalledByTimeout; 32 return m_callbackType == CallbackType::CalledByTimeout;
35 } 33 }
36 34
37 private: 35 private:
38 IdleCallbackDeadline(double deadlineMillis, CallbackType, const DocumentLoad Timing&); 36 IdleCallbackDeadline(double deadlineSeconds, CallbackType);
39 37
40 double m_deadlineMillis; 38 double m_deadlineSeconds;
41 CallbackType m_callbackType; 39 CallbackType m_callbackType;
42 const DocumentLoadTiming& m_timing;
43 }; 40 };
44 } 41
42 } // namespace blink
45 43
46 #endif // IdleCallbackDeadline_h 44 #endif // IdleCallbackDeadline_h
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/IdleCallbackDeadline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698