Changeset 150935 in webkit
- Timestamp:
- May 29, 2013 4:17:59 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 2 added
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r150924 r150935 1758 1758 page/PageGroupLoadDeferrer.cpp 1759 1759 page/PageSerializer.cpp 1760 page/PageThrottler.cpp 1760 1761 page/PageVisibilityState.cpp 1761 1762 page/Performance.cpp -
trunk/Source/WebCore/ChangeLog
r150934 r150935 1 2013-05-28 Oliver Hunt <oliver@apple.com> 2 3 Add more accurate activity state tracking 4 https://bugs.webkit.org/show_bug.cgi?id=116893 5 6 Reviewed by Gavin Barraclough. 7 8 Add a hysteresis to Page activity throttling. We do this 9 through a PageThrottler class that now handles entering and 10 exiting throttling state, and adds a hysteresis to we can 11 limit the amount of on/off bouncing on the throttle. 12 13 Media elements now make use of this to disable timer throttling 14 while they are playing, and plugins use it to momentarily bounce 15 from throttled to unthrottled state. 16 17 * CMakeLists.txt: 18 * GNUmakefile.list.am: 19 * Target.pri: 20 * WebCore.exp.in: 21 * WebCore.vcproj/WebCore.vcproj: 22 * WebCore.vcxproj/WebCore.vcxproj: 23 * WebCore.vcxproj/WebCore.vcxproj.filters: 24 * WebCore.xcodeproj/project.pbxproj: 25 * html/HTMLMediaElement.cpp: 26 (WebCore::HTMLMediaElement::~HTMLMediaElement): 27 (WebCore::HTMLMediaElement::pageThrottlerIfPossible): 28 (WebCore): 29 (WebCore::HTMLMediaElement::playInternal): 30 (WebCore::HTMLMediaElement::pauseInternal): 31 * html/HTMLMediaElement.h: 32 (WebCore): 33 * html/MediaController.cpp: 34 (MediaController::unpause): 35 * page/ChromeClient.h: 36 (WebCore::ChromeClient::incrementActivePageCount): 37 (WebCore::ChromeClient::decrementActivePageCount): 38 (ChromeClient): 39 * page/Page.cpp: 40 (WebCore::Page::Page): 41 (WebCore::Page::~Page): 42 (WebCore::Page::setThrottled): 43 * page/Page.h: 44 (WebCore): 45 (Page): 46 (WebCore::Page::pageThrottler): 47 * page/PageThrottleState.h: Added. 48 * page/PageThrottler.cpp: Added. 49 (WebCore): 50 (WebCore::PageThrottler::PageThrottler): 51 (WebCore::PageThrottler::~PageThrottler): 52 (WebCore::PageThrottler::clearPage): 53 (WebCore::PageThrottler::throttlePage): 54 (WebCore::PageThrottler::unthrottlePage): 55 (WebCore::PageThrottler::setThrottled): 56 (WebCore::PageThrottler::preventThrottling): 57 (WebCore::PageThrottler::allowThrottling): 58 (WebCore::PageThrottler::stopThrottleHysteresisTimer): 59 (WebCore::PageThrottler::reportInterestingEvent): 60 (WebCore::PageThrottler::startThrottleHysteresisTimer): 61 (WebCore::PageThrottler::throttleHysteresisTimerFired): 62 * page/PageThrottler.h: Added. 63 (WebCore): 64 (PageThrottler): 65 (WebCore::PageThrottler::create): 66 (WebCore::PageThrottler::shouldThrottleAnimations): 67 (WebCore::PageThrottler::shouldThrottleTimers): 68 1 69 2013-05-29 Kent Tamura <tkent@chromium.org> 2 70 -
trunk/Source/WebCore/GNUmakefile.list.am
r150924 r150935 4260 4260 Source/WebCore/page/PageSerializer.cpp \ 4261 4261 Source/WebCore/page/PageSerializer.h \ 4262 Source/WebCore/page/PageThrottler.cpp \ 4263 Source/WebCore/page/PageThrottler.h \ 4262 4264 Source/WebCore/page/PageVisibilityState.cpp \ 4263 4265 Source/WebCore/page/PageVisibilityState.h \ -
trunk/Source/WebCore/Target.pri
r150924 r150935 935 935 page/PageGroup.cpp \ 936 936 page/PageGroupLoadDeferrer.cpp \ 937 page/PageThrottler.cpp \ 937 938 page/PageVisibilityState.cpp \ 938 939 page/Performance.cpp \ … … 2100 2101 page/Page.h \ 2101 2102 page/PageConsole.h \ 2103 page/PageThrottler.h \ 2102 2104 page/PageVisibilityState.h \ 2103 2105 page/PlugInClient.h \ -
trunk/Source/WebCore/WebCore.exp.in
r150873 r150935 278 278 __ZN7WebCore13NodeTraversal19nextAncestorSiblingEPKNS_4NodeE 279 279 __ZN7WebCore13NodeTraversal8previousEPKNS_4NodeES3_ 280 __ZN7WebCore13PageThrottler22reportInterestingEventEv 281 __ZN7WebCore13PageThrottlerD1Ev 280 282 __ZN7WebCore13QualifiedNameD1Ev 281 283 __ZN7WebCore13ResourceErrorC1EP7NSError -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r150876 r150935 27579 27579 > 27580 27580 </File> 27581 27581 <File 27582 27582 RelativePath="..\page\PageConsole.cpp" 27583 27583 > … … 27609 27609 <File 27610 27610 RelativePath="..\page\PageSerializer.h" 27611 > 27612 </File> 27613 <File 27614 RelativePath="..\page\PageThrottler.cpp" 27615 > 27616 </File> 27617 <File 27618 RelativePath="..\page\PageThrottler.h" 27611 27619 > 27612 27620 </File> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r150907 r150935 3938 3938 <ClCompile Include="..\page\PageGroupLoadDeferrer.cpp" /> 3939 3939 <ClCompile Include="..\page\PageSerializer.cpp" /> 3940 <ClCompile Include="..\page\PageThrottler.cpp" /> 3940 3941 <ClCompile Include="..\page\PageVisibilityState.cpp" /> 3941 3942 <ClCompile Include="..\page\Performance.cpp" /> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
r150907 r150935 5233 5233 <Filter>page</Filter> 5234 5234 </ClCompile> 5235 <ClCompile Include="..\page\PageThrottler.cpp"> 5236 <Filter>page</Filter> 5237 </ClCompile> 5235 5238 <ClCompile Include="..\page\PageVisibilityState.cpp"> 5236 5239 <Filter>page</Filter> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r150924 r150935 3396 3396 A718760E0B2A120100A16ECE /* DragActions.h in Headers */ = {isa = PBXBuildFile; fileRef = A718760D0B2A120100A16ECE /* DragActions.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3397 3397 A71878900B2D04AC00A16ECE /* DragControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A718788F0B2D04AC00A16ECE /* DragControllerMac.mm */; }; 3398 A7197F24175689C4007B9442 /* PageThrottler.h in Headers */ = {isa = PBXBuildFile; fileRef = A7197F23175689C4007B9442 /* PageThrottler.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3399 A7197F2617568AE5007B9442 /* PageThrottler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7197F2517568AE5007B9442 /* PageThrottler.cpp */; }; 3398 3400 A723F77B1484CA4C008C6DBE /* PlatformExportMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = A723F77A1484CA4C008C6DBE /* PlatformExportMacros.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3399 3401 A72763BF16689BFB002FCACB /* UserActionElementSet.h in Headers */ = {isa = PBXBuildFile; fileRef = A72763BE16689BFB002FCACB /* UserActionElementSet.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 9852 9854 A718760D0B2A120100A16ECE /* DragActions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DragActions.h; sourceTree = "<group>"; }; 9853 9855 A718788F0B2D04AC00A16ECE /* DragControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DragControllerMac.mm; sourceTree = "<group>"; }; 9856 A7197F23175689C4007B9442 /* PageThrottler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageThrottler.h; sourceTree = "<group>"; }; 9857 A7197F2517568AE5007B9442 /* PageThrottler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageThrottler.cpp; sourceTree = "<group>"; }; 9854 9858 A71A70C911AFB02000989D6D /* HTMLMeterElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLMeterElement.idl; sourceTree = "<group>"; }; 9855 9859 A7211F231678A54200957444 /* NodeRenderingTraversal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodeRenderingTraversal.cpp; sourceTree = "<group>"; }; … … 14748 14752 371E65CD13661EED00BEEDB0 /* PageSerializer.cpp */, 14749 14753 371E65CB13661EDC00BEEDB0 /* PageSerializer.h */, 14754 A7197F23175689C4007B9442 /* PageThrottler.h */, 14755 A7197F2517568AE5007B9442 /* PageThrottler.cpp */, 14750 14756 FFD5B977135CC97800D5E92A /* PageVisibilityState.cpp */, 14751 14757 FFD5B978135CC97800D5E92A /* PageVisibilityState.h */, … … 22842 22848 979F43D41075E44A0000F83B /* NavigationScheduler.h in Headers */, 22843 22849 A9C6E5A60D746458006442E9 /* Navigator.h in Headers */, 22850 A7197F24175689C4007B9442 /* PageThrottler.h in Headers */, 22844 22851 E12719C70EEEC16800F61213 /* NavigatorBase.h in Headers */, 22845 22852 9711460414EF009A00674FD9 /* NavigatorGeolocation.h in Headers */, … … 25868 25875 77EF62F312F9DB7400C77BD2 /* JSWebGLVertexArrayObjectOES.cpp in Sources */, 25869 25876 31C0FF3D0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.cpp in Sources */, 25877 A7197F2617568AE5007B9442 /* PageThrottler.cpp in Sources */, 25870 25878 A2E8AE3716A49840006BB3AA /* JSWebKitCSSFilterRule.cpp in Sources */, 25871 25879 310603741432819C00ABF4BA /* JSWebKitCSSFilterValue.cpp in Sources */, -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r150651 r150935 71 71 #include "Page.h" 72 72 #include "PageGroup.h" 73 #include "PageThrottler.h" 73 74 #include "RenderVideo.h" 74 75 #include "RenderView.h" … … 345 346 { 346 347 LOG(Media, "HTMLMediaElement::~HTMLMediaElement"); 348 349 if (!m_paused && m_pageThrottler) { 350 m_pageThrottler->allowThrottling(); 351 m_pageThrottler.clear(); 352 } 347 353 if (m_isWaitingUntilMediaCanStart) 348 354 document()->removeMediaCanStartListener(this); … … 2478 2484 } 2479 2485 2486 PageThrottler* HTMLMediaElement::pageThrottlerIfPossible() 2487 { 2488 if (m_pageThrottler) 2489 return m_pageThrottler.get(); 2490 2491 if (!document()) 2492 return 0; 2493 2494 if (Page* page = document()->page()) 2495 m_pageThrottler = page->pageThrottler(); 2496 2497 return m_pageThrottler.get(); 2498 } 2499 2480 2500 void HTMLMediaElement::playInternal() 2481 2501 { … … 2493 2513 2494 2514 if (m_paused) { 2515 if (PageThrottler* throttler = pageThrottlerIfPossible()) 2516 throttler->preventThrottling(); 2495 2517 m_paused = false; 2496 2518 invalidateCachedTime(); … … 2503 2525 } 2504 2526 m_autoplaying = false; 2505 2506 2527 updatePlayState(); 2507 2528 updateMediaController(); … … 2530 2551 2531 2552 if (!m_paused) { 2553 if (PageThrottler* throttler = m_pageThrottler.get()) 2554 throttler->preventThrottling(); 2532 2555 m_paused = true; 2533 2556 scheduleTimeupdateEvent(false); -
trunk/Source/WebCore/html/HTMLMediaElement.h
r150710 r150935 60 60 class HTMLSourceElement; 61 61 class HTMLTrackElement; 62 class KURL; 62 63 class MediaController; 63 64 class MediaControls; 64 65 class MediaError; 65 class KURL;66 class PageThrottler; 66 67 class TimeRanges; 67 68 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) … … 756 757 RefPtr<MediaController> m_mediaController; 757 758 759 PageThrottler* pageThrottlerIfPossible(); 760 RefPtr<PageThrottler> m_pageThrottler; 761 758 762 #if PLATFORM(MAC) 759 763 OwnPtr<DisplaySleepDisabler> m_sleepDisabler; -
trunk/Source/WebCore/html/MediaController.cpp
r148099 r150935 184 184 if (!m_paused) 185 185 return; 186 187 186 // the user agent must change the MediaController into a playing media controller, 188 187 m_paused = false; -
trunk/Source/WebCore/page/ChromeClient.h
r150876 r150935 363 363 virtual void didAddFooterLayer(GraphicsLayer*) { } 364 364 365 // These methods are used to report pages that are performing 366 // some task that we consider to be "active", and so the user 367 // would likely want the page to remain running uninterrupted. 368 virtual void incrementActivePageCount() { } 369 virtual void decrementActivePageCount() { } 370 365 371 protected: 366 372 virtual ~ChromeClient() { } -
trunk/Source/WebCore/page/Page.cpp
r150695 r150935 60 60 #include "PageConsole.h" 61 61 #include "PageGroup.h" 62 #include "PageThrottler.h" 62 63 #include "PlugInClient.h" 63 64 #include "PluginData.h" … … 185 186 , m_alternativeTextClient(pageClients.alternativeTextClient) 186 187 , m_scriptedAnimationsSuspended(false) 188 , m_pageThrottler(PageThrottler::create(this)) 187 189 , m_console(PageConsole::create(this)) 188 190 { … … 232 234 pageCounter.decrement(); 233 235 #endif 236 m_pageThrottler->clearPage(); 234 237 235 238 } … … 958 961 } 959 962 960 void Page::setThrottled(bool isThrottled) 961 { 962 for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext()) { 963 if (frame->document()) 964 frame->document()->scriptedAnimationControllerSetThrottled(isThrottled); 965 } 963 void Page::setThrottled(bool throttled) 964 { 965 m_pageThrottler->setThrottled(throttled); 966 966 } 967 967 -
trunk/Source/WebCore/page/Page.h
r150633 r150935 37 37 #include <wtf/HashSet.h> 38 38 #include <wtf/Noncopyable.h> 39 #include <wtf/RefCounted.h> 39 40 #include <wtf/text/WTFString.h> 40 41 … … 77 78 class PageConsole; 78 79 class PageGroup; 80 class PageThrottler; 79 81 class PlugInClient; 80 82 class PluginData; … … 111 113 WTF_MAKE_NONCOPYABLE(Page); 112 114 friend class Settings; 115 friend class PageThrottler; 116 113 117 public: 114 118 static void updateStyleForAllPagesAfterGlobalChangeInEnvironment(); … … 390 394 void resetSeenMediaEngines(); 391 395 396 PageThrottler* pageThrottler() { return m_pageThrottler.get(); } 397 392 398 PageConsole* console() { return m_console.get(); } 393 399 … … 528 534 529 535 bool m_scriptedAnimationsSuspended; 536 RefPtr<PageThrottler> m_pageThrottler; 537 530 538 OwnPtr<PageConsole> m_console; 531 539 -
trunk/Source/WebKit2/ChangeLog
r150925 r150935 1 2013-05-28 Oliver Hunt <oliver@apple.com> 2 3 Add more accurate activity state tracking 4 https://bugs.webkit.org/show_bug.cgi?id=116893 5 6 Reviewed by Gavin Barraclough. 7 8 This extends the logic in WebCore from a Page to Process 9 granularity, so we will avoid lowering the child process 10 priority if there is active content. This also plumbs in 11 the logic to allow plugins to report that they have done 12 something "interesting". Currently this is somewhat conservative 13 but even this is sufficient to fix some stuttering issues 14 that we've seen. 15 16 * Shared/ChildProcess.cpp: 17 (WebKit::ChildProcess::ChildProcess): 18 * Shared/ChildProcess.h: 19 (ChildProcess): 20 (WebKit::ChildProcess::processSuppressionEnabled): 21 (WebKit::ChildProcess::incrementActiveTaskCount): 22 (WebKit::ChildProcess::decrementActiveTaskCount): 23 * Shared/mac/ChildProcessMac.mm: 24 (WebKit): 25 (WebKit::ChildProcess::setProcessSuppressionEnabledInternal): 26 (WebKit::ChildProcess::setProcessSuppressionEnabled): 27 (WebKit::ChildProcess::incrementActiveTaskCount): 28 (WebKit::ChildProcess::decrementActiveTaskCount): 29 (WebKit::ChildProcess::suspensionHysteresisTimerFired): 30 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: 31 (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap): 32 (WebKit::NPRuntimeObjectMap::evaluate): 33 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: 34 (WebCore): 35 (NPRuntimeObjectMap): 36 * WebProcess/Plugins/PluginView.cpp: 37 (WebKit::PluginView::PluginView): 38 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 39 (WebKit::WebChromeClient::incrementActivePageCount): 40 (WebKit): 41 (WebKit::WebChromeClient::decrementActivePageCount): 42 * WebProcess/WebCoreSupport/WebChromeClient.h: 43 (WebChromeClient): 44 1 45 2013-05-29 Anders Carlsson <andersca@apple.com> 2 46 -
trunk/Source/WebKit2/Shared/ChildProcess.cpp
r150669 r150935 41 41 , m_terminationCounter(0) 42 42 , m_terminationTimer(RunLoop::main(), this, &ChildProcess::terminationTimerFired) 43 #if PLATFORM(MAC) 44 , m_activeTaskCount(0) 45 , m_shouldSuspend(false) 46 , m_suspensionHysteresisTimer(RunLoop::main(), this, &ChildProcess::suspensionHysteresisTimerFired) 47 #endif 43 48 { 44 49 } -
trunk/Source/WebKit2/Shared/ChildProcess.h
r150669 r150935 63 63 64 64 #if PLATFORM(MAC) 65 void setProcessSuppressionEnabled(bool); 65 66 bool processSuppressionEnabled() const { return !m_processSuppressionAssertion; } 66 void setProcessSuppressionEnabled(bool); 67 void incrementActiveTaskCount(); 68 void decrementActiveTaskCount(); 67 69 68 70 void setApplicationIsDaemon(); 71 #else 72 void incrementActiveTaskCount() { } 73 void decrementActiveTaskCount() { } 69 74 #endif 70 75 … … 110 115 111 116 #if PLATFORM(MAC) 117 void suspensionHysteresisTimerFired(); 118 void setProcessSuppressionEnabledInternal(bool); 119 size_t m_activeTaskCount; 120 bool m_shouldSuspend; 121 WebCore::RunLoop::Timer<ChildProcess> m_suspensionHysteresisTimer; 112 122 RetainPtr<id> m_processSuppressionAssertion; 113 123 #endif -
trunk/Source/WebKit2/Shared/mac/ChildProcessMac.mm
r150495 r150935 60 60 namespace WebKit { 61 61 62 void ChildProcess::setProcessSuppressionEnabled(bool processSuppressionEnabled) 62 static const double kSuspensionHysteresisSeconds = 5.0; 63 64 void ChildProcess::setProcessSuppressionEnabledInternal(bool processSuppressionEnabled) 63 65 { 64 66 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 … … 67 69 68 70 if (processSuppressionEnabled) { 71 ASSERT(!m_activeTaskCount); 69 72 [[NSProcessInfo processInfo] endActivity:m_processSuppressionAssertion.get()]; 70 73 m_processSuppressionAssertion.clear(); … … 76 79 UNUSED_PARAM(processSuppressionEnabled); 77 80 #endif 81 } 82 83 void ChildProcess::setProcessSuppressionEnabled(bool processSuppressionEnabled) 84 { 85 if (this->processSuppressionEnabled() == processSuppressionEnabled) 86 return; 87 if (m_shouldSuspend == processSuppressionEnabled) 88 return; 89 m_shouldSuspend = processSuppressionEnabled; 90 if (m_shouldSuspend) { 91 if (!m_activeTaskCount) 92 m_suspensionHysteresisTimer.startOneShot(kSuspensionHysteresisSeconds); 93 return; 94 } 95 setProcessSuppressionEnabledInternal(false); 96 } 97 98 void ChildProcess::incrementActiveTaskCount() 99 { 100 m_activeTaskCount++; 101 if (m_suspensionHysteresisTimer.isActive()) 102 m_suspensionHysteresisTimer.stop(); 103 if (m_activeTaskCount) 104 setProcessSuppressionEnabledInternal(false); 105 } 106 107 void ChildProcess::decrementActiveTaskCount() 108 { 109 ASSERT(m_activeTaskCount); 110 m_activeTaskCount--; 111 if (m_activeTaskCount) 112 return; 113 if (m_shouldSuspend) 114 m_suspensionHysteresisTimer.startOneShot(kSuspensionHysteresisSeconds); 115 } 116 117 void ChildProcess::suspensionHysteresisTimerFired() 118 { 119 ASSERT(!m_activeTaskCount); 120 ASSERT(m_shouldSuspend); 121 setProcessSuppressionEnabledInternal(true); 78 122 } 79 123 -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp
r149848 r150935 42 42 #include <WebCore/DOMWrapperWorld.h> 43 43 #include <WebCore/Frame.h> 44 #include <WebCore/Page.h> 45 #include <WebCore/PageThrottler.h> 44 46 #include <WebCore/ScriptController.h> 45 47 … … 50 52 51 53 52 NPRuntimeObjectMap::NPRuntimeObjectMap(PluginView* pluginView )54 NPRuntimeObjectMap::NPRuntimeObjectMap(PluginView* pluginView, PageThrottler* pageThrottler) 53 55 : m_pluginView(pluginView) 56 , m_pageThrottler(pageThrottler) 54 57 , m_finalizationTimer(RunLoop::main(), this, &NPRuntimeObjectMap::invalidateQueuedObjects) 55 58 { … … 183 186 bool NPRuntimeObjectMap::evaluate(NPObject* npObject, const String& scriptString, NPVariant* result) 184 187 { 188 m_pageThrottler->reportInterestingEvent(); 185 189 Strong<JSGlobalObject> globalObject(this->globalObject()->vm(), this->globalObject()); 186 190 if (!globalObject) -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h
r149848 r150935 46 46 } 47 47 48 namespace WebCore { 49 class PageThrottler; 50 } 51 48 52 namespace WebKit { 49 53 … … 55 59 class NPRuntimeObjectMap : private JSC::WeakHandleOwner { 56 60 public: 57 explicit NPRuntimeObjectMap(PluginView* );61 explicit NPRuntimeObjectMap(PluginView*, WebCore::PageThrottler*); 58 62 59 63 class PluginProtector { … … 96 100 97 101 PluginView* m_pluginView; 98 102 RefPtr<WebCore::PageThrottler> m_pageThrottler; 99 103 HashMap<JSC::JSObject*, NPJSObject*> m_npJSObjects; 100 104 HashMap<NPObject*, JSC::Weak<JSNPObject>> m_jsNPObjects; -
trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp
r150796 r150935 57 57 #include <WebCore/NetworkingContext.h> 58 58 #include <WebCore/Page.h> 59 #include <WebCore/PageThrottler.h> 59 60 #include <WebCore/PlatformMouseEvent.h> 60 61 #include <WebCore/ProtectionSpace.h> … … 278 279 , m_pendingURLRequestsTimer(RunLoop::main(), this, &PluginView::pendingURLRequestsTimerFired) 279 280 #if ENABLE(NETSCAPE_PLUGIN_API) 280 , m_npRuntimeObjectMap(this )281 , m_npRuntimeObjectMap(this, m_webPage->corePage()->pageThrottler()) 281 282 #endif 282 283 , m_manualStreamState(StreamStateInitial) -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r150669 r150935 901 901 } 902 902 903 void WebChromeClient::incrementActivePageCount() 904 { 905 WebProcess::shared().incrementActiveTaskCount(); 906 } 907 908 void WebChromeClient::decrementActivePageCount() 909 { 910 WebProcess::shared().decrementActiveTaskCount(); 911 } 912 903 913 } // namespace WebKit -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
r150441 r150935 234 234 virtual void didAddFooterLayer(WebCore::GraphicsLayer*) OVERRIDE; 235 235 236 virtual void incrementActivePageCount() OVERRIDE; 237 virtual void decrementActivePageCount() OVERRIDE; 238 236 239 String m_cachedToolTip; 237 240 mutable RefPtr<WebFrame> m_cachedFrameSetLargestFrame;
Note: See TracChangeset
for help on using the changeset viewer.