[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
loislo at chromium.org
loislo at chromium.org
Wed Dec 22 11:29:49 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit a471a4cc0749dddd35a779ad3abff89150aa6cce
Author: loislo at chromium.org <loislo at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jul 27 13:41:20 2010 +0000
2010-07-27 Ilya Tikhonovsky <loislo at chromium.org>
Reviewed by Pavel Feldman.
WebInspector: Current implementation of message based inspector
transport generated by CodeGeneratorInspector should be upstreamed
from WebKit/chromium to WebCore.
https://bugs.webkit.org/show_bug.cgi?id=42983
* Android.derived.v8bindings.mk:
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.am:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptObject.cpp:
* bindings/js/ScriptObject.h:
* bindings/v8/ScriptObject.cpp:
* bindings/v8/ScriptObject.h:
* inspector/CodeGeneratorInspector.pm:
* inspector/InspectorBackend.idl: Removed.
* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::windowObjectCleared):
(WebCore::InspectorFrontendClientLocal::sendMessageToBackend):
* inspector/InspectorFrontendClientLocal.h:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::sendMessageToBackend):
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* inspector/front-end/InspectorBackendStub.js:
(.WebInspector.InspectorBackendStub):
(.WebInspector.InspectorBackendStub.prototype._registerDelegate):
(.WebInspector.InspectorBackendStub.prototype.sendMessageToBackend):
2010-07-27 Ilya Tikhonovsky <loislo at chromium.org>
Reviewed by Pavel Feldman.
WebInspector: Current implementation of message based inspector
transport generated by CodeGeneratorInspector should be upstreamed
from WebKit/chromium to WebCore.
https://bugs.webkit.org/show_bug.cgi?id=42983
* WebKit.gypi:
* src/InspectorFrontendClientImpl.cpp:
(WebKit::InspectorFrontendClientImpl::sendMessageToBackend):
* src/InspectorFrontendClientImpl.h:
* src/ToolsAgent.h:
* src/WebDevToolsAgentImpl.cpp:
(WebKit::WebDevToolsAgentImpl::dispatchOnInspectorController):
(WebKit::WebDevToolsAgentImpl::initDevToolsAgentHost):
* src/WebDevToolsAgentImpl.h:
* src/js/InspectorControllerImpl.js: Removed.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/Android.derived.v8bindings.mk b/WebCore/Android.derived.v8bindings.mk
index 1e7fa37..cfa8dc9 100644
--- a/WebCore/Android.derived.v8bindings.mk
+++ b/WebCore/Android.derived.v8bindings.mk
@@ -571,7 +571,6 @@ $(patsubst %.h,%.cpp,$(GEN)): $(intermediates)/bindings/%.cpp : $(intermediates)
# These headers are required by the V8 bindings even when Inspector is disabled
GEN := \
$(intermediates)/bindings/V8InjectedScriptHost.h \
- $(intermediates)/bindings/V8InspectorBackend.h \
$(intermediates)/bindings/V8InspectorFrontendHost.h
$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index d695636..3bfa0a9 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -293,7 +293,6 @@ SET(WebCore_IDL_FILES
html/canvas/Uint8Array.idl
inspector/InjectedScriptHost.idl
- inspector/InspectorBackend.idl
inspector/InspectorFrontendHost.idl
inspector/JavaScriptCallFrame.idl
inspector/ScriptProfile.idl
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index eeec11f..6c3d000 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,42 @@
+2010-07-27 Ilya Tikhonovsky <loislo at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: Current implementation of message based inspector
+ transport generated by CodeGeneratorInspector should be upstreamed
+ from WebKit/chromium to WebCore.
+ https://bugs.webkit.org/show_bug.cgi?id=42983
+
+ * Android.derived.v8bindings.mk:
+ * CMakeLists.txt:
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.exp.in:
+ * WebCore.gypi:
+ * WebCore.pri:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/ScriptObject.cpp:
+ * bindings/js/ScriptObject.h:
+ * bindings/v8/ScriptObject.cpp:
+ * bindings/v8/ScriptObject.h:
+ * inspector/CodeGeneratorInspector.pm:
+ * inspector/InspectorBackend.idl: Removed.
+ * inspector/InspectorFrontendClient.h:
+ * inspector/InspectorFrontendClientLocal.cpp:
+ (WebCore::InspectorFrontendClientLocal::windowObjectCleared):
+ (WebCore::InspectorFrontendClientLocal::sendMessageToBackend):
+ * inspector/InspectorFrontendClientLocal.h:
+ * inspector/InspectorFrontendHost.cpp:
+ (WebCore::InspectorFrontendHost::sendMessageToBackend):
+ * inspector/InspectorFrontendHost.h:
+ * inspector/InspectorFrontendHost.idl:
+ * inspector/front-end/InspectorBackendStub.js:
+ (.WebInspector.InspectorBackendStub):
+ (.WebInspector.InspectorBackendStub.prototype._registerDelegate):
+ (.WebInspector.InspectorBackendStub.prototype.sendMessageToBackend):
+
2010-07-27 Satish Sampath <satish at chromium.org>
Reviewed by Kent Tamura.
diff --git a/WebCore/DerivedSources.cpp b/WebCore/DerivedSources.cpp
index 78c523f..ea6e47e 100644
--- a/WebCore/DerivedSources.cpp
+++ b/WebCore/DerivedSources.cpp
@@ -190,7 +190,6 @@
#include "JSImageData.cpp"
#include "JSIndexedDatabaseRequest.cpp"
#include "JSInjectedScriptHost.cpp"
-#include "JSInspectorBackend.cpp"
#include "JSInspectorFrontendHost.cpp"
#include "JSJavaScriptCallFrame.cpp"
#include "JSKeyboardEvent.cpp"
diff --git a/WebCore/DerivedSources.make b/WebCore/DerivedSources.make
index 7c53e86..8cecc2b 100644
--- a/WebCore/DerivedSources.make
+++ b/WebCore/DerivedSources.make
@@ -233,7 +233,6 @@ DOM_CLASSES = \
ImageData \
IndexedDatabaseRequest \
InjectedScriptHost \
- InspectorBackend \
InspectorFrontendHost \
KeyboardEvent \
Location \
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index f7217ac..6fefc8b 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -392,8 +392,6 @@ webcore_built_sources += \
DerivedSources/WebCore/JSImageData.h \
DerivedSources/WebCore/JSInjectedScriptHost.cpp \
DerivedSources/WebCore/JSInjectedScriptHost.h \
- DerivedSources/WebCore/JSInspectorBackend.cpp \
- DerivedSources/WebCore/JSInspectorBackend.h \
DerivedSources/WebCore/JSInspectorFrontendHost.cpp \
DerivedSources/WebCore/JSInspectorFrontendHost.h \
DerivedSources/WebCore/JSInt16Array.cpp \
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 665dab4..dfbd150 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -1195,6 +1195,7 @@ __ZN7WebCore28InspectorFrontendClientLocal17setAttachedWindowEb
__ZN7WebCore28InspectorFrontendClientLocal19requestAttachWindowEv
__ZN7WebCore28InspectorFrontendClientLocal19requestDetachWindowEv
__ZN7WebCore28InspectorFrontendClientLocal19windowObjectClearedEv
+__ZN7WebCore28InspectorFrontendClientLocal20sendMessageToBackendERKNS_6StringE
__ZN7WebCore28InspectorFrontendClientLocal26changeAttachedWindowHeightEj
__ZN7WebCore28InspectorFrontendClientLocal27restoreAttachedWindowHeightEv
__ZN7WebCore28InspectorFrontendClientLocalC2EPNS_19InspectorControllerEPNS_4PageE
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 7d7cff5..aafb222 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -196,7 +196,6 @@
'html/ValidityState.idl',
'html/VoidCallback.idl',
'inspector/InjectedScriptHost.idl',
- 'inspector/InspectorBackend.idl',
'inspector/InspectorFrontendHost.idl',
'inspector/JavaScriptCallFrame.idl',
'inspector/ScriptProfile.idl',
diff --git a/WebCore/WebCore.pri b/WebCore/WebCore.pri
index 18a76a0..e59cc98 100644
--- a/WebCore/WebCore.pri
+++ b/WebCore/WebCore.pri
@@ -448,7 +448,6 @@ IDL_BINDINGS += \
html/ValidityState.idl \
html/VoidCallback.idl \
inspector/InjectedScriptHost.idl \
- inspector/InspectorBackend.idl \
inspector/InspectorFrontendHost.idl \
inspector/JavaScriptCallFrame.idl \
inspector/ScriptProfile.idl \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 8195439..89c07d5 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -8781,62 +8781,6 @@
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSInspectorBackend.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Internal|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSInspectorBackend.h"
- >
- </File>
- <File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSInspectorFrontendHost.cpp"
>
<FileConfiguration
@@ -20741,7 +20685,7 @@
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\InspectorBackendDispatcher.h"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\InspectorBackendDispatcher.cpp"
>
</File>
<File
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 74de681..945aa5d 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -832,8 +832,6 @@
41E1B1D10FF5986900576B3B /* AbstractWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E1B1CB0FF5986900576B3B /* AbstractWorker.h */; };
41E1B1D30FF5986900576B3B /* SharedWorker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41E1B1CD0FF5986900576B3B /* SharedWorker.cpp */; };
41E1B1D40FF5986900576B3B /* SharedWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E1B1CE0FF5986900576B3B /* SharedWorker.h */; };
- 41F060CD0F5EEB2B00A07EAC /* JSInspectorBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41F060CB0F5EEB2B00A07EAC /* JSInspectorBackend.cpp */; };
- 41F060CE0F5EEB2B00A07EAC /* JSInspectorBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F060CC0F5EEB2B00A07EAC /* JSInspectorBackend.h */; };
41F061740F5F00AC00A07EAC /* InspectorDOMStorageResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F061720F5F00AC00A07EAC /* InspectorDOMStorageResource.h */; };
41F061750F5F00AC00A07EAC /* InspectorDOMStorageResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41F061730F5F00AC00A07EAC /* InspectorDOMStorageResource.cpp */; };
41F0618E0F5F069800A07EAC /* ConsoleMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F0618C0F5F069800A07EAC /* ConsoleMessage.h */; };
@@ -6540,8 +6538,6 @@
41E1B1CD0FF5986900576B3B /* SharedWorker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SharedWorker.cpp; path = workers/SharedWorker.cpp; sourceTree = "<group>"; };
41E1B1CE0FF5986900576B3B /* SharedWorker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharedWorker.h; path = workers/SharedWorker.h; sourceTree = "<group>"; };
41E1B1CF0FF5986900576B3B /* SharedWorker.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = SharedWorker.idl; path = workers/SharedWorker.idl; sourceTree = "<group>"; };
- 41F060CB0F5EEB2B00A07EAC /* JSInspectorBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInspectorBackend.cpp; sourceTree = "<group>"; };
- 41F060CC0F5EEB2B00A07EAC /* JSInspectorBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInspectorBackend.h; sourceTree = "<group>"; };
41F061720F5F00AC00A07EAC /* InspectorDOMStorageResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDOMStorageResource.h; sourceTree = "<group>"; };
41F061730F5F00AC00A07EAC /* InspectorDOMStorageResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorDOMStorageResource.cpp; sourceTree = "<group>"; };
41F0618C0F5F069800A07EAC /* ConsoleMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsoleMessage.h; sourceTree = "<group>"; };
@@ -7171,7 +7167,6 @@
7A24587A1021EAF4000A00AA /* InspectorDOMAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDOMAgent.h; sourceTree = "<group>"; };
7A674BD90F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageGroupLoadDeferrer.cpp; sourceTree = "<group>"; };
7A674BDA0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageGroupLoadDeferrer.h; sourceTree = "<group>"; };
- 7A74ECB61018399A00BF939E /* InspectorBackend.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = InspectorBackend.idl; sourceTree = "<group>"; };
7A74ECB8101839A500BF939E /* InspectorBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorBackend.cpp; sourceTree = "<group>"; };
7A74ECB9101839A600BF939E /* InspectorBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorBackend.h; sourceTree = "<group>"; };
7A74ECBC101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInspectorFrontendHostCustom.cpp; sourceTree = "<group>"; };
@@ -11435,8 +11430,6 @@
4F707A9811EF679400ACDA69 /* InspectorBackendDispatcher.h */,
7A0E76D810BF059800A0276E /* JSInjectedScriptHost.cpp */,
7A0E76D910BF059800A0276E /* JSInjectedScriptHost.h */,
- 41F060CB0F5EEB2B00A07EAC /* JSInspectorBackend.cpp */,
- 41F060CC0F5EEB2B00A07EAC /* JSInspectorBackend.h */,
7A0E771C10C00DB100A0276E /* JSInspectorFrontendHost.cpp */,
7A0E771D10C00DB100A0276E /* JSInspectorFrontendHost.h */,
1C5FAECF0DCFD90100D58F78 /* JSJavaScriptCallFrame.cpp */,
@@ -11466,7 +11459,6 @@
B885E8D311E06DD2009FFBF4 /* InspectorApplicationCacheAgent.h */,
7A74ECB8101839A500BF939E /* InspectorBackend.cpp */,
7A74ECB9101839A600BF939E /* InspectorBackend.h */,
- 7A74ECB61018399A00BF939E /* InspectorBackend.idl */,
1C81B9580E97330800266E07 /* InspectorClient.h */,
1C81B9570E97330800266E07 /* InspectorController.cpp */,
1C81B9560E97330800266E07 /* InspectorController.h */,
@@ -18738,7 +18730,6 @@
A77979290D6B9E64003851B9 /* JSImageData.h in Headers */,
C585A69711D4FB13004C3E4B /* JSIndexedDatabaseRequest.h in Headers */,
7A0E76DB10BF059800A0276E /* JSInjectedScriptHost.h in Headers */,
- 41F060CE0F5EEB2B00A07EAC /* JSInspectorBackend.h in Headers */,
7A0E771F10C00DB100A0276E /* JSInspectorFrontendHost.h in Headers */,
49EECF07105070C400099FAB /* JSInt16Array.h in Headers */,
49EECF05105070C400099FAB /* JSInt32Array.h in Headers */,
@@ -21202,7 +21193,6 @@
C585A69611D4FB13004C3E4B /* JSIndexedDatabaseRequest.cpp in Sources */,
7A0E76DA10BF059800A0276E /* JSInjectedScriptHost.cpp in Sources */,
7A0E76D510BF050700A0276E /* JSInjectedScriptHostCustom.cpp in Sources */,
- 41F060CD0F5EEB2B00A07EAC /* JSInspectorBackend.cpp in Sources */,
7A0E771E10C00DB100A0276E /* JSInspectorFrontendHost.cpp in Sources */,
7A74ECBD101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp in Sources */,
49EECF06105070C400099FAB /* JSInt16Array.cpp in Sources */,
diff --git a/WebCore/bindings/js/ScriptObject.cpp b/WebCore/bindings/js/ScriptObject.cpp
index 16b9f01..de397f7 100644
--- a/WebCore/bindings/js/ScriptObject.cpp
+++ b/WebCore/bindings/js/ScriptObject.cpp
@@ -37,7 +37,6 @@
#if ENABLE(INSPECTOR)
#include "JSInjectedScriptHost.h"
-#include "JSInspectorBackend.h"
#include "JSInspectorFrontendHost.h"
#endif
@@ -158,14 +157,6 @@ bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, const S
}
#if ENABLE(INSPECTOR)
-bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorBackend* value)
-{
- JSLock lock(SilenceAssertionsOnly);
- JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(scriptState->lexicalGlobalObject());
- globalObject->putDirect(Identifier(scriptState, name), toJS(scriptState, globalObject, value));
- return handleException(scriptState);
-}
-
bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorFrontendHost* value)
{
JSLock lock(SilenceAssertionsOnly);
diff --git a/WebCore/bindings/js/ScriptObject.h b/WebCore/bindings/js/ScriptObject.h
index 0c993e1..9880976 100644
--- a/WebCore/bindings/js/ScriptObject.h
+++ b/WebCore/bindings/js/ScriptObject.h
@@ -39,7 +39,6 @@
namespace WebCore {
class InjectedScriptHost;
- class InspectorBackend;
class InspectorFrontendHost;
class ScriptObject : public ScriptValue {
@@ -70,7 +69,6 @@ namespace WebCore {
public:
static bool set(ScriptState*, const char* name, const ScriptObject&);
#if ENABLE(INSPECTOR)
- static bool set(ScriptState*, const char* name, InspectorBackend*);
static bool set(ScriptState*, const char* name, InspectorFrontendHost*);
static bool set(ScriptState*, const char* name, InjectedScriptHost*);
#endif
diff --git a/WebCore/bindings/v8/ScriptObject.cpp b/WebCore/bindings/v8/ScriptObject.cpp
index 520c57b..8f81537 100644
--- a/WebCore/bindings/v8/ScriptObject.cpp
+++ b/WebCore/bindings/v8/ScriptObject.cpp
@@ -38,7 +38,6 @@
#include "Frame.h"
#include "V8Binding.h"
#include "V8InjectedScriptHost.h"
-#include "V8InspectorBackend.h"
#include "V8InspectorFrontendHost.h"
#include "V8Proxy.h"
@@ -146,13 +145,6 @@ bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, const S
}
#if ENABLE(INSPECTOR)
-bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorBackend* value)
-{
- ScriptScope scope(scriptState);
- scope.global()->Set(v8::String::New(name), toV8(value));
- return scope.success();
-}
-
bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorFrontendHost* value)
{
ScriptScope scope(scriptState);
diff --git a/WebCore/bindings/v8/ScriptObject.h b/WebCore/bindings/v8/ScriptObject.h
index a60f2a8..bee079c 100644
--- a/WebCore/bindings/v8/ScriptObject.h
+++ b/WebCore/bindings/v8/ScriptObject.h
@@ -37,7 +37,6 @@
namespace WebCore {
class InjectedScriptHost;
- class InspectorBackend;
class InspectorFrontendHost;
class ScriptState;
@@ -69,7 +68,6 @@ namespace WebCore {
class ScriptGlobalObject {
public:
static bool set(ScriptState*, const char* name, const ScriptObject&);
- static bool set(ScriptState*, const char* name, InspectorBackend*);
static bool set(ScriptState*, const char* name, InspectorFrontendHost*);
static bool set(ScriptState*, const char* name, InjectedScriptHost*);
static bool get(ScriptState*, const char* name, ScriptObject&);
diff --git a/WebCore/inspector/CodeGeneratorInspector.pm b/WebCore/inspector/CodeGeneratorInspector.pm
index f554026..5488dbd 100644
--- a/WebCore/inspector/CodeGeneratorInspector.pm
+++ b/WebCore/inspector/CodeGeneratorInspector.pm
@@ -164,7 +164,7 @@ sub GenerateInterface
$backendClassName = $className . "BackendDispatcher";
my @backendHead;
push(@backendHead, " ${backendClassName}(InspectorBackend* inspectorBackend) : m_inspectorBackend(inspectorBackend) { }");
- push(@backendHead, " void dispatch(const String& message, String* exception);");
+ push(@backendHead, " void dispatch(const String& message);");
push(@backendHead, "private:");
$backendConstructor = join("\n", @backendHead);
$backendFooter = " InspectorBackend* m_inspectorBackend;";
@@ -288,8 +288,9 @@ sub generateBackendDispatcher
my @methods = map($backendMethods{$_}, keys %backendMethods);
my @mapEntries = map("dispatchMap.add(\"$_\", &${backendClassName}::$_);", @methods);
- push(@body, "void ${backendClassName}::dispatch(const String& message, String* exception)");
+ push(@body, "void ${backendClassName}::dispatch(const String& message)");
push(@body, "{");
+ push(@body, " String exception;");
push(@body, " typedef void (${backendClassName}::*CallHandler)(PassRefPtr<InspectorArray> args, String* exception);");
push(@body, " typedef HashMap<String, CallHandler> DispatchMap;");
push(@body, " DEFINE_STATIC_LOCAL(DispatchMap, dispatchMap, );");
@@ -300,38 +301,38 @@ sub generateBackendDispatcher
push(@body, " RefPtr<InspectorValue> parsedMessage = InspectorValue::parseJSON(message);");
push(@body, " if (!parsedMessage) {");
push(@body, " ASSERT_NOT_REACHED();");
- push(@body, " *exception = \"Error: Invalid message format. Message should be in JSON format.\";");
+ push(@body, " exception = \"Error: Invalid message format. Message should be in JSON format.\";");
push(@body, " return;");
push(@body, " }");
push(@body, "");
push(@body, " RefPtr<InspectorArray> messageArray = parsedMessage->asArray();");
push(@body, " if (!messageArray) {");
push(@body, " ASSERT_NOT_REACHED();");
- push(@body, " *exception = \"Error: Invalid message format. The message should be a JSONified array of arguments.\";");
+ push(@body, " exception = \"Error: Invalid message format. The message should be a JSONified array of arguments.\";");
push(@body, " return;");
push(@body, " }");
push(@body, "");
push(@body, " if (!messageArray->length()) {");
push(@body, " ASSERT_NOT_REACHED();");
- push(@body, " *exception = \"Error: Invalid message format. Empty message was received.\";");
+ push(@body, " exception = \"Error: Invalid message format. Empty message was received.\";");
push(@body, " return;");
push(@body, " }");
push(@body, "");
push(@body, " String methodName;");
push(@body, " if (!messageArray->get(0)->asString(&methodName)) {");
push(@body, " ASSERT_NOT_REACHED();");
- push(@body, " *exception = \"Error: Invalid message format. The first element of the message should be method name.\";");
+ push(@body, " exception = \"Error: Invalid message format. The first element of the message should be method name.\";");
push(@body, " return;");
push(@body, " }");
push(@body, "");
push(@body, " HashMap<String, CallHandler>::iterator it = dispatchMap.find(methodName);");
push(@body, " if (it == dispatchMap.end()) {");
push(@body, " ASSERT_NOT_REACHED();");
- push(@body, " *exception = String::format(\"Error: Invalid method name. '%s' wasn't found.\", methodName.utf8().data());");
+ push(@body, " exception = String::format(\"Error: Invalid method name. '%s' wasn't found.\", methodName.utf8().data());");
push(@body, " return;");
push(@body, " }");
push(@body, "");
- push(@body, " ((*this).*it->second)(messageArray, exception);");
+ push(@body, " ((*this).*it->second)(messageArray, &exception);");
push(@body, "}");
return @body;
}
diff --git a/WebCore/inspector/InspectorBackend.idl b/WebCore/inspector/InspectorBackend.idl
deleted file mode 100644
index 5941358..0000000
--- a/WebCore/inspector/InspectorBackend.idl
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2008 Matt Lilek <webkit at mattlilek.com>
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-module core {
- interface [Conditional=INSPECTOR] InspectorBackend {
- void storeLastActivePanel(in DOMString panelName);
-
- void saveApplicationSettings(in DOMString settings);
- void saveSessionSettings(in DOMString settings);
-
- void enableSearchingForNode();
- void disableSearchingForNode();
-
- void enableMonitoringXHR();
- void disableMonitoringXHR();
-
- void enableResourceTracking(in boolean always);
- void disableResourceTracking(in boolean always);
- void getResourceContent(in long callId, in unsigned long identifier);
- void reloadPage();
-
- void startTimelineProfiler();
- void stopTimelineProfiler();
-
-#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
- void enableDebugger(in boolean always);
- void disableDebugger(in boolean always);
-
- void setBreakpoint(in long callId, in DOMString sourceID, in unsigned long lineNumber, in boolean enabled, in DOMString condition);
- void removeBreakpoint(in DOMString sourceID, in unsigned long lineNumber);
- void activateBreakpoints();
- void deactivateBreakpoints();
-
- void pause();
- void resume();
-
- void stepOverStatement();
- void stepIntoStatement();
- void stepOutOfFunction();
-
- void setPauseOnExceptionsState(in long pauseOnExceptionsState);
-
- void editScriptSource(in long callId, in DOMString sourceID, in DOMString newContent);
- void getScriptSource(in long callId, in DOMString sourceID);
-
- void enableProfiler(in boolean always);
- void disableProfiler(in boolean always);
-
- void startProfiling();
- void stopProfiling();
-
- void getProfileHeaders(in long callId);
- void getProfile(in long callId, in unsigned long uid);
-
- void removeProfile(in unsigned long uid);
- void clearProfiles();
-
- void takeHeapSnapshot();
-#endif
- void setInjectedScriptSource(in DOMString scriptSource);
- void dispatchOnInjectedScript(in long callId, in long injectedScriptId, in DOMString methodName, in DOMString arguments, in boolean async);
-
- void addScriptToEvaluateOnLoad(in DOMString scriptSource);
- void removeAllScriptsToEvaluateOnLoad();
-
- void getChildNodes(in long callId, in long nodeId);
- void setAttribute(in long callId, in long elementId, in DOMString name, in DOMString value);
- void removeAttribute(in long callId, in long elementId, in DOMString name);
- void setTextNodeValue(in long callId, in long nodeId, in DOMString value);
- void getEventListenersForNode(in long callId, in long nodeId);
- void copyNode(in long nodeId);
- void removeNode(in long callId, in long nodeId);
- void changeTagName(in long callId, in long nodeId, in DOMString newTagName);
- void getOuterHTML(in long callId, in long nodeId);
- void setOuterHTML(in long callId, in long nodeId, in DOMString outerHTML);
- void addInspectedNode(in long nodeId);
- void performSearch(in DOMString query, in boolean runSynchronously);
- void searchCanceled();
- void pushNodeByPathToFrontend(in long callId, in DOMString path);
-
- void clearConsoleMessages(in long callId);
-
- void highlightDOMNode(in long nodeId);
- void hideDOMNodeHighlight();
-
- void getStyles(in long callId, in long nodeId, in boolean authOnly);
- void getAllStyles(in long callId);
- void getInlineStyle(in long callId, in long nodeId);
- void getComputedStyle(in long callId, in long nodeId);
- void getStyleSheet(in long callId, in long styleSheetId);
- void getRuleRanges(in long callId, in long styleSheetId);
- void applyStyleText(in long callId, in long styleId, in DOMString styleText, in DOMString propertyName);
- void setStyleText(in long callId, in long styleId, in DOMString styleText);
- void setStyleProperty(in long callId, in long styleId, in DOMString name, in DOMString value);
- void toggleStyleEnabled(in long callId, in long styleId, in DOMString propertyName, in boolean disabled);
- void setRuleSelector(in long callId, in long ruleId, in DOMString selector, in long selectedNodeId);
- void addRule(in long callId, in DOMString selector, in long selectedNodeId);
-
- void getCookies(in long callId);
- void deleteCookie(in DOMString cookieName, in DOMString domain);
-
-#if defined(ENABLE_OFFLINE_WEB_APPLICATIONS)
- void getApplicationCaches(in long callId);
-#endif
-
- void releaseWrapperObjectGroup(in long injectedScriptId, in DOMString objectGroup);
- void didEvaluateForTestInFrontend(in long callId, in DOMString jsonResult);
-
-#if defined(ENABLE_DATABASE) && ENABLE_DATABASE
- void getDatabaseTableNames(in long callId, in long databaseId);
-#endif
-
-#if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE
- void getDOMStorageEntries(in long callId, in long storageId);
- void setDOMStorageItem(in long callId, in long storageId, in DOMString key, in DOMString value);
- void removeDOMStorageItem(in long callId, in long storageId, in DOMString key);
-#endif
- };
-}
diff --git a/WebCore/inspector/InspectorFrontendClient.h b/WebCore/inspector/InspectorFrontendClient.h
index 515388c..c20eb10 100644
--- a/WebCore/inspector/InspectorFrontendClient.h
+++ b/WebCore/inspector/InspectorFrontendClient.h
@@ -59,6 +59,8 @@ public:
virtual void changeAttachedWindowHeight(unsigned) = 0;
virtual void inspectedURLChanged(const String&) = 0;
+
+ virtual void sendMessageToBackend(const String&) = 0;
};
} // namespace WebCore
diff --git a/WebCore/inspector/InspectorFrontendClientLocal.cpp b/WebCore/inspector/InspectorFrontendClientLocal.cpp
index b982459..f6f7811 100644
--- a/WebCore/inspector/InspectorFrontendClientLocal.cpp
+++ b/WebCore/inspector/InspectorFrontendClientLocal.cpp
@@ -37,6 +37,7 @@
#include "FloatRect.h"
#include "Frame.h"
#include "FrameView.h"
+#include "InspectorBackendDispatcher.h"
#include "InspectorController.h"
#include "InspectorFrontend.h"
#include "InspectorFrontendHost.h"
@@ -72,7 +73,6 @@ void InspectorFrontendClientLocal::windowObjectCleared()
{
// FIXME: don't keep reference to the script state
m_frontendScriptState = scriptStateFromPage(debuggerWorld(), m_frontendPage);
- ScriptGlobalObject::set(m_frontendScriptState, "InspectorBackend", m_inspectorController->inspectorBackend());
m_frontendHost = InspectorFrontendHost::create(this, m_frontendPage);
ScriptGlobalObject::set(m_frontendScriptState, "InspectorFrontendHost", m_frontendHost.get());
}
@@ -159,7 +159,12 @@ unsigned InspectorFrontendClientLocal::constrainedAttachedWindowHeight(unsigned
using namespace std;
return roundf(max(minimumAttachedHeight, min<float>(preferredHeight, totalWindowHeight * maximumAttachedHeightRatio)));
}
-
+
+void InspectorFrontendClientLocal::sendMessageToBackend(const String& message)
+{
+ m_inspectorController->inspectorBackendDispatcher()->dispatch(message);
+}
+
} // namespace WebCore
#endif
diff --git a/WebCore/inspector/InspectorFrontendClientLocal.h b/WebCore/inspector/InspectorFrontendClientLocal.h
index ce661fe..9dcaa5a 100644
--- a/WebCore/inspector/InspectorFrontendClientLocal.h
+++ b/WebCore/inspector/InspectorFrontendClientLocal.h
@@ -59,6 +59,8 @@ public:
virtual void detachWindow() = 0;
bool canAttachWindow();
+ virtual void sendMessageToBackend(const String& message);
+
protected:
virtual void setAttachedWindowHeight(unsigned) = 0;
void setAttachedWindow(bool);
diff --git a/WebCore/inspector/InspectorFrontendHost.cpp b/WebCore/inspector/InspectorFrontendHost.cpp
index 70fc3ad..6957dd1 100644
--- a/WebCore/inspector/InspectorFrontendHost.cpp
+++ b/WebCore/inspector/InspectorFrontendHost.cpp
@@ -207,6 +207,11 @@ void InspectorFrontendHost::copyText(const String& text)
Pasteboard::generalPasteboard()->writePlainText(text);
}
+void InspectorFrontendHost::sendMessageToBackend(const String& message)
+{
+ m_client->sendMessageToBackend(message);
+}
+
#if ENABLE(CONTEXT_MENUS)
void InspectorFrontendHost::showContextMenu(Event* event, const Vector<ContextMenuItem*>& items)
{
diff --git a/WebCore/inspector/InspectorFrontendHost.h b/WebCore/inspector/InspectorFrontendHost.h
index 4d3e0d1..7fb4a1e 100644
--- a/WebCore/inspector/InspectorFrontendHost.h
+++ b/WebCore/inspector/InspectorFrontendHost.h
@@ -75,6 +75,7 @@ public:
// Called from [Custom] implementations.
void showContextMenu(Event*, const Vector<ContextMenuItem*>& items);
+ void sendMessageToBackend(const String& message);
private:
#if ENABLE(CONTEXT_MENUS)
diff --git a/WebCore/inspector/InspectorFrontendHost.idl b/WebCore/inspector/InspectorFrontendHost.idl
index 1139a1c..d1b3604 100644
--- a/WebCore/inspector/InspectorFrontendHost.idl
+++ b/WebCore/inspector/InspectorFrontendHost.idl
@@ -50,5 +50,6 @@ module core {
[Custom] DOMString platform();
[Custom] DOMString port();
[Custom] void showContextMenu(in MouseEvent event, in DOMObject items);
+ void sendMessageToBackend(in DOMString message);
};
}
diff --git a/WebCore/inspector/front-end/InspectorBackendStub.js b/WebCore/inspector/front-end/InspectorBackendStub.js
index 857e026..bc344f8 100644
--- a/WebCore/inspector/front-end/InspectorBackendStub.js
+++ b/WebCore/inspector/front-end/InspectorBackendStub.js
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -32,263 +32,99 @@ if (!window.InspectorBackend) {
WebInspector.InspectorBackendStub = function()
{
- this._attachedWindowHeight = 0;
- this._timelineEnabled = false;
+ this._registerDelegate("addInspectedNode");
+ this._registerDelegate("addScriptToEvaluateOnLoad");
+ this._registerDelegate("changeTagName");
+ this._registerDelegate("clearConsoleMessages");
+ this._registerDelegate("copyNode");
+ this._registerDelegate("deleteCookie");
+ this._registerDelegate("didEvaluateForTestInFrontend");
+ this._registerDelegate("disableMonitoringXHR");
+ this._registerDelegate("disableResourceTracking");
+ this._registerDelegate("disableSearchingForNode");
+ this._registerDelegate("disableTimeline");
+ this._registerDelegate("dispatchOnInjectedScript");
+ this._registerDelegate("enableMonitoringXHR");
+ this._registerDelegate("enableResourceTracking");
+ this._registerDelegate("enableSearchingForNode");
+ this._registerDelegate("enableTimeline");
+ this._registerDelegate("getChildNodes");
+ this._registerDelegate("getCookies");
+ this._registerDelegate("getDatabaseTableNames");
+ this._registerDelegate("getDOMStorageEntries");
+ this._registerDelegate("getEventListenersForNode");
+ this._registerDelegate("getOuterHTML");
+ this._registerDelegate("getProfile");
+ this._registerDelegate("getProfileHeaders");
+ this._registerDelegate("removeProfile");
+ this._registerDelegate("clearProfiles");
+ this._registerDelegate("getResourceContent");
+ this._registerDelegate("highlightDOMNode");
+ this._registerDelegate("hideDOMNodeHighlight");
+ this._registerDelegate("performSearch");
+ this._registerDelegate("pushNodeByPathToFrontend");
+ this._registerDelegate("releaseWrapperObjectGroup");
+ this._registerDelegate("removeAllScriptsToEvaluateOnLoad");
+ this._registerDelegate("reloadPage");
+ this._registerDelegate("removeAttribute");
+ this._registerDelegate("removeDOMStorageItem");
+ this._registerDelegate("removeNode");
+ this._registerDelegate("saveApplicationSettings");
+ this._registerDelegate("saveSessionSettings");
+ this._registerDelegate("searchCanceled");
+ this._registerDelegate("setAttribute");
+ this._registerDelegate("setDOMStorageItem");
+ this._registerDelegate("setInjectedScriptSource");
+ this._registerDelegate("setOuterHTML");
+ this._registerDelegate("setTextNodeValue");
+ this._registerDelegate("startProfiling");
+ this._registerDelegate("startTimelineProfiler");
+ this._registerDelegate("stopProfiling");
+ this._registerDelegate("stopTimelineProfiler");
+ this._registerDelegate("storeLastActivePanel");
+ this._registerDelegate("takeHeapSnapshot");
+
+ this._registerDelegate("getAllStyles");
+ this._registerDelegate("getStyles");
+ this._registerDelegate("getComputedStyle");
+ this._registerDelegate("getInlineStyle");
+ this._registerDelegate("getStyleSheet");
+ this._registerDelegate("getRuleRanges");
+ this._registerDelegate("applyStyleText");
+ this._registerDelegate("setStyleText");
+ this._registerDelegate("setStyleProperty");
+ this._registerDelegate("toggleStyleEnabled");
+ this._registerDelegate("setRuleSelector");
+ this._registerDelegate("addRule");
+
+ this._registerDelegate("disableDebugger");
+ this._registerDelegate("editScriptSource");
+ this._registerDelegate("getScriptSource");
+ this._registerDelegate("enableDebugger");
+ this._registerDelegate("setBreakpoint");
+ this._registerDelegate("removeBreakpoint");
+ this._registerDelegate("activateBreakpoints");
+ this._registerDelegate("deactivateBreakpoints");
+ this._registerDelegate("resume");
+ this._registerDelegate("stepIntoStatement");
+ this._registerDelegate("stepOutOfFunction");
+ this._registerDelegate("stepOverStatement");
+ this._registerDelegate("setPauseOnExceptionsState");
}
WebInspector.InspectorBackendStub.prototype = {
- wrapCallback: function(func)
+ _registerDelegate: function(methodName)
{
- return func;
+ this[methodName] = this.sendMessageToBackend.bind(this, methodName);
},
- closeWindow: function()
- {
- this._windowVisible = false;
- },
-
- attach: function()
- {
- },
-
- detach: function()
- {
- },
-
- storeLastActivePanel: function(panel)
- {
- },
-
- clearConsoleMessages: function()
- {
- },
-
- getOuterHTML: function()
- {
- },
-
- setOuterHTML: function()
- {
- },
-
- addInspectedNode: function()
- {
- },
-
- search: function(sourceRow, query)
- {
- },
-
- moveByUnrestricted: function(x, y)
- {
- },
-
- getResourceContent: function(callId, identifier)
- {
- WebInspector.didGetResourceContent(callId, "");
- },
-
- highlightDOMNode: function(node)
- {
- },
-
- hideDOMNodeHighlight: function()
- {
- },
-
- inspectedWindow: function()
- {
- return window;
- },
-
- loaded: function()
- {
- },
-
- localizedStringsURL: function()
- {
- return undefined;
- },
-
- windowUnloading: function()
- {
- return false;
- },
-
- hiddenPanels: function()
- {
- return "";
- },
-
- enableResourceTracking: function()
- {
- WebInspector.resourceTrackingWasEnabled();
- },
-
- disableResourceTracking: function()
- {
- WebInspector.resourceTrackingWasDisabled();
- },
-
-
- enableSearchingForNode: function()
- {
- WebInspector.searchingForNodeWasEnabled();
- },
-
- disableSearchingForNode: function()
- {
- WebInspector.searchingForNodeWasDisabled();
- },
-
- enableMonitoringXHR: function()
- {
- WebInspector.monitoringXHRWasEnabled();
- },
-
- disableMonitoringXHR: function()
- {
- WebInspector.monitoringXHRWasDisabled();
- },
-
- reloadPage: function()
- {
- },
-
- enableDebugger: function()
- {
- WebInspector.debuggerWasEnabled();
- },
-
- disableDebugger: function()
- {
- WebInspector.debuggerWasDisabled();
- },
-
- setBreakpoint: function(callId, sourceID, line, enabled, condition)
- {
- WebInspector.didSetBreakpoint(callId, true, line);
- },
-
- removeBreakpoint: function(sourceID, line)
- {
- },
-
- activateBreakpoints: function()
- {
- this._breakpointsActivated = true;
- },
-
- deactivateBreakpoints: function()
- {
- this._breakpointsActivated = false;
- },
-
- pause: function()
- {
- },
-
- setPauseOnExceptionsState: function(value)
- {
- WebInspector.updatePauseOnExceptionsState(value);
- },
-
- editScriptSource: function()
- {
- WebInspector.didEditScriptSource(callId, false);
- },
-
- getScriptSource: function(callId, sourceID)
- {
- WebInspector.didGetScriptSource(callId, null);
- },
-
- resume: function()
- {
- },
-
- enableProfiler: function()
- {
- WebInspector.profilerWasEnabled();
- },
-
- disableProfiler: function()
- {
- WebInspector.profilerWasDisabled();
- },
-
- startProfiling: function()
- {
- },
-
- stopProfiling: function()
- {
- },
-
- getProfileHeaders: function(callId)
- {
- WebInspector.didGetProfileHeaders(callId, []);
- },
-
- getProfile: function(callId, uid)
- {
- },
-
- takeHeapSnapshot: function()
- {
- },
-
- databaseTableNames: function(database)
- {
- return [];
- },
-
- stepIntoStatement: function()
- {
- },
-
- stepOutOfFunction: function()
- {
- },
-
- stepOverStatement: function()
- {
- },
-
- saveApplicationSettings: function()
- {
- },
-
- saveSessionSettings: function()
- {
- },
-
- dispatchOnInjectedScript: function()
- {
- },
-
- releaseWrapperObjectGroup: function()
- {
- },
-
- setInjectedScriptSource: function()
- {
- },
-
- addScriptToEvaluateOnLoad: function()
- {
- },
-
- removeAllScriptsToEvaluateOnLoad: function()
- {
- },
-
- performSearch: function()
- {
- },
-
- searchCanceled: function()
+ sendMessageToBackend: function()
{
+ var message = JSON.stringify(Array.prototype.slice.call(arguments));
+ if (WebInspector._paramsObject && "page" in WebInspector._paramsObject)
+ WebInspector.socket.send(message);
+ else
+ InspectorFrontendHost.sendMessageToBackend(message);
}
}
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 9cc1823..9d136da 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,23 @@
+2010-07-27 Ilya Tikhonovsky <loislo at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: Current implementation of message based inspector
+ transport generated by CodeGeneratorInspector should be upstreamed
+ from WebKit/chromium to WebCore.
+ https://bugs.webkit.org/show_bug.cgi?id=42983
+
+ * WebKit.gypi:
+ * src/InspectorFrontendClientImpl.cpp:
+ (WebKit::InspectorFrontendClientImpl::sendMessageToBackend):
+ * src/InspectorFrontendClientImpl.h:
+ * src/ToolsAgent.h:
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgentImpl::dispatchOnInspectorController):
+ (WebKit::WebDevToolsAgentImpl::initDevToolsAgentHost):
+ * src/WebDevToolsAgentImpl.h:
+ * src/js/InspectorControllerImpl.js: Removed.
+
2010-07-27 Dominic Mazzoni <dmazzoni at google.com>
Reviewed by Chris Fleizach.
diff --git a/WebKit/chromium/WebKit.gypi b/WebKit/chromium/WebKit.gypi
index 7d7b19c..b45e3e7 100644
--- a/WebKit/chromium/WebKit.gypi
+++ b/WebKit/chromium/WebKit.gypi
@@ -33,7 +33,6 @@
# List of DevTools source files, ordered by dependencies. It is used both
# for copying them to resource dir, and for generating 'devtools.html' file.
'devtools_js_files': [
- 'src/js/InspectorControllerImpl.js',
'src/js/ProfilerAgent.js',
'src/js/ProfilerProcessor.js',
'src/js/HeapProfilerPanel.js',
diff --git a/WebKit/chromium/src/InspectorFrontendClientImpl.cpp b/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
index 73cedfa..870bdee 100644
--- a/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
+++ b/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
@@ -124,4 +124,15 @@ void InspectorFrontendClientImpl::inspectedURLChanged(const String& url)
m_frontendPage->mainFrame()->document()->setTitle("Developer Tools - " + url);
}
+void InspectorFrontendClientImpl::sendMessageToBackend(const String& message)
+{
+ WebDevToolsMessageData messageData;
+ messageData.className = "ToolsAgent";
+ messageData.methodName = "dispatchOnInspectorController";
+ WebVector<WebString> args(static_cast<size_t>(1));
+ args[0] = message;
+ messageData.arguments.swap(args);
+ m_client->sendMessageToAgent(messageData);
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/InspectorFrontendClientImpl.h b/WebKit/chromium/src/InspectorFrontendClientImpl.h
index f869ac3..f7174ce 100644
--- a/WebKit/chromium/src/InspectorFrontendClientImpl.h
+++ b/WebKit/chromium/src/InspectorFrontendClientImpl.h
@@ -68,6 +68,7 @@ public:
virtual void inspectedURLChanged(const WebCore::String&);
+ virtual void sendMessageToBackend(const WebCore::String&);
private:
WebCore::Page* m_frontendPage;
WebDevToolsFrontendClient* m_client;
diff --git a/WebKit/chromium/src/ToolsAgent.h b/WebKit/chromium/src/ToolsAgent.h
index c9a15d5..937fcf0 100644
--- a/WebKit/chromium/src/ToolsAgent.h
+++ b/WebKit/chromium/src/ToolsAgent.h
@@ -39,8 +39,7 @@ namespace WebKit {
// API for auxiliary UI functions such as dom elements highlighting.
#define TOOLS_AGENT_STRUCT(METHOD0, METHOD1, METHOD2, METHOD3, METHOD4, METHOD5) \
/* Dispatches given function on the InspectorController object */ \
- METHOD2(dispatchOnInspectorController, int /* call_id */, \
- String /* message */) \
+ METHOD1(dispatchOnInspectorController, String /* message */) \
DEFINE_RPC_CLASS(ToolsAgent, TOOLS_AGENT_STRUCT)
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
index 3d79e0c..1a65bfe 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
@@ -55,7 +55,6 @@
#include "ScriptState.h"
#include "ScriptValue.h"
#include "V8Binding.h"
-#include "V8InspectorBackend.h"
#include "V8Proxy.h"
#include "V8Utilities.h"
#include "WebDataSource.h"
@@ -93,7 +92,6 @@ using WebCore::ScriptState;
using WebCore::ScriptValue;
using WebCore::String;
using WebCore::V8DOMWrapper;
-using WebCore::V8InspectorBackend;
using WebCore::V8Proxy;
namespace WebKit {
@@ -309,11 +307,9 @@ void WebDevToolsAgentImpl::forceRepaint()
m_client->forceRepaint();
}
-void WebDevToolsAgentImpl::dispatchOnInspectorController(int callId, const String& message)
+void WebDevToolsAgentImpl::dispatchOnInspectorController(const String& message)
{
- String exception;
- inspectorController()->inspectorBackendDispatcher()->dispatch(message, &exception);
- m_toolsAgentDelegateStub->didDispatchOn(callId, "", exception);
+ inspectorController()->inspectorBackendDispatcher()->dispatch(message);
}
void WebDevToolsAgentImpl::dispatchMessageFromFrontend(const WebDevToolsMessageData& data)
@@ -375,38 +371,6 @@ void WebDevToolsAgentImpl::initDevToolsAgentHost()
"dispatch",
WebDevToolsAgentImpl::jsDispatchOnClient);
devtoolsAgentHost.build();
-
- v8::HandleScope scope;
- v8::Context::Scope utilityScope(m_utilityContext);
- // Call custom code to create inspector backend wrapper in the utility context
- // instead of calling V8DOMWrapper::convertToV8Object that would create the
- // wrapper in the Page main frame context.
- v8::Handle<v8::Object> backendWrapper = createInspectorBackendV8Wrapper();
- if (backendWrapper.IsEmpty())
- return;
- m_utilityContext->Global()->Set(v8::String::New("InspectorBackend"), backendWrapper);
-}
-
-v8::Local<v8::Object> WebDevToolsAgentImpl::createInspectorBackendV8Wrapper()
-{
- v8::Handle<v8::Function> function = V8InspectorBackend::GetTemplate()->GetFunction();
- if (function.IsEmpty()) {
- // Return if allocation failed.
- return v8::Local<v8::Object>();
- }
- v8::Local<v8::Object> instance = SafeAllocation::newInstance(function);
- if (instance.IsEmpty()) {
- // Avoid setting the wrapper if allocation failed.
- return v8::Local<v8::Object>();
- }
- InspectorBackend* backend = m_webViewImpl->page()->inspectorController()->inspectorBackend();
- V8DOMWrapper::setDOMWrapper(instance, &V8InspectorBackend::info, backend);
- // Create a weak reference to the v8 wrapper of InspectorBackend to deref
- // InspectorBackend when the wrapper is garbage collected.
- backend->ref();
- v8::Persistent<v8::Object> weakHandle = v8::Persistent<v8::Object>::New(instance);
- weakHandle.MakeWeak(backend, &InspectorBackendWeakReferenceCallback);
- return instance;
}
void WebDevToolsAgentImpl::createInspectorFrontendProxy()
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.h b/WebKit/chromium/src/WebDevToolsAgentImpl.h
index 1bb71a3..c8e22b0 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.h
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.h
@@ -72,7 +72,7 @@ public:
virtual ~WebDevToolsAgentImpl();
// ToolsAgent implementation.
- virtual void dispatchOnInspectorController(int callId, const WebCore::String& message);
+ virtual void dispatchOnInspectorController(const WebCore::String& message);
// WebDevToolsAgentPrivate implementation.
virtual void didClearWindowObject(WebFrameImpl* frame);
@@ -127,12 +127,6 @@ private:
WebCore::InspectorController* inspectorController();
- // Creates InspectorBackend v8 wrapper in the utility context so that it's
- // methods prototype is Function.protoype object from the utility context.
- // Otherwise some useful methods defined on Function.prototype(such as bind)
- // are missing for InspectorController native methods.
- v8::Local<v8::Object> createInspectorBackendV8Wrapper();
-
int m_hostId;
WebDevToolsAgentClient* m_client;
WebViewImpl* m_webViewImpl;
diff --git a/WebKit/chromium/src/js/InspectorControllerImpl.js b/WebKit/chromium/src/js/InspectorControllerImpl.js
deleted file mode 100644
index d8ee1e4..0000000
--- a/WebKit/chromium/src/js/InspectorControllerImpl.js
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @fileoverview DevTools' implementation of the InspectorController API.
- */
-
-if (!this.devtools)
- devtools = {};
-
-devtools.InspectorBackendImpl = function()
-{
- WebInspector.InspectorBackendStub.call(this);
- this.installInspectorControllerDelegate_("addInspectedNode");
- this.installInspectorControllerDelegate_("addScriptToEvaluateOnLoad");
- this.installInspectorControllerDelegate_("changeTagName");
- this.installInspectorControllerDelegate_("clearConsoleMessages");
- this.installInspectorControllerDelegate_("copyNode");
- this.installInspectorControllerDelegate_("deleteCookie");
- this.installInspectorControllerDelegate_("didEvaluateForTestInFrontend");
- this.installInspectorControllerDelegate_("disableMonitoringXHR");
- this.installInspectorControllerDelegate_("disableResourceTracking");
- this.installInspectorControllerDelegate_("disableSearchingForNode");
- this.installInspectorControllerDelegate_("disableTimeline");
- this.installInspectorControllerDelegate_("dispatchOnInjectedScript");
- this.installInspectorControllerDelegate_("enableMonitoringXHR");
- this.installInspectorControllerDelegate_("enableResourceTracking");
- this.installInspectorControllerDelegate_("enableSearchingForNode");
- this.installInspectorControllerDelegate_("enableTimeline");
- this.installInspectorControllerDelegate_("getChildNodes");
- this.installInspectorControllerDelegate_("getCookies");
- this.installInspectorControllerDelegate_("getApplicationCaches");
- this.installInspectorControllerDelegate_("getDatabaseTableNames");
- this.installInspectorControllerDelegate_("getDOMStorageEntries");
- this.installInspectorControllerDelegate_("getEventListenersForNode");
- this.installInspectorControllerDelegate_("getOuterHTML");
- this.installInspectorControllerDelegate_("getProfile");
- this.installInspectorControllerDelegate_("getProfileHeaders");
- this.installInspectorControllerDelegate_("removeProfile");
- this.installInspectorControllerDelegate_("clearProfiles");
- this.installInspectorControllerDelegate_("getResourceContent");
- this.installInspectorControllerDelegate_("highlightDOMNode");
- this.installInspectorControllerDelegate_("hideDOMNodeHighlight");
- this.installInspectorControllerDelegate_("performSearch");
- this.installInspectorControllerDelegate_("pushNodeByPathToFrontend");
- this.installInspectorControllerDelegate_("releaseWrapperObjectGroup");
- this.installInspectorControllerDelegate_("removeAllScriptsToEvaluateOnLoad");
- this.installInspectorControllerDelegate_("reloadPage");
- this.installInspectorControllerDelegate_("removeAttribute");
- this.installInspectorControllerDelegate_("removeDOMStorageItem");
- this.installInspectorControllerDelegate_("removeNode");
- this.installInspectorControllerDelegate_("saveApplicationSettings");
- this.installInspectorControllerDelegate_("saveSessionSettings");
- this.installInspectorControllerDelegate_("searchCanceled");
- this.installInspectorControllerDelegate_("setAttribute");
- this.installInspectorControllerDelegate_("setDOMStorageItem");
- this.installInspectorControllerDelegate_("setInjectedScriptSource");
- this.installInspectorControllerDelegate_("setOuterHTML");
- this.installInspectorControllerDelegate_("setTextNodeValue");
- this.installInspectorControllerDelegate_("startProfiling");
- this.installInspectorControllerDelegate_("startTimelineProfiler");
- this.installInspectorControllerDelegate_("stopProfiling");
- this.installInspectorControllerDelegate_("stopTimelineProfiler");
- this.installInspectorControllerDelegate_("storeLastActivePanel");
- this.installInspectorControllerDelegate_("takeHeapSnapshot");
-
- this.installInspectorControllerDelegate_("getAllStyles");
- this.installInspectorControllerDelegate_("getStyles");
- this.installInspectorControllerDelegate_("getComputedStyle");
- this.installInspectorControllerDelegate_("getInlineStyle");
- this.installInspectorControllerDelegate_("getStyleSheet");
- this.installInspectorControllerDelegate_("getRuleRanges");
- this.installInspectorControllerDelegate_("applyStyleText");
- this.installInspectorControllerDelegate_("setStyleText");
- this.installInspectorControllerDelegate_("setStyleProperty");
- this.installInspectorControllerDelegate_("toggleStyleEnabled");
- this.installInspectorControllerDelegate_("setRuleSelector");
- this.installInspectorControllerDelegate_("addRule");
-
- this.installInspectorControllerDelegate_("disableDebugger");
- this.installInspectorControllerDelegate_("editScriptSource");
- this.installInspectorControllerDelegate_("getScriptSource");
- this.installInspectorControllerDelegate_("enableDebugger");
- this.installInspectorControllerDelegate_("setBreakpoint");
- this.installInspectorControllerDelegate_("removeBreakpoint");
- this.installInspectorControllerDelegate_("activateBreakpoints");
- this.installInspectorControllerDelegate_("deactivateBreakpoints");
- this.installInspectorControllerDelegate_("resume");
- this.installInspectorControllerDelegate_("stepIntoStatement");
- this.installInspectorControllerDelegate_("stepOutOfFunction");
- this.installInspectorControllerDelegate_("stepOverStatement");
- this.installInspectorControllerDelegate_("setPauseOnExceptionsState");
-};
-devtools.InspectorBackendImpl.prototype.__proto__ = WebInspector.InspectorBackendStub.prototype;
-
-
-devtools.InspectorBackendImpl.prototype.pause = function()
-{
- RemoteDebuggerCommandExecutor.DebuggerPauseScript();
-};
-
-
-/**
- * Installs delegating handler into the inspector controller.
- * @param {string} methodName Method to install delegating handler for.
- */
-devtools.InspectorBackendImpl.prototype.installInspectorControllerDelegate_ = function(methodName)
-{
- this[methodName] = this.callInspectorController_.bind(this, methodName);
-};
-
-
-/**
- * Bound function with the installInjectedScriptDelegate_ actual
- * implementation.
- */
-devtools.InspectorBackendImpl.prototype.callInspectorController_ = function()
-{
- var args = Array.prototype.slice.call(arguments);
- var message = JSON.stringify(args);
- var callbackId = WebInspector.Callback.wrap(function(){});
- if ("page" in WebInspector._paramsObject)
- WebInspector.socket.send(callbackId + " " + message);
- else
- RemoteToolsAgent.dispatchOnInspectorController(callbackId, message);
-};
-
-
-InspectorBackend = new devtools.InspectorBackendImpl();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list