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

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: Code review comments. Name changes and moving statics to PerformanceBase. 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/DOMWindowPerformance.h"
194 #include "core/timing/Performance.h"
193 #include "core/workers/SharedWorkerRepositoryClient.h" 195 #include "core/workers/SharedWorkerRepositoryClient.h"
194 #include "core/xml/parser/XMLDocumentParser.h" 196 #include "core/xml/parser/XMLDocumentParser.h"
195 #include "platform/DateComponents.h" 197 #include "platform/DateComponents.h"
196 #include "platform/EventDispatchForbiddenScope.h" 198 #include "platform/EventDispatchForbiddenScope.h"
197 #include "platform/Language.h" 199 #include "platform/Language.h"
198 #include "platform/LengthFunctions.h" 200 #include "platform/LengthFunctions.h"
199 #include "platform/Logging.h" 201 #include "platform/Logging.h"
200 #include "platform/PluginScriptForbiddenScope.h" 202 #include "platform/PluginScriptForbiddenScope.h"
201 #include "platform/RuntimeEnabledFeatures.h" 203 #include "platform/RuntimeEnabledFeatures.h"
202 #include "platform/ScriptForbiddenScope.h" 204 #include "platform/ScriptForbiddenScope.h"
(...skipping 4868 matching lines...) Expand 10 before | Expand all | Expand 10 after
5071 void Document::tasksWereResumed() 5073 void Document::tasksWereResumed()
5072 { 5074 {
5073 scriptRunner()->resume(); 5075 scriptRunner()->resume();
5074 5076
5075 if (m_parser) 5077 if (m_parser)
5076 m_parser->resumeScheduledTasks(); 5078 m_parser->resumeScheduledTasks();
5077 if (m_scriptedAnimationController) 5079 if (m_scriptedAnimationController)
5078 m_scriptedAnimationController->resume(); 5080 m_scriptedAnimationController->resume();
5079 5081
5080 MutationObserver::resumeSuspendedObservers(); 5082 MutationObserver::resumeSuspendedObservers();
5083 if (m_domWindow)
5084 DOMWindowPerformance::performance(*m_domWindow)->resumeSuspendedObserver s();
5081 } 5085 }
5082 5086
5083 // FIXME: suspendScheduledTasks(), resumeScheduledTasks(), tasksNeedSuspension() 5087 // FIXME: suspendScheduledTasks(), resumeScheduledTasks(), tasksNeedSuspension()
5084 // should be moved to LocalDOMWindow once it inherits ExecutionContext 5088 // should be moved to LocalDOMWindow once it inherits ExecutionContext
5085 void Document::suspendScheduledTasks() 5089 void Document::suspendScheduledTasks()
5086 { 5090 {
5087 ExecutionContext::suspendScheduledTasks(); 5091 ExecutionContext::suspendScheduledTasks();
5088 m_taskRunner->suspend(); 5092 m_taskRunner->suspend();
5089 } 5093 }
5090 5094
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
5801 #ifndef NDEBUG 5805 #ifndef NDEBUG
5802 using namespace blink; 5806 using namespace blink;
5803 void showLiveDocumentInstances() 5807 void showLiveDocumentInstances()
5804 { 5808 {
5805 WeakDocumentSet& set = liveDocumentSet(); 5809 WeakDocumentSet& set = liveDocumentSet();
5806 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5810 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5807 for (Document* document : set) 5811 for (Document* document : set)
5808 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5812 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5809 } 5813 }
5810 #endif 5814 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698