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

Side by Side Diff: Source/core/dom/ScriptedIdleTaskController.cpp

Issue 1309593003: Oilpan: fix build after r200992. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: DocumentLoadTiming is a part object; adjust Created 5 years, 4 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
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 #include "config.h" 5 #include "config.h"
6 #include "core/dom/ScriptedIdleTaskController.h" 6 #include "core/dom/ScriptedIdleTaskController.h"
7 7
8 #include "core/dom/ExecutionContext.h" 8 #include "core/dom/ExecutionContext.h"
9 #include "core/dom/IdleRequestCallback.h" 9 #include "core/dom/IdleRequestCallback.h"
10 #include "core/loader/DocumentLoadTiming.h" 10 #include "core/loader/DocumentLoadTiming.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 ScriptedIdleTaskController::ScriptedIdleTaskController(ExecutionContext* context , const DocumentLoadTiming& timing) 60 ScriptedIdleTaskController::ScriptedIdleTaskController(ExecutionContext* context , const DocumentLoadTiming& timing)
61 : ActiveDOMObject(context) 61 : ActiveDOMObject(context)
62 , m_timing(timing) 62 , m_timing(timing)
63 , m_scheduler(Platform::current()->currentThread()->scheduler()) 63 , m_scheduler(Platform::current()->currentThread()->scheduler())
64 , m_nextCallbackId(0) 64 , m_nextCallbackId(0)
65 , m_suspended(false) 65 , m_suspended(false)
66 { 66 {
67 suspendIfNeeded(); 67 suspendIfNeeded();
68 } 68 }
69 69
70 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(ScriptedIdleTaskController); 70 ScriptedIdleTaskController::~ScriptedIdleTaskController()
71 {
72 }
71 73
72 DEFINE_TRACE(ScriptedIdleTaskController) 74 DEFINE_TRACE(ScriptedIdleTaskController)
73 { 75 {
76 visitor->trace(m_callbacks);
74 ActiveDOMObject::trace(visitor); 77 ActiveDOMObject::trace(visitor);
75 visitor->trace(m_callbacks);
76 } 78 }
77 79
78 ScriptedIdleTaskController::CallbackId ScriptedIdleTaskController::registerCallb ack(IdleRequestCallback* callback, double timeoutMillis) 80 ScriptedIdleTaskController::CallbackId ScriptedIdleTaskController::registerCallb ack(IdleRequestCallback* callback, double timeoutMillis)
79 { 81 {
80 CallbackId id = ++m_nextCallbackId; 82 CallbackId id = ++m_nextCallbackId;
81 m_callbacks.set(id, callback); 83 m_callbacks.set(id, callback);
82 84
83 RefPtr<internal::IdleRequestCallbackWrapper> callbackWrapper = internal::Idl eRequestCallbackWrapper::create(id, this); 85 RefPtr<internal::IdleRequestCallbackWrapper> callbackWrapper = internal::Idl eRequestCallbackWrapper::create(id, this);
84 m_scheduler->postIdleTask(FROM_HERE, WTF::bind<double>(&internal::IdleReques tCallbackWrapper::idleTaskFired, callbackWrapper)); 86 m_scheduler->postIdleTask(FROM_HERE, WTF::bind<double>(&internal::IdleReques tCallbackWrapper::idleTaskFired, callbackWrapper));
85 if (timeoutMillis > 0) 87 if (timeoutMillis > 0)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 m_scheduler->postIdleTask(FROM_HERE, WTF::bind<double>(&internal::IdleRe questCallbackWrapper::idleTaskFired, callbackWrapper)); 153 m_scheduler->postIdleTask(FROM_HERE, WTF::bind<double>(&internal::IdleRe questCallbackWrapper::idleTaskFired, callbackWrapper));
152 } 154 }
153 } 155 }
154 156
155 bool ScriptedIdleTaskController::hasPendingActivity() const 157 bool ScriptedIdleTaskController::hasPendingActivity() const
156 { 158 {
157 return !m_callbacks.isEmpty(); 159 return !m_callbacks.isEmpty();
158 } 160 }
159 161
160 } // namespace blink 162 } // namespace blink
OLDNEW
« Source/core/dom/ScriptedIdleTaskController.h ('K') | « Source/core/dom/ScriptedIdleTaskController.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698