[WK2] Remove incorrect use of preprocessor macro in API headers.

https://bugs.webkit.org/show_bug.cgi?id=100722

Patch by Byungwoo Lee <bw80.lee@samsung.com> on 2012-10-30
Reviewed by Gyuyoung Kim.

Remove the preprocessor macro ENABLE(INSPECTOR) from the WKAPICast.h
and WKInspector.h.

* UIProcess/API/C/WKAPICast.h:
(WebKit):
* UIProcess/API/C/WKInspector.cpp:
(WKInspectorGetTypeID):
(WKInspectorGetPage):
(WKInspectorIsVisible):
(WKInspectorIsFront):
(WKInspectorShow):
(WKInspectorClose):
(WKInspectorShowConsole):
(WKInspectorShowResources):
(WKInspectorShowMainResourceForFrame):
(WKInspectorIsAttached):
(WKInspectorAttach):
(WKInspectorDetach):
(WKInspectorIsDebuggingJavaScript):
(WKInspectorToggleJavaScriptDebugging):
(WKInspectorIsProfilingJavaScript):
(WKInspectorToggleJavaScriptProfiling):
(WKInspectorIsProfilingPage):
(WKInspectorTogglePageProfiling):
* UIProcess/API/C/WKInspector.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9ad4f446
2012-10-30 Byungwoo Lee <bw80.lee@samsung.com>
[WK2] Remove incorrect use of preprocessor macro in API headers.
https://bugs.webkit.org/show_bug.cgi?id=100722
Reviewed by Gyuyoung Kim.
Remove the preprocessor macro ENABLE(INSPECTOR) from the WKAPICast.h
and WKInspector.h.
* UIProcess/API/C/WKAPICast.h:
(WebKit):
* UIProcess/API/C/WKInspector.cpp:
(WKInspectorGetTypeID):
(WKInspectorGetPage):
(WKInspectorIsVisible):
(WKInspectorIsFront):
(WKInspectorShow):
(WKInspectorClose):
(WKInspectorShowConsole):
(WKInspectorShowResources):
(WKInspectorShowMainResourceForFrame):
(WKInspectorIsAttached):
(WKInspectorAttach):
(WKInspectorDetach):
(WKInspectorIsDebuggingJavaScript):
(WKInspectorToggleJavaScriptDebugging):
(WKInspectorIsProfilingJavaScript):
(WKInspectorToggleJavaScriptProfiling):
(WKInspectorIsProfilingPage):
(WKInspectorTogglePageProfiling):
* UIProcess/API/C/WKInspector.h:
2012-10-29 Sergio Villar Senin <svillar@igalia.com>
REGRESSION(r130755): All WebKit2 unit tests are failing in WebKit2 bot
......
......@@ -142,10 +142,7 @@ WK_ADD_API_MAPPING(WKRenderLayerRef, WebRenderLayer)
WK_ADD_API_MAPPING(WKRenderObjectRef, WebRenderObject)
WK_ADD_API_MAPPING(WKTextCheckerRef, WebTextChecker)
WK_ADD_API_MAPPING(WKVibrationRef, WebVibrationProxy)
#if ENABLE(INSPECTOR)
WK_ADD_API_MAPPING(WKInspectorRef, WebInspectorProxy)
#endif
/* Enum conversions */
......
......@@ -26,8 +26,6 @@
#include "config.h"
#include "WKInspector.h"
#if ENABLE(INSPECTOR)
#include "WKAPICast.h"
#include "WebInspectorProxy.h"
......@@ -35,92 +33,142 @@ 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
return 0;
#endif
}
bool WKInspectorIsVisible(WKInspectorRef inspectorRef)
{
#if ENABLE(INSPECTOR)
return toImpl(inspectorRef)->isVisible();
#else
return false;
#endif
}
bool WKInspectorIsFront(WKInspectorRef inspectorRef)
{
#if ENABLE(INSPECTOR)
return toImpl(inspectorRef)->isFront();
#else
return false;
#endif
}
void WKInspectorShow(WKInspectorRef inspectorRef)
{
#if ENABLE(INSPECTOR)
toImpl(inspectorRef)->show();
#endif
}
void WKInspectorClose(WKInspectorRef inspectorRef)
{
#if ENABLE(INSPECTOR)
toImpl(inspectorRef)->close();
#endif
}
void WKInspectorShowConsole(WKInspectorRef inspectorRef)
{
#if ENABLE(INSPECTOR)
toImpl(inspectorRef)->showConsole();
#endif
}
void WKInspectorShowResources(WKInspectorRef inspectorRef)
{
#if ENABLE(INSPECTOR)
toImpl(inspectorRef)->showResources();
#endif
}
void WKInspectorShowMainResourceForFrame(WKInspectorRef inspectorRef, WKFrameRef frameRef)
{
#if ENABLE(INSPECTOR)
toImpl(inspectorRef)->showMainResourceForFrame(toImpl(frameRef));
#endif
}
bool WKInspectorIsAttached(WKInspectorRef inspectorRef)
{
#if ENABLE(INSPECTOR)
return toImpl(inspectorRef)->isAttached();
#else
return false;
#endif
}
void WKInspectorAttach(WKInspectorRef inspectorRef)
{
#if ENABLE(INSPECTOR)
toImpl(inspectorRef)->attach();
#endif
}
void WKInspectorDetach(WKInspectorRef inspectorRef)
{
#if ENABLE(INSPECTOR)
toImpl(inspectorRef)->detach();
#endif
}
bool WKInspectorIsDebuggingJavaScript(WKInspectorRef inspectorRef)
{
#if ENABLE(INSPECTOR)
return toImpl(inspectorRef)->isDebuggingJavaScript();
#else
return false;
#endif
}
void WKInspectorToggleJavaScriptDebugging(WKInspectorRef inspectorRef)
{
#if ENABLE(INSPECTOR)
toImpl(inspectorRef)->toggleJavaScriptDebugging();
#endif
}
bool WKInspectorIsProfilingJavaScript(WKInspectorRef inspectorRef)
{
#if ENABLE(INSPECTOR)
return toImpl(inspectorRef)->isProfilingJavaScript();
#else
return false;
#endif
}
void WKInspectorToggleJavaScriptProfiling(WKInspectorRef inspectorRef)
{
#if ENABLE(INSPECTOR)
toImpl(inspectorRef)->toggleJavaScriptProfiling();
#endif
}
bool WKInspectorIsProfilingPage(WKInspectorRef inspectorRef)
{
#if ENABLE(INSPECTOR)
return toImpl(inspectorRef)->isProfilingPage();
#else
return false;
#endif
}
void WKInspectorTogglePageProfiling(WKInspectorRef inspectorRef)
{
#if ENABLE(INSPECTOR)
toImpl(inspectorRef)->togglePageProfiling();
#endif
}
#endif // ENABLE(INSPECTOR)
......@@ -28,8 +28,6 @@
#include <WebKit2/WKBase.h>
#if ENABLE(INSPECTOR)
#ifndef __cplusplus
#include <stdbool.h>
#endif
......@@ -68,6 +66,4 @@ WK_EXPORT void WKInspectorTogglePageProfiling(WKInspectorRef inspector);
}
#endif
#endif // ENABLE(INSPECTOR)
#endif // WKInspector_h
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment