diff options
Diffstat (limited to 'Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp')
-rw-r--r-- | Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp index 554cf3cd8..7c9324fd7 100644 --- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp +++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Apple Inc. All rights reserved. + * Copyright (C) 2011, 2016 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -35,40 +35,30 @@ using namespace WebKit; WKTypeID WKBundleInspectorGetTypeID() { -#if ENABLE(INSPECTOR) return toAPI(WebInspector::APIType); -#else - return toAPI(API::Object::Type::Null); -#endif } void WKBundleInspectorShow(WKBundleInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) toImpl(inspectorRef)->show(); -#endif } void WKBundleInspectorClose(WKBundleInspectorRef inspectorRef) { -#if ENABLE(INSPECTOR) toImpl(inspectorRef)->close(); -#endif } -void WKBundleInspectorEvaluateScriptForTest(WKBundleInspectorRef inspectorRef, long callID, WKStringRef script) +void WKBundleInspectorEvaluateScriptForTest(WKBundleInspectorRef inspectorRef, WKStringRef script) { -#if ENABLE(INSPECTOR) - toImpl(inspectorRef)->evaluateScriptForTest(callID, toWTFString(script)); -#endif + toImpl(inspectorRef)->evaluateScriptForTest(toWTFString(script)); } void WKBundleInspectorSetPageProfilingEnabled(WKBundleInspectorRef inspectorRef, bool enabled) { -#if ENABLE(INSPECTOR) + toImpl(inspectorRef)->showTimelines(); + if (enabled) toImpl(inspectorRef)->startPageProfiling(); else toImpl(inspectorRef)->stopPageProfiling(); -#endif } |