diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2016-08-25 19:20:41 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-02-02 12:30:55 +0000 |
commit | 6882a04fb36642862b11efe514251d32070c3d65 (patch) | |
tree | b7959826000b061fd5ccc7512035c7478742f7b0 /Source/WebKit2/UIProcess/API/C/WKInspector.cpp | |
parent | ab6df191029eeeb0b0f16f127d553265659f739e (diff) | |
download | qtwebkit-6882a04fb36642862b11efe514251d32070c3d65.tar.gz |
Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443)
Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebKit2/UIProcess/API/C/WKInspector.cpp')
-rw-r--r-- | Source/WebKit2/UIProcess/API/C/WKInspector.cpp | 123 |
1 files changed, 8 insertions, 115 deletions
diff --git a/Source/WebKit2/UIProcess/API/C/WKInspector.cpp b/Source/WebKit2/UIProcess/API/C/WKInspector.cpp index e638609bb..92c641dbb 100644 --- a/Source/WebKit2/UIProcess/API/C/WKInspector.cpp +++ b/Source/WebKit2/UIProcess/API/C/WKInspector.cpp @@ -26,205 +26,98 @@ #include "config.h" #include "WKInspector.h" +#if !PLATFORM(IOS) + #include "WKAPICast.h" #include "WebInspectorProxy.h" +#include "WebPageProxy.h" using namespace WebKit; WKTypeID WKInspectorGetTypeID() { -#if ENABLE(INSPECTOR) return toAPI(WebInspectorProxy::APIType); -#else - return 0; -#endif } WKPageRef WKInspectorGetPage(WKInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) - return toAPI(toImpl(inspectorRef)->page()); -#else - UNUSED_PARAM(inspectorRef); - return 0; -#endif + return toAPI(toImpl(inspectorRef)->inspectedPage()); } bool WKInspectorIsConnected(WKInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) return toImpl(inspectorRef)->isConnected(); -#else - UNUSED_PARAM(inspectorRef); - return false; -#endif } bool WKInspectorIsVisible(WKInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) return toImpl(inspectorRef)->isVisible(); -#else - UNUSED_PARAM(inspectorRef); - return false; -#endif } bool WKInspectorIsFront(WKInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) return toImpl(inspectorRef)->isFront(); -#else - UNUSED_PARAM(inspectorRef); - return false; -#endif } void WKInspectorConnect(WKInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) toImpl(inspectorRef)->connect(); -#else - UNUSED_PARAM(inspectorRef); -#endif } void WKInspectorShow(WKInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) toImpl(inspectorRef)->show(); -#else - UNUSED_PARAM(inspectorRef); -#endif } void WKInspectorHide(WKInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) toImpl(inspectorRef)->hide(); -#else - UNUSED_PARAM(inspectorRef); -#endif } void WKInspectorClose(WKInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) toImpl(inspectorRef)->close(); -#else - UNUSED_PARAM(inspectorRef); -#endif } void WKInspectorShowConsole(WKInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) toImpl(inspectorRef)->showConsole(); -#else - UNUSED_PARAM(inspectorRef); -#endif } void WKInspectorShowResources(WKInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) toImpl(inspectorRef)->showResources(); -#else - UNUSED_PARAM(inspectorRef); -#endif } void WKInspectorShowMainResourceForFrame(WKInspectorRef inspectorRef, WKFrameRef frameRef) { -#if ENABLE(INSPECTOR) toImpl(inspectorRef)->showMainResourceForFrame(toImpl(frameRef)); -#else - UNUSED_PARAM(inspectorRef); - UNUSED_PARAM(frameRef); -#endif } bool WKInspectorIsAttached(WKInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) return toImpl(inspectorRef)->isAttached(); -#else - UNUSED_PARAM(inspectorRef); - return false; -#endif } void WKInspectorAttach(WKInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) - toImpl(inspectorRef)->attach(); -#else - UNUSED_PARAM(inspectorRef); -#endif + auto inspector = toImpl(inspectorRef); + inspector->attach(inspector->attachmentSide()); } void WKInspectorDetach(WKInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) toImpl(inspectorRef)->detach(); -#else - UNUSED_PARAM(inspectorRef); -#endif -} - -bool WKInspectorIsDebuggingJavaScript(WKInspectorRef inspectorRef) -{ -#if ENABLE(INSPECTOR) - return toImpl(inspectorRef)->isDebuggingJavaScript(); -#else - UNUSED_PARAM(inspectorRef); - return false; -#endif -} - -void WKInspectorToggleJavaScriptDebugging(WKInspectorRef inspectorRef) -{ -#if ENABLE(INSPECTOR) - toImpl(inspectorRef)->toggleJavaScriptDebugging(); -#else - UNUSED_PARAM(inspectorRef); -#endif -} - -bool WKInspectorIsProfilingJavaScript(WKInspectorRef inspectorRef) -{ -#if ENABLE(INSPECTOR) - return toImpl(inspectorRef)->isProfilingJavaScript(); -#else - UNUSED_PARAM(inspectorRef); - return false; -#endif -} - -void WKInspectorToggleJavaScriptProfiling(WKInspectorRef inspectorRef) -{ -#if ENABLE(INSPECTOR) - toImpl(inspectorRef)->toggleJavaScriptProfiling(); -#else - UNUSED_PARAM(inspectorRef); -#endif } bool WKInspectorIsProfilingPage(WKInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) return toImpl(inspectorRef)->isProfilingPage(); -#else - UNUSED_PARAM(inspectorRef); - return false; -#endif } void WKInspectorTogglePageProfiling(WKInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) toImpl(inspectorRef)->togglePageProfiling(); -#else - UNUSED_PARAM(inspectorRef); -#endif } + +#endif // !PLATFORM(IOS) |