summaryrefslogtreecommitdiffstats
path: root/WebKit/win/WebInspector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/win/WebInspector.cpp')
-rw-r--r--WebKit/win/WebInspector.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/WebKit/win/WebInspector.cpp b/WebKit/win/WebInspector.cpp
index 97587f9..e4ac32b 100644
--- a/WebKit/win/WebInspector.cpp
+++ b/WebKit/win/WebInspector.cpp
@@ -272,3 +272,38 @@ HRESULT STDMETHODCALLTYPE WebInspector::evaluateInFrontend(ULONG callId, BSTR b
page->inspectorController()->evaluateForTestInFrontend(callId, script);
return S_OK;
}
+
+HRESULT STDMETHODCALLTYPE WebInspector::isTimelineProfilingEnabled(BOOL* isEnabled)
+{
+ if (!isEnabled)
+ return E_POINTER;
+
+ *isEnabled = FALSE;
+
+ if (!m_webView)
+ return S_OK;
+
+ Page* page = m_webView->page();
+ if (!page)
+ return S_OK;
+
+ *isEnabled = page->inspectorController()->timelineAgent() != 0;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE WebInspector::setTimelineProfilingEnabled(BOOL enabled)
+{
+ if (!m_webView)
+ return S_OK;
+
+ Page* page = m_webView->page();
+ if (!page)
+ return S_OK;
+
+ if (enabled)
+ page->inspectorController()->startTimelineProfiler();
+ else
+ page->inspectorController()->stopTimelineProfiler();
+
+ return S_OK;
+}