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

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

Issue 1198863006: First version of PerformanceObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switch from microtask to timer for firing events. Created 5 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 #include "core/page/ChromeClient.h" 183 #include "core/page/ChromeClient.h"
184 #include "core/page/EventWithHitTestResults.h" 184 #include "core/page/EventWithHitTestResults.h"
185 #include "core/page/FocusController.h" 185 #include "core/page/FocusController.h"
186 #include "core/page/FrameTree.h" 186 #include "core/page/FrameTree.h"
187 #include "core/page/Page.h" 187 #include "core/page/Page.h"
188 #include "core/page/PointerLockController.h" 188 #include "core/page/PointerLockController.h"
189 #include "core/page/scrolling/ScrollingCoordinator.h" 189 #include "core/page/scrolling/ScrollingCoordinator.h"
190 #include "core/svg/SVGDocumentExtensions.h" 190 #include "core/svg/SVGDocumentExtensions.h"
191 #include "core/svg/SVGTitleElement.h" 191 #include "core/svg/SVGTitleElement.h"
192 #include "core/svg/SVGUseElement.h" 192 #include "core/svg/SVGUseElement.h"
193 #include "core/timing/PerformanceObserver.h"
193 #include "core/workers/SharedWorkerRepositoryClient.h" 194 #include "core/workers/SharedWorkerRepositoryClient.h"
194 #include "core/xml/parser/XMLDocumentParser.h" 195 #include "core/xml/parser/XMLDocumentParser.h"
195 #include "platform/DateComponents.h" 196 #include "platform/DateComponents.h"
196 #include "platform/EventDispatchForbiddenScope.h" 197 #include "platform/EventDispatchForbiddenScope.h"
197 #include "platform/Language.h" 198 #include "platform/Language.h"
198 #include "platform/LengthFunctions.h" 199 #include "platform/LengthFunctions.h"
199 #include "platform/Logging.h" 200 #include "platform/Logging.h"
200 #include "platform/PluginScriptForbiddenScope.h" 201 #include "platform/PluginScriptForbiddenScope.h"
201 #include "platform/RuntimeEnabledFeatures.h" 202 #include "platform/RuntimeEnabledFeatures.h"
202 #include "platform/ScriptForbiddenScope.h" 203 #include "platform/ScriptForbiddenScope.h"
(...skipping 4868 matching lines...) Expand 10 before | Expand all | Expand 10 after
5071 void Document::tasksWereResumed() 5072 void Document::tasksWereResumed()
5072 { 5073 {
5073 scriptRunner()->resume(); 5074 scriptRunner()->resume();
5074 5075
5075 if (m_parser) 5076 if (m_parser)
5076 m_parser->resumeScheduledTasks(); 5077 m_parser->resumeScheduledTasks();
5077 if (m_scriptedAnimationController) 5078 if (m_scriptedAnimationController)
5078 m_scriptedAnimationController->resume(); 5079 m_scriptedAnimationController->resume();
5079 5080
5080 MutationObserver::resumeSuspendedObservers(); 5081 MutationObserver::resumeSuspendedObservers();
5082 PerformanceObserver::resumeSuspendedObservers();
5081 } 5083 }
5082 5084
5083 // FIXME: suspendScheduledTasks(), resumeScheduledTasks(), tasksNeedSuspension() 5085 // FIXME: suspendScheduledTasks(), resumeScheduledTasks(), tasksNeedSuspension()
5084 // should be moved to LocalDOMWindow once it inherits ExecutionContext 5086 // should be moved to LocalDOMWindow once it inherits ExecutionContext
5085 void Document::suspendScheduledTasks() 5087 void Document::suspendScheduledTasks()
5086 { 5088 {
5087 ExecutionContext::suspendScheduledTasks(); 5089 ExecutionContext::suspendScheduledTasks();
5088 m_taskRunner->suspend(); 5090 m_taskRunner->suspend();
5089 } 5091 }
5090 5092
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
5801 #ifndef NDEBUG 5803 #ifndef NDEBUG
5802 using namespace blink; 5804 using namespace blink;
5803 void showLiveDocumentInstances() 5805 void showLiveDocumentInstances()
5804 { 5806 {
5805 WeakDocumentSet& set = liveDocumentSet(); 5807 WeakDocumentSet& set = liveDocumentSet();
5806 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5808 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5807 for (Document* document : set) 5809 for (Document* document : set)
5808 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5810 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5809 } 5811 }
5810 #endif 5812 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698