Changeset 136171 in webkit
- Timestamp:
- Nov 29, 2012, 3:07:23 PM (14 years ago)
- Location:
- trunk/Source
- Files:
-
- 12 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/inspector/InspectorClient.h (modified) (1 diff)
-
WebCore/inspector/InspectorController.cpp (modified) (1 diff)
-
WebCore/inspector/InspectorController.h (modified) (1 diff)
-
WebCore/inspector/InspectorInstrumentation.cpp (modified) (1 diff)
-
WebCore/inspector/InspectorInstrumentation.h (modified) (3 diffs)
-
WebCore/inspector/InspectorTimelineAgent.cpp (modified) (2 diffs)
-
WebKit/chromium/ChangeLog (modified) (1 diff)
-
WebKit/chromium/src/InspectorClientImpl.cpp (modified) (3 diffs)
-
WebKit/chromium/src/InspectorClientImpl.h (modified) (4 diffs)
-
WebKit/chromium/src/WebDevToolsAgentImpl.cpp (modified) (4 diffs)
-
WebKit/chromium/src/WebDevToolsAgentImpl.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r136168 r136171 1 2012-11-29 Eugene Klyuchnikov <eustas@chromium.org> 2 3 Web Inspector: Web Inspector: Make main-thread monitoring go through InspectorController. 4 https://bugs.webkit.org/show_bug.cgi?id=103550 5 6 Reviewed by Pavel Feldman. 7 8 InspectorInstrumentation was a wrong path. 9 10 * inspector/InspectorClient.h: Remove start/stop methods. 11 * inspector/InspectorController.cpp: 12 Dispatch main thread activity notifications. 13 * inspector/InspectorController.h: Ditto. 14 * inspector/InspectorInstrumentation.cpp: Remove dispatching. 15 * inspector/InspectorInstrumentation.h: Ditto. 16 * inspector/InspectorTimelineAgent.cpp: 17 Do not subscribe for notifications explicitly. 18 1 19 2012-11-29 Adam Barth <abarth@webkit.org> 2 20 -
trunk/Source/WebCore/inspector/InspectorClient.h
r135881 r136171 59 59 virtual void clearBrowserCookies() { } 60 60 virtual bool canMonitorMainThread() { return false; } 61 virtual void startMainThreadMonitoring() { }62 virtual void stopMainThreadMonitoring() { }63 61 64 62 virtual bool canOverrideDeviceMetrics() { return false; } -
trunk/Source/WebCore/inspector/InspectorController.cpp
r135713 r136171 400 400 } 401 401 402 void InspectorController::willProcessTask() 403 { 404 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspectorTimelineAgent()) 405 timelineAgent->willProcessTask(); 406 } 407 408 void InspectorController::didProcessTask() 409 { 410 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspectorTimelineAgent()) 411 timelineAgent->didProcessTask(); 412 } 413 402 414 } // namespace WebCore 403 415 -
trunk/Source/WebCore/inspector/InspectorController.h
r135721 r136171 120 120 void reportMemoryUsage(MemoryObjectInfo*) const; 121 121 122 void willProcessTask(); 123 void didProcessTask(); 124 122 125 private: 123 126 InspectorController(Page*, InspectorClient*); -
trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp
r134931 r136171 608 608 } 609 609 610 void InspectorInstrumentation::willProcessTaskImpl(InstrumentingAgents* instrumentingAgents)611 {612 if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent())613 timelineAgent->willProcessTask();614 }615 616 void InspectorInstrumentation::didProcessTaskImpl(InstrumentingAgents* instrumentingAgents)617 {618 if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent())619 timelineAgent->didProcessTask();620 }621 622 610 void InspectorInstrumentation::applyUserAgentOverrideImpl(InstrumentingAgents* instrumentingAgents, String* userAgent) 623 611 { -
trunk/Source/WebCore/inspector/InspectorInstrumentation.h
r134931 r136171 155 155 static InspectorInstrumentationCookie willProcessRule(Document*, const StyleRule*); 156 156 static void didProcessRule(const InspectorInstrumentationCookie&); 157 static void willProcessTask(Page*);158 static void didProcessTask(Page*);159 157 160 158 static void applyUserAgentOverride(Frame*, String*); … … 349 347 static InspectorInstrumentationCookie willProcessRuleImpl(InstrumentingAgents*, const StyleRule*); 350 348 static void didProcessRuleImpl(const InspectorInstrumentationCookie&); 351 static void willProcessTaskImpl(InstrumentingAgents*);352 static void didProcessTaskImpl(InstrumentingAgents*);353 349 354 350 static void applyUserAgentOverrideImpl(InstrumentingAgents*, String*); … … 1033 1029 } 1034 1030 1035 inline void InspectorInstrumentation::willProcessTask(Page* page)1036 {1037 #if ENABLE(INSPECTOR)1038 FAST_RETURN_IF_NO_FRONTENDS(void());1039 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))1040 willProcessTaskImpl(instrumentingAgents);1041 #endif1042 }1043 1044 inline void InspectorInstrumentation::didProcessTask(Page* page)1045 {1046 #if ENABLE(INSPECTOR)1047 FAST_RETURN_IF_NO_FRONTENDS(void());1048 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))1049 didProcessTaskImpl(instrumentingAgents);1050 #endif1051 }1052 1053 1031 inline void InspectorInstrumentation::applyUserAgentOverride(Frame* frame, String* userAgent) 1054 1032 { -
trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp
r134023 r136171 169 169 m_timestampOffset = currentTime() - monotonicallyIncreasingTime(); 170 170 171 if (m_client)172 m_client->startMainThreadMonitoring();173 174 171 m_instrumentingAgents->setInspectorTimelineAgent(this); 175 172 ScriptGCEvent::addEventListener(this); … … 181 178 if (!m_state->getBoolean(TimelineAgentState::timelineAgentEnabled)) 182 179 return; 183 184 if (m_client)185 m_client->stopMainThreadMonitoring();186 180 187 181 m_instrumentingAgents->setInspectorTimelineAgent(0); -
trunk/Source/WebKit/chromium/ChangeLog
r136138 r136171 1 2012-11-29 Eugene Klyuchnikov <eustas@chromium.org> 2 3 Web Inspector: Make main-thread monitoring go through InspectorController. 4 https://bugs.webkit.org/show_bug.cgi?id=103550 5 6 Reviewed by Pavel Feldman. 7 8 InspectorInstrumentation was a wrong path 9 10 * src/InspectorClientImpl.cpp: Remove TaskObserver implementation, and 11 listen/unlisten methods. 12 * src/InspectorClientImpl.h: Ditto. 13 * src/WebDevToolsAgentImpl.cpp: 14 (WebKit::WebDevToolsAgentImpl::attach): 15 Subscribe for main thread activity events. 16 (WebKit::WebDevToolsAgentImpl::detach): 17 Unsubscribe for main thread activity events. 18 (WebKit::WebDevToolsAgentImpl::willProcessTask): Implement TaskObserver 19 interface. Froward to InspectorController. 20 (WebKit::WebDevToolsAgentImpl::didProcessTask): Ditto. 21 * src/WebDevToolsAgentImpl.h: Implement TaskObserver interface. 22 1 23 2012-11-29 Stephen Chenney <schenney@chromium.org> 2 24 -
trunk/Source/WebKit/chromium/src/InspectorClientImpl.cpp
r135881 r136171 40 40 #include "WebViewClient.h" 41 41 #include "WebViewImpl.h" 42 #include <public/Platform.h>43 42 #include <public/WebRect.h> 44 43 #include <public/WebURL.h> … … 137 136 } 138 137 139 void InspectorClientImpl::startMainThreadMonitoring()140 {141 WebKit::Platform::current()->currentThread()->addTaskObserver(this);142 }143 144 void InspectorClientImpl::stopMainThreadMonitoring()145 {146 WebKit::Platform::current()->currentThread()->removeTaskObserver(this);147 }148 149 138 bool InspectorClientImpl::canOverrideDeviceMetrics() 150 139 { … … 201 190 } 202 191 203 void InspectorClientImpl::willProcessTask()204 {205 InspectorInstrumentation::willProcessTask(m_inspectedWebView->page());206 }207 208 void InspectorClientImpl::didProcessTask()209 {210 InspectorInstrumentation::didProcessTask(m_inspectedWebView->page());211 }212 213 192 WebDevToolsAgentImpl* InspectorClientImpl::devToolsAgent() 214 193 { -
trunk/Source/WebKit/chromium/src/InspectorClientImpl.h
r135881 r136171 35 35 #include "InspectorController.h" 36 36 #include "InspectorFrontendChannel.h" 37 #include <public/WebThread.h>38 37 #include <wtf/OwnPtr.h> 39 38 … … 45 44 46 45 class InspectorClientImpl : public WebCore::InspectorClient, 47 public WebCore::InspectorFrontendChannel, 48 public WebThread::TaskObserver { 46 public WebCore::InspectorFrontendChannel { 49 47 public: 50 48 InspectorClientImpl(WebViewImpl*); … … 71 69 72 70 virtual bool canMonitorMainThread(); 73 virtual void startMainThreadMonitoring();74 virtual void stopMainThreadMonitoring();75 71 76 72 virtual bool canOverrideDeviceMetrics(); … … 90 86 91 87 private: 92 // WebThread::TaskObserver93 virtual void willProcessTask();94 virtual void didProcessTask();95 96 88 WebDevToolsAgentImpl* devToolsAgent(); 97 89 -
trunk/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
r133191 r136171 57 57 #include "WebViewClient.h" 58 58 #include "WebViewImpl.h" 59 #include <public/Platform.h> 59 60 #include <public/WebRect.h> 60 61 #include <public/WebString.h> … … 383 384 inspectorController()->connectFrontend(this); 384 385 inspectorController()->webViewResized(m_webViewImpl->size()); 386 WebKit::Platform::current()->currentThread()->addTaskObserver(this); 385 387 m_attached = true; 386 388 } … … 398 400 void WebDevToolsAgentImpl::detach() 399 401 { 402 WebKit::Platform::current()->currentThread()->removeTaskObserver(this); 403 400 404 // Prevent controller from sending messages to the frontend. 401 405 InspectorController* ic = inspectorController(); … … 655 659 InspectorController* ic = inspectorController(); 656 660 ic->evaluateForTestInFrontend(callId, script); 661 } 662 663 void WebDevToolsAgentImpl::willProcessTask() 664 { 665 if (InspectorController* ic = inspectorController()) 666 ic->willProcessTask(); 667 } 668 669 void WebDevToolsAgentImpl::didProcessTask() 670 { 671 if (InspectorController* ic = inspectorController()) 672 ic->didProcessTask(); 657 673 } 658 674 -
trunk/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h
r131869 r136171 38 38 #include "WebPageOverlay.h" 39 39 #include <public/WebSize.h> 40 #include <public/WebThread.h> 40 41 #include <wtf/Forward.h> 41 42 #include <wtf/OwnPtr.h> … … 67 68 public WebCore::InspectorClient, 68 69 public WebCore::InspectorFrontendChannel, 69 public WebPageOverlay { 70 public WebPageOverlay, 71 private WebThread::TaskObserver { 70 72 public: 71 73 WebDevToolsAgentImpl(WebViewImpl* webViewImpl, WebDevToolsAgentClient* client); … … 115 117 116 118 private: 119 // WebThread::TaskObserver 120 virtual void willProcessTask(); 121 virtual void didProcessTask(); 122 117 123 WebCore::InspectorController* inspectorController(); 118 124 WebCore::Frame* mainFrame();
Note:
See TracChangeset
for help on using the changeset viewer.