2010-07-12 Ilya Tikhonovsky <loislo@chromium.org>
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Jul 2010 12:26:13 +0000 (12:26 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Jul 2010 12:26:13 +0000 (12:26 +0000)
        Reviewed by Yury Semikhatsky.

        WebInspector: Next iteration of Inspector code generator.
        The InspectorFrontend2 was replaced by slightly modified version of
        InspectorBackend file (Inspector.idl). At the end all the interface
        between WebInspector and inspected page will be specified by this file
        and generated by CodeGeneratorInspector (InspectorFrontend.cpp,
        InspectorBackend.cpp and InspectorBackend.js).
        https://bugs.webkit.org/show_bug.cgi?id=42104

        * DerivedSources.make:
        * GNUmakefile.am:
        * WebCore.gyp/WebCore.gyp:
        * WebCore.gyp/scripts/rule_binding.py:
        * WebCore.gypi:
        * WebCore.pri:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/scripts/IDLParser.pm:
        * bindings/scripts/IDLStructure.pm:
        * bindings/scripts/generate-bindings.pl:
        * inspector/CodeGeneratorInspector.pm:
        * inspector/Inspector.idl: Added.
        * inspector/InspectorCSSStore.cpp:
        (WebCore::InspectorCSSStore::inspectorStyleSheet):
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::connectFrontend):
        (WebCore::InspectorController::startTimelineProfiler):
        * inspector/InspectorController.h:
        (WebCore::InspectorController::remoteInspectorFrontend):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::InspectorDOMAgent):
        * inspector/InspectorDOMAgent.h:
        (WebCore::InspectorDOMAgent::create):
        * inspector/InspectorFrontend2.idl: Removed.
        * inspector/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
        (WebCore::InspectorTimelineAgent::resetFrontendProxyObject):
        * inspector/InspectorTimelineAgent.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63198 268f45cc-cd09-0410-ab3c-d52691b4dbfc

24 files changed:
WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/GNUmakefile.am
WebCore/WebCore.gyp/WebCore.gyp
WebCore/WebCore.gyp/scripts/rule_binding.py
WebCore/WebCore.gypi
WebCore/WebCore.pri
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/scripts/IDLParser.pm
WebCore/bindings/scripts/IDLStructure.pm
WebCore/bindings/scripts/generate-bindings.pl
WebCore/inspector/CodeGeneratorInspector.pm
WebCore/inspector/Inspector.idl [new file with mode: 0644]
WebCore/inspector/InspectorCSSStore.cpp
WebCore/inspector/InspectorController.cpp
WebCore/inspector/InspectorController.h
WebCore/inspector/InspectorDOMAgent.cpp
WebCore/inspector/InspectorDOMAgent.h
WebCore/inspector/InspectorFrontend2.idl [deleted file]
WebCore/inspector/InspectorTimelineAgent.cpp
WebCore/inspector/InspectorTimelineAgent.h
cmake/WebKitGenerators.cmake

index aa94d1eac45f78ae238448e9e0b199cb865d4db9..2a4f42ebbe2c8e06226e83edb67690180a75c353 100644 (file)
@@ -1717,7 +1717,7 @@ FOREACH (_file ${WebCore_IDL_PURE_FILES})
     GENERATE_JS_FROM_IDL_PURE(${_file})
 ENDFOREACH ()
 
-GENERATE_INSPECTOR_FROM_IDL(inspector/InspectorFrontend2.idl)
+GENERATE_INSPECTOR_FROM_IDL(inspector/Inspector.idl)
 
 LIST(APPEND WebCore_SOURCES ${JS_IDL_FILES} ${Inspector_IDL_FILES})
 
index b0eff9ec4a60e8fc5648b3b17ae600b29d3f4f32..53771f3b62ed48865d9ed67d80ccde8d556e4644 100644 (file)
@@ -1,3 +1,44 @@
+2010-07-12  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        WebInspector: Next iteration of Inspector code generator.
+        The InspectorFrontend2 was replaced by slightly modified version of
+        InspectorBackend file (Inspector.idl). At the end all the interface
+        between WebInspector and inspected page will be specified by this file
+        and generated by CodeGeneratorInspector (InspectorFrontend.cpp,
+        InspectorBackend.cpp and InspectorBackend.js).
+        https://bugs.webkit.org/show_bug.cgi?id=42104
+
+        * DerivedSources.make:
+        * GNUmakefile.am:
+        * WebCore.gyp/WebCore.gyp:
+        * WebCore.gyp/scripts/rule_binding.py:
+        * WebCore.gypi:
+        * WebCore.pri:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/scripts/IDLParser.pm:
+        * bindings/scripts/IDLStructure.pm:
+        * bindings/scripts/generate-bindings.pl:
+        * inspector/CodeGeneratorInspector.pm:
+        * inspector/Inspector.idl: Added.
+        * inspector/InspectorCSSStore.cpp:
+        (WebCore::InspectorCSSStore::inspectorStyleSheet):
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::connectFrontend):
+        (WebCore::InspectorController::startTimelineProfiler):
+        * inspector/InspectorController.h:
+        (WebCore::InspectorController::remoteInspectorFrontend):
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::InspectorDOMAgent):
+        * inspector/InspectorDOMAgent.h:
+        (WebCore::InspectorDOMAgent::create):
+        * inspector/InspectorFrontend2.idl: Removed.
+        * inspector/InspectorTimelineAgent.cpp:
+        (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
+        (WebCore::InspectorTimelineAgent::resetFrontendProxyObject):
+        * inspector/InspectorTimelineAgent.h:
+
 2010-07-12  Steve Block  <steveblock@google.com>
 
         Reviewed by Jeremy Orlow.
index 8430024f8080103940ee06b5dff2f8c23e24b447..7c53e8695bc837dc9b00cb79e9fe85b7d0f456ee 100644 (file)
@@ -471,11 +471,11 @@ DOM_CLASSES = \
     XSLTProcessor \
 #
 
-INSPECTOR_CLASSES = InspectorFrontend2
+INSPECTOR_CLASSES = Inspector
 
 .PHONY : all
 
-JS_DOM_HEADERS=$(filter-out JSEventListener.h JSEventTarget.h,$(DOM_CLASSES:%=JS%.h) $(INSPECTOR_CLASSES:%=Remote%.h))
+JS_DOM_HEADERS=$(filter-out JSEventListener.h JSEventTarget.h,$(DOM_CLASSES:%=JS%.h) $(INSPECTOR_CLASSES:%=Remote%Frontend.h))
 
 all : \
     remove-stray-plugin-and-mime-type-files \
@@ -808,8 +808,8 @@ JS%.h : %.idl $(JS_BINDINGS_SCRIPTS)
 
 INSPECTOR_GENERATOR_SCRIPTS = $(GENERATE_SCRIPTS) inspector/CodeGeneratorInspector.pm
 
-Remote%.h : %.idl $(INSPECTOR_GENERATOR_SCRIPTS)
-       $(call generator_script, $(INSPECTOR_GENERATOR_SCRIPTS)) --outputDir .  --defines "LANGUAGE_JAVASCRIPT" --generator Inspector $<
+Remote%Frontend.h : %.idl $(INSPECTOR_GENERATOR_SCRIPTS)
+       $(call generator_script, $(INSPECTOR_GENERATOR_SCRIPTS)) --outputDir .  --defines "$(FEATURE_DEFINES) LANGUAGE_JAVASCRIPT" --generator Inspector $<
 
 -include $(JS_DOM_HEADERS:.h=.dep)
 
index 8823ad8e2764591297aa72c23bbafdb681e3f49e..7fa80939bc08c19c65fade5f9b84b32548d41a38 100644 (file)
@@ -99,8 +99,8 @@ webcore_built_sources += \
        DerivedSources/WebCore/HTMLNames.cpp \
        DerivedSources/WebCore/HTMLNames.h \
        DerivedSources/WebCore/JSHTMLElementWrapperFactory.cpp \
-       DerivedSources/WebCore/RemoteInspectorFrontend2.cpp \
-       DerivedSources/WebCore/RemoteInspectorFrontend2.h \
+       DerivedSources/WebCore/RemoteInspectorFrontend.cpp \
+       DerivedSources/WebCore/RemoteInspectorFrontend.h \
        DerivedSources/WebCore/UserAgentStyleSheets.h \
        DerivedSources/WebCore/UserAgentStyleSheetsData.cpp \
        DerivedSources/WebCore/XMLNSNames.cpp \
@@ -339,7 +339,7 @@ IDL_BINDINGS += \
 # of libWebCoreJS, so we add it directly to  the header list here, so
 # that it will be included in the distribution.
 noinst_HEADERS += \
-       WebCore/inspector/InspectorFrontend2.idl
+       WebCore/inspector/Inspector.idl
 
 webcoregtk_dom_sources = \
        WebCore/bindings/gobject/ConvertToUTF8String.cpp \
@@ -3986,7 +3986,7 @@ DerivedSources/WebCore/XMLNames.cpp DerivedSources/WebCore/XMLNames.h: $(WebCore
        $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --attrs $(WebCore)/xml/xmlattrs.in --outputDir "$(GENSOURCES_WEBCORE)"
 
 # Remote Inspector frontend
-DerivedSources/WebCore/RemoteInspectorFrontend2.cpp DerivedSources/WebCore/RemoteInspectorFrontend2.h: $(WebCore)/inspector/InspectorFrontend2.idl $(SCRIPTS_BINDINGS) $(WebCore)/inspector/CodeGeneratorInspector.pm
+DerivedSources/WebCore/RemoteInspectorFrontend.cpp DerivedSources/WebCore/RemoteInspectorFrontend.h: $(WebCore)/inspector/Inspector.idl $(SCRIPTS_BINDINGS) $(WebCore)/inspector/CodeGeneratorInspector.pm
        $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts -I$(WebCore)/inspector $(WebCore)/bindings/scripts/generate-bindings.pl $(IDL_PATH:%=--include "%") --outputDir "$(GENSOURCES_WEBCORE)" --defines "LANGUAGE_JAVASCRIPT=1 $(FEATURE_DEFINES)" --generator Inspector $<
 
 IDL_PATH := \
index 3b94644a074664ecce0dc003a179e80d47e0b512..0c3fa81a546a446e3e95fa0a80b876867dccc920 100644 (file)
           ],
         },
         {
-          'action_name': 'InspectorFrontend2',
+          'action_name': 'RemoteInspectorFrontend',
           'inputs': [
             '../bindings/scripts/generate-bindings.pl',
             '../bindings/scripts/CodeGenerator.pm',
             '../bindings/scripts/IDLParser.pm',
             '../bindings/scripts/IDLStructure.pm',
             '../inspector/CodeGeneratorInspector.pm',
-            '../inspector/InspectorFrontend2.idl',
+            '../inspector/Inspector.idl',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/RemoteInspectorFrontend2.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/RemoteInspectorFrontend2.h',
+            '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/RemoteInspectorFrontend.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/RemoteInspectorFrontend.h',
           ],
           'variables': {
             'generator_include_dirs': [
           'action': [
             'python',
             'scripts/rule_binding.py',
-            '../inspector/InspectorFrontend2.idl',
+            '../inspector/Inspector.idl',
             '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings',
             '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
             '--',
             '<@(_inputs)',
             '--',
-            '--defines', 'LANGUAGE_JAVASCRIPT',
-            '--prefix', 'Remote',
+            '--defines', '<(feature_defines) LANGUAGE_JAVASCRIPT',
+            '--filename', 'RemoteInspectorFrontend',
             '--generator', 'Inspector',
             '<@(generator_include_dirs)'
           ],
-          'message': 'Generating InspectorFrontend2 class from InspectorFrontend2.idl',
+          'message': 'Generating RemoteInspectorFrontend class from Inspector.idl',
         },
         {
           'action_name': 'XMLNames',
         '<(SHARED_INTERMEDIATE_DIR)/webkit/XPathGrammar.cpp',
 
         # Additional .cpp files from the webcore_inspector_sources list.
-        '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/RemoteInspectorFrontend2.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/RemoteInspectorFrontend.cpp',
       ],
       'conditions': [
         ['javascript_engine=="v8"', {
index f7f3ed1207eb752d6e32361b94f250cb7cbaca4d..bb4c2a56c8a514dbf827c27a622166a68f51f3d1 100644 (file)
@@ -100,6 +100,10 @@ def main(args):
     else:
         prefixIndex = options.index('--generator')
 
+    fileName = ''
+    if '--filename' in options:
+        fileName = options[options.index('--filename') + 1]
+
     if prefixIndex + 1 < len(options):
         prefix = options[prefixIndex + 1]
 
@@ -130,7 +134,10 @@ def main(args):
     if cppdir != hdir:
         inputBasename = os.path.basename(input)
         (root, ext) = os.path.splitext(inputBasename)
-        hname = '%s%s.h' % (prefix, root)
+        if fileName != '':
+            hname = '%s.h' % (fileName)
+        else:
+            hname = '%s%s.h' % (prefix, root)
         hsrc = os.path.join(cppdir, hname)
         hdst = os.path.join(hdir, hname)
         shutil.copyfile(hsrc, hdst)
index 32c2f753dfd07909dc627f9d4458ab9af9ba7b94..1d2363b9f002797e97450454fba2cb43ef23c2b9 100644 (file)
             'xml/XSLTProcessor.idl',
         ],
         'webcore_inspector_idl_files': [
-            'inspector/InspectorFrontend2.idl',
+            'inspector/Inspector.idl',
         ],
         'webcore_svg_bindings_idl_files': [
             'svg/ElementTimeControl.idl',
index 1451984b6e48a513c4f18c2b5e55bd895f326fe1..7e4fd81ad073875f1f1606bb143e728268dd3732 100644 (file)
@@ -664,7 +664,7 @@ IDL_BINDINGS += \
     xml/XPathEvaluator.idl \
     xml/XSLTProcessor.idl
 
-INSPECTOR_INTERFACES = inspector/InspectorFrontend2.idl
+INSPECTOR_INTERFACES = inspector/Inspector.idl
 
 mathmlnames.output = $${WC_GENERATED_SOURCES_DIR}/MathMLNames.cpp
 mathmlnames.input = MATHML_NAMES
@@ -728,7 +728,7 @@ idl.depends = $$PWD/bindings/scripts/CodeGenerator.pm \
 addExtraCompiler(idl)
 
 # GENERATOR 2: inspector idl compiler
-inspectorIDL.output = $${WC_GENERATED_SOURCES_DIR}/Remote${QMAKE_FILE_BASE}.cpp
+inspectorIDL.output = $${WC_GENERATED_SOURCES_DIR}/Remote${QMAKE_FILE_BASE}Frontend.cpp
 inspectorIDL.input = INSPECTOR_INTERFACES
 inspectorIDL.wkScript = $$PWD/bindings/scripts/generate-bindings.pl
 inspectorIDL.commands = perl -I$$PWD/bindings/scripts -I$$PWD/inspector $$inspectorIDL.wkScript --defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" --generator Inspector --outputDir $$WC_GENERATED_SOURCES_DIR --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME}
index e08d46e96af43f5d7cfa4e7839b2eebe411449c0..8c86968e8c651328bac770570399aab79d571685 100644 (file)
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\RemoteInspectorFrontend2.cpp"\r
+                               RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\RemoteInspectorFrontend.cpp"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\RemoteInspectorFrontend2.h"\r
+                               RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\RemoteInspectorFrontend.h"\r
                                >\r
                        </File>\r
                        <File\r
index a978e4e814cf9e6baae015c4e8674f917dfd5895..cb3d542b7217ec75db8312342081bf7b2a105ca0 100644 (file)
                4F1534E011B533020021FD86 /* EditingBehaviorTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F1534DF11B533020021FD86 /* EditingBehaviorTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
                4F3289B511A42AAB005ABE7E /* InspectorValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F3289B311A42AAB005ABE7E /* InspectorValues.cpp */; };
                4F3289B611A42AAB005ABE7E /* InspectorValues.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F3289B411A42AAB005ABE7E /* InspectorValues.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               4F4F5FFB11CBD2E100A186BF /* RemoteInspectorFrontend2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F4F5FFA11CBD2D200A186BF /* RemoteInspectorFrontend2.cpp */; };
+               4F4F5FFB11CBD2E100A186BF /* RemoteInspectorFrontend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F4F5FFA11CBD2D200A186BF /* RemoteInspectorFrontend.cpp */; };
                4FD8D0F2119C718B002FA825 /* ScriptGCEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */; };
                4FD8D0F3119C718B002FA825 /* ScriptGCEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */; };
                510184690B08602A004A825F /* CachedPage.h in Headers */ = {isa = PBXBuildFile; fileRef = 510184670B08602A004A825F /* CachedPage.h */; settings = {ATTRIBUTES = (Private, ); }; };
                4F1534DF11B533020021FD86 /* EditingBehaviorTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditingBehaviorTypes.h; sourceTree = "<group>"; };
                4F3289B311A42AAB005ABE7E /* InspectorValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorValues.cpp; sourceTree = "<group>"; };
                4F3289B411A42AAB005ABE7E /* InspectorValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorValues.h; sourceTree = "<group>"; };
-               4F4F5FFA11CBD2D200A186BF /* RemoteInspectorFrontend2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteInspectorFrontend2.cpp; sourceTree = "<group>"; };
-               4F4F5FFC11CBD30100A186BF /* RemoteInspectorFrontend2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteInspectorFrontend2.h; sourceTree = "<group>"; };
+               4F4F5FFA11CBD2D200A186BF /* RemoteInspectorFrontend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteInspectorFrontend.cpp; sourceTree = "<group>"; };
+               4F4F5FFC11CBD30100A186BF /* RemoteInspectorFrontend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteInspectorFrontend.h; sourceTree = "<group>"; };
                4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptGCEvent.cpp; sourceTree = "<group>"; };
                4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptGCEvent.h; sourceTree = "<group>"; };
                510184670B08602A004A825F /* CachedPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedPage.h; sourceTree = "<group>"; };
                                9FA37EF71172FD9300C4CD55 /* JSScriptProfile.h */,
                                9FA37EF81172FD9300C4CD55 /* JSScriptProfileNode.cpp */,
                                9FA37EF91172FD9300C4CD55 /* JSScriptProfileNode.h */,
-                               4F4F5FFA11CBD2D200A186BF /* RemoteInspectorFrontend2.cpp */,
-                               4F4F5FFC11CBD30100A186BF /* RemoteInspectorFrontend2.h */,
+                               4F4F5FFA11CBD2D200A186BF /* RemoteInspectorFrontend.cpp */,
+                               4F4F5FFC11CBD30100A186BF /* RemoteInspectorFrontend.h */,
                        );
                        name = Inspector;
                        sourceTree = "<group>";
                                97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */,
                                B885E8D411E06DD2009FFBF4 /* InspectorApplicationCacheAgent.cpp in Sources */,
                                BCA8C81F11E3D36900812FB7 /* BackForwardController.cpp in Sources */,
-                               4F4F5FFB11CBD2E100A186BF /* RemoteInspectorFrontend2.cpp in Sources */,
+                               4F4F5FFB11CBD2E100A186BF /* RemoteInspectorFrontend.cpp in Sources */,
                                97EF561011E40783007E026F /* HTMLConstructionSite.cpp in Sources */,
                                BCA8CA5F11E4E6D100812FB7 /* BackForwardListImpl.cpp in Sources */,
                                8A9A587011E84C36008ACFD1 /* JSNavigation.cpp in Sources */,
index e250a4da474e1b76d5e08a31a326aeac5399d5d5..927deb916f119db73c3c1a494ad0de3c3877b249 100644 (file)
@@ -329,11 +329,13 @@ sub ParseInterface
                     my $line = $_;
 
                     $line =~ /$IDLStructure::interfaceParameterSelector/;
-                    my $paramExtendedAttributes = (defined($1) ? $1 : " "); chop($paramExtendedAttributes);
-                    my $paramType = (defined($2) ? $2 : die("Parsing error!\nSource:\n$line\n)"));
-                    my $paramName = (defined($3) ? $3 : die("Parsing error!\nSource:\n$line\n)"));
+                    my $paramDirection = $1;
+                    my $paramExtendedAttributes = (defined($2) ? $2 : " "); chop($paramExtendedAttributes);
+                    my $paramType = (defined($3) ? $3 : die("Parsing error!\nSource:\n$line\n)"));
+                    my $paramName = (defined($4) ? $4 : die("Parsing error!\nSource:\n$line\n)"));
 
                     my $paramDataNode = new domSignature();
+                    $paramDataNode->direction($paramDirection);
                     $paramDataNode->name($paramName);
                     $paramDataNode->type($paramType);
                     $paramDataNode->extendedAttributes(parseExtendedAttributes($paramExtendedAttributes));
index d61fce1c8fc6925681c5c19253d306b7eaa411ee..2eda6969c2567a813090bc20d72888b7b70e20bf 100644 (file)
@@ -59,6 +59,7 @@ struct( domAttribute => {
 
 # Used to represent a map of 'variable name' <-> 'variable type'
 struct( domSignature => {
+    direction => '$', # Variable direction (in or out)
     name => '$',      # Variable name
     type => '$',      # Variable type
     extendedAttributes => '$' # Extended attributes
@@ -100,7 +101,7 @@ our $exceptionSubSelector = '{\s*' . $supportedTypes . '\s*(' . $idlType . '*)\s
 
 our $interfaceSelector = 'interface\s*((?:' . $extendedAttributeSyntax . ' )?)(' . $idlIdNs . '*)\s*(?::(\s*[^{]*))?{([a-zA-Z0-9_=\s(),;:\[\]&\|]*)';
 our $interfaceMethodSelector = '\s*((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . '\s*(' . $idlIdNs . '*)\s*\(\s*([a-zA-Z0-9:\s,=\[\]]*)';
-our $interfaceParameterSelector = 'in\s*((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . '\s*(' . $idlIdNs . '*)';
+our $interfaceParameterSelector = '(in|out)\s*((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . '\s*(' . $idlIdNs . '*)';
 
 our $interfaceAttributeSelector = '\s*(readonly attribute|attribute)\s*(' . $extendedAttributeSyntax . ' )?' . $supportedTypes . '\s*(' . $idlType . '*)';
 
index b293b3cc96b3c0e790ecacef79a570f370704829..aee81b5891dd40ea072839a5c9baa3104502f464 100755 (executable)
@@ -42,6 +42,7 @@ my $outputDirectory;
 my $generator;
 my $defines;
 my $prefix;
+my $filename;
 my $preprocessor;
 my $writeDependencies;
 my $verbose;
@@ -51,6 +52,7 @@ GetOptions('include=s@' => \@idlDirectories,
            'generator=s' => \$generator,
            'defines=s' => \$defines,
            'prefix=s' => \$prefix,
+           'filename=s' => \$filename,
            'preprocessor=s' => \$preprocessor,
            'verbose' => \$verbose,
            'write-dependencies' => \$writeDependencies);
index cadfaace5996362e17d87459eade62ea1f8f97d8..b20eda148f8bafcc77686d41259713f21ab9f270 100644 (file)
@@ -92,10 +92,11 @@ my $writeDependencies;
 my $verbose;
 
 my $namespace;
-my $fileName;
+my $frontendClassName;
 my %discoveredTypes;
+my %generatedFunctions;
 
-my @classDefinition;
+my @frontendClassDeclaration;
 my @functionDefinitions;
 
 sub typeSpec
@@ -133,6 +134,7 @@ sub GenerateModule
     my $dataNode = shift;
 
     $namespace = $dataNode->module;
+    $namespace =~ s/core/WebCore/;
 }
 
 # Params: 'idlDocument' struct
@@ -143,49 +145,73 @@ sub GenerateInterface
     my $defines = shift;
 
     my $className = $interface->name;
-    $fileName = $className;
+    $frontendClassName = "Remote" . $className . "Frontend";
 
     $discoveredTypes{"String"} = 1;
     $discoveredTypes{"InspectorClient"} = 1;
     $discoveredTypes{"PassRefPtr"} = 1;
 
-    push(@classDefinition, "class $className {");
-    push(@classDefinition, "public:");
-    push(@classDefinition, "    $className(InspectorClient* inspectorClient) : m_inspectorClient(inspectorClient) { }");
-    push(@classDefinition, "");
-    push(@classDefinition, generateFunctionsDeclarations($interface, $className));
-    push(@classDefinition, "");
-    push(@classDefinition, "private:");
-    push(@classDefinition, "    void sendSimpleMessageToFrontend(const String&);");
-    push(@classDefinition, "    InspectorClient* m_inspectorClient;");
-    push(@classDefinition, "};");
-
-    push(@functionDefinitions, "void ${className}::sendSimpleMessageToFrontend(const String& functionName)");
-    push(@functionDefinitions, "{");
-    push(@functionDefinitions, "    RefPtr<InspectorArray> arguments = InspectorArray::create();");
-    push(@functionDefinitions, "    arguments->pushString(functionName);");
-    push(@functionDefinitions, "    m_inspectorClient->sendMessageToFrontend(arguments->toJSONString());");
-    push(@functionDefinitions, "}");
+    push(@frontendClassDeclaration, "class $frontendClassName {");
+    push(@frontendClassDeclaration, "public:");
+    push(@frontendClassDeclaration, "    $frontendClassName(InspectorClient* inspectorClient) : m_inspectorClient(inspectorClient) { }");
+    push(@frontendClassDeclaration, "");
+    push(@frontendClassDeclaration, generateFunctions($interface, $frontendClassName));
+    push(@frontendClassDeclaration, "");
+    push(@frontendClassDeclaration, "private:");
+    push(@frontendClassDeclaration, "    InspectorClient* m_inspectorClient;");
+    push(@frontendClassDeclaration, "};");
 }
 
-sub generateFunctionsDeclarations
+sub generateFunctions
 {
     my $interface = shift;
     my $className = shift;
 
     my @functionDeclarations;
     foreach my $function (@{$interface->functions}) {
-        my $functionName = $function->signature->name;
-        my $abstract = $function->signature->extendedAttributes->{"abstract"};
-        my $arguments = "";
+        my $functionName;
+        my $argumentsDirectionFilter;
+        my $arguments;
+        my @functionBody;
+        push(@functionBody, "    RefPtr<InspectorArray> arguments = InspectorArray::create();");
+        if ($function->signature->extendedAttributes->{"notify"}) {
+            $functionName = $function->signature->name;
+            $argumentsDirectionFilter = "in";
+            $arguments = "";
+            push(@functionBody, "    arguments->pushString(\"$functionName\");");
+        } else {
+            my $customResponse = $function->signature->extendedAttributes->{"customResponse"};
+            $functionName = $customResponse ? $customResponse : "did" . ucfirst($function->signature->name);
+            $argumentsDirectionFilter = "out";
+            $arguments = "long callId";
+            push(@functionBody, "    arguments->pushString(\"$functionName\");");
+            push(@functionBody, "    arguments->pushNumber(callId);");
+        }
+
         foreach my $parameter (@{$function->parameters}) {
-            $parameter->name or die "empty argument name specified for function ${className}::$functionName and argument type " . $parameter->type;
-            $arguments = $arguments . ", " if ($arguments);
-            $arguments = $arguments . typeSpec($parameter) . " " . $parameter->name;
+            if ($parameter->direction eq $argumentsDirectionFilter) {
+                $parameter->name or die "empty argument name specified for function ${frontendClassName}::$functionName and argument type " . $parameter->type;
+                $arguments = $arguments . ", " if ($arguments);
+                $arguments = $arguments . typeSpec($parameter) . " " . $parameter->name;
+                my $pushFunctionName =  $typeTransform{$parameter->type}->{"push"};
+                push(@functionBody, "    arguments->$pushFunctionName(" . $parameter->name . ");");
+            }
+        }
+        push(@functionBody, "    m_inspectorClient->sendMessageToFrontend(arguments->toJSONString());");
+
+        my $signature = "    " . typeSpec($function->signature, 1) . " $functionName($arguments);";
+        if (!$generatedFunctions{${signature}}) {
+            $generatedFunctions{${signature}} = 1;
+            push(@functionDeclarations, $signature);
+
+            my @function;
+            push(@function, typeSpec($function->signature, 1) . " " . $className . "::" . $functionName . "(" . $arguments . ")");
+            push(@function, "{");
+            push(@function, @functionBody);
+            push(@function, "}");
+            push(@function, "");
+            push(@functionDefinitions, @function);
         }
-        my $signature = "    " . typeSpec($function->signature, 1) . " $functionName($arguments)";
-        push(@functionDeclarations, $abstract ? "$signature = 0;" : "$signature;");
-        push(@functionDefinitions, generateFunctionsImpl($className, $function, $arguments)) if !$abstract;
     }
     return @functionDeclarations;
 }
@@ -193,8 +219,8 @@ sub generateFunctionsDeclarations
 sub generateHeader
 {
     my @headerContent = split("\r", $licenseTemplate);
-    push(@headerContent, "#ifndef ${fileName}_h");
-    push(@headerContent, "#define ${fileName}_h");
+    push(@headerContent, "#ifndef ${frontendClassName}_h");
+    push(@headerContent, "#define ${frontendClassName}_h");
     push(@headerContent, "");
 
     my @forwardHeaders;
@@ -213,11 +239,11 @@ sub generateHeader
     push(@headerContent, sort @forwardDeclarations);
 
     push(@headerContent, "");
-    push(@headerContent, @classDefinition);
+    push(@headerContent, @frontendClassDeclaration);
     push(@headerContent, "");
     push(@headerContent, "} // namespace $namespace");
     push(@headerContent, "");
-    push(@headerContent, "#endif // !defined(${fileName}_h)");
+    push(@headerContent, "#endif // !defined(${frontendClassName}_h)");
     push(@headerContent, "");
     return @headerContent;
 }
@@ -226,7 +252,7 @@ sub generateSource
 {
     my @sourceContent = split("\r", $licenseTemplate);
     push(@sourceContent, "\n#include \"config.h\"");
-    push(@sourceContent, "#include \"Remote$fileName.h\"");
+    push(@sourceContent, "#include \"$frontendClassName.h\"");
     push(@sourceContent, "");
     push(@sourceContent, "#if ENABLE(INSPECTOR)");
     push(@sourceContent, "");
@@ -248,43 +274,12 @@ sub generateSource
     return @sourceContent;
 }
 
-sub generateFunctionsImpl
-{
-    my $className = shift;
-    my $function = shift;
-    my $arguments = shift;
-
-    my @func;
-
-    my $functionName = $function->signature->name;
-
-    push(@func, typeSpec($function->signature, 1) . " " . $className . "::" . $functionName . "(" . $arguments . ")");
-    push(@func, "{");
-
-    my $numParameters = @{$function->parameters};
-    if ($numParameters > 0) {
-        push(@func, "    RefPtr<InspectorArray> arguments = InspectorArray::create();");
-        push(@func, "    arguments->pushString(\"$functionName\");");
-        foreach my $parameter (@{$function->parameters}) {
-            my $pushCall =  $typeTransform{$parameter->type}->{"push"};
-            push(@func, "    arguments->$pushCall(" . $parameter->name . ");");
-        }
-        push(@func, "    m_inspectorClient->sendMessageToFrontend(arguments->toJSONString());");
-    } else {
-        push(@func, "    sendSimpleMessageToFrontend(\"$functionName\");");
-    }
-
-    push(@func, "}");
-    push(@func, "");
-    return @func;
-}
-
 sub finish
 {
     my $object = shift;
 
-    open(my $SOURCE, ">$outputDir/Remote$fileName.cpp") || die "Couldn't open file $outputDir/Remote$fileName.cpp";
-    open(my $HEADER, ">$outputDir/Remote$fileName.h") || die "Couldn't open file $outputDir/Remote$fileName.h";
+    open(my $SOURCE, ">$outputDir/$frontendClassName.cpp") || die "Couldn't open file $outputDir/$frontendClassName.cpp";
+    open(my $HEADER, ">$outputDir/$frontendClassName.h") || die "Couldn't open file $outputDir/$frontendClassName.h";
 
     print $SOURCE join("\n", generateSource());
     close($SOURCE);
diff --git a/WebCore/inspector/Inspector.idl b/WebCore/inspector/Inspector.idl
new file mode 100644 (file)
index 0000000..cb6a68b
--- /dev/null
@@ -0,0 +1,158 @@
+/*
+ * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
+ * 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
+ * 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] Inspector {
+        [notify] void addRecordToTimeline(in Object record);
+        [notify] void addNodesToSearchResult(in Array nodeIds);
+        [notify] void attributesUpdated(in long id, in Array attributes);
+        [notify] void childNodeCountUpdated(in long id, in int newValue);
+        [notify] void childNodeInserted(in long parentId, in long prevId, in Object node);
+        [notify] void childNodeRemoved(in long parentId, in long id);
+        [notify] void setChildNodes(in long parentId, in Array nodes);
+        [notify] void setDetachedRoot(in Object root);
+        [notify] void setDocument(in Value root);
+
+        void storeLastActivePanel(in String panelName);
+
+        void saveApplicationSettings(in String settings);
+        void saveSessionSettings(in String settings);
+
+        void enableSearchingForNode();
+        void disableSearchingForNode();
+
+        void enableMonitoringXHR();
+        void disableMonitoringXHR();
+
+        void enableResourceTracking(in boolean always);
+        void disableResourceTracking(in boolean always);
+        void getResourceContent(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 String sourceID, in unsigned long lineNumber, in boolean enabled, in String condition);
+        void removeBreakpoint(in String sourceID, in unsigned long lineNumber);
+        void activateBreakpoints();
+        void deactivateBreakpoints();
+
+        void pauseInDebugger();
+        void resumeDebugger();
+
+        void stepOverStatementInDebugger();
+        void stepIntoStatementInDebugger();
+        void stepOutOfFunctionInDebugger();
+
+        void setPauseOnExceptionsState(in long pauseOnExceptionsState);
+
+        void editScriptSource(in String sourceID, in String newContent);
+        void getScriptSource(in String sourceID);
+
+        void enableProfiler(in boolean always);
+        void disableProfiler(in boolean always);
+
+        void startProfiling();
+        void stopProfiling();
+
+        void getProfileHeaders();
+        void getProfile(in unsigned long uid);
+
+        void removeProfile(in unsigned long uid);
+        void clearProfiles();
+
+        void takeHeapSnapshot();
+#endif
+        void setInjectedScriptSource(in String scriptSource);
+        void dispatchOnInjectedScript(in long injectedScriptId, in String methodName, in String arguments, in boolean async);
+
+        void addScriptToEvaluateOnLoad(in String scriptSource);
+        void removeAllScriptsToEvaluateOnLoad();
+
+        void getChildNodes(in long nodeId);
+        [custorResponse=didApplyDomChange] void setAttribute(in long elementId, in String name, in String value, out boolean success);
+        [customResponse=didApplyDomChange] void removeAttribute(in long elementId, in String name, out boolean success);
+        void setTextNodeValue(in long nodeId, in String value);
+        void getEventListenersForNode(in long nodeId, out long nodeId, out Array listenersArray);
+        void copyNode(in long nodeId);
+        void removeNode(in long nodeId, out long nodeId);
+        void changeTagName(in long nodeId, in String newTagName, out long nodeId);
+        void getOuterHTML(in long nodeId, out String outerHTML);
+        void setOuterHTML(in long nodeId, in String outerHTML, out long nodeId);
+        void addInspectedNode(in long nodeId);
+        void performSearch(in String query, in boolean runSynchronously);
+        void searchCanceled();
+        void pushNodeByPathToFrontend(in String path);
+
+        void clearConsoleMessages();
+
+        void highlightDOMNode(in long nodeId);
+        void hideDOMNodeHighlight();
+
+        void getStyles(in long nodeId, in boolean authOnly, out Value styles);
+        void getAllStyles(out Array styles);
+        void getInlineStyle(in long nodeId, out Value style);
+        void getComputedStyle(in long nodeId, out Value style);
+        void getStyleSheet(in long styleSheetId, out Value styleSheet);
+        void getRuleRangesForStyleSheetId(in long styleSheetId);
+        void applyStyleText(in long styleId, in String styleText, in String propertyName, out boolean success, out Value style, out Array changedProperties);
+        void setStyleText(in long styleId, in String styleText, out boolean success);
+        void setStyleProperty(in long styleId, in String name, in String value, out boolean success);
+        void toggleStyleEnabled(in long styleId, in String propertyName, in boolean disabled, out Value style);
+        void setRuleSelector(in long ruleId, in String selector, in long selectedNodeId, out Value rule, out boolean selectorAffectsNode);
+        void addRule(in String selector, in long selectedNodeId, out Value rule, out boolean selectorAffectsNode);
+
+        void getCookies();
+        void deleteCookie(in String cookieName, in String domain);
+
+#if defined(ENABLE_OFFLINE_WEB_APPLICATIONS)
+        void getApplicationCaches();
+#endif
+
+        void releaseWrapperObjectGroup(in long injectedScriptId, in String objectGroup);
+        void didEvaluateForTestInFrontend(in String jsonResult);
+
+#if defined(ENABLE_DATABASE) && ENABLE_DATABASE
+        void getDatabaseTableNames(in long databaseId);
+#endif
+
+#if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE
+        void getDOMStorageEntries(in long storageId);
+        void setDOMStorageItem(in long storageId, in String key, in String value);
+        void removeDOMStorageItem(in long storageId, in String key);
+#endif
+    };
+}
index 413fb8bae0430e1e4690da847a2f4b6400a24be2..9dffef95852ed1f04d7c0c5733b75e93d8c111b1 100644 (file)
@@ -41,7 +41,7 @@
 #include "InspectorController.h"
 #include "InspectorResource.h"
 #include "PlatformString.h"
-#include "RemoteInspectorFrontend2.h"
+#include "RemoteInspectorFrontend.h"
 #include "StyleSheetList.h"
 
 namespace WebCore {
@@ -95,13 +95,13 @@ CSSStyleSheet* InspectorCSSStore::inspectorStyleSheet(Document* ownerDocument, b
     if (!ec)
         ownerDocument->head()->appendChild(styleElement, ec);
     if (ec) {
-        m_inspectorController->inspectorFrontend2()->didAddRule(callId, InspectorValue::null(), false);
+        m_inspectorController->remoteInspectorFrontend()->didAddRule(callId, InspectorValue::null(), false);
         return 0;
     }
     StyleSheetList* styleSheets = ownerDocument->styleSheets();
     StyleSheet* styleSheet = styleSheets->item(styleSheets->length() - 1);
     if (!styleSheet->isCSSStyleSheet()) {
-        m_inspectorController->inspectorFrontend2()->didAddRule(callId, InspectorValue::null(), false);
+        m_inspectorController->remoteInspectorFrontend()->didAddRule(callId, InspectorValue::null(), false);
         return 0;
     }
     CSSStyleSheet* inspectorStyleSheet = static_cast<CSSStyleSheet*>(styleSheet);
index ed25696d391a405fd9be1e8d4cdc4c15b731dbd8..4fef302aeeb926c15ba3fe0da20e1d76e1470997 100644 (file)
@@ -68,7 +68,7 @@
 #include "Page.h"
 #include "ProgressTracker.h"
 #include "Range.h"
-#include "RemoteInspectorFrontend2.h"
+#include "RemoteInspectorFrontend.h"
 #include "RenderInline.h"
 #include "ResourceRequest.h"
 #include "ResourceResponse.h"
@@ -486,10 +486,10 @@ void InspectorController::connectFrontend(const ScriptObject& webInspector)
     m_openingFrontend = false;
     releaseFrontendLifetimeAgents();
     m_frontend = new InspectorFrontend(webInspector, m_client);
-    m_frontend2 = new InspectorFrontend2(m_client);
-    m_domAgent = InspectorDOMAgent::create(m_cssStore.get(), m_frontend2.get());
+    m_remoteFrontend = new RemoteInspectorFrontend(m_client);
+    m_domAgent = InspectorDOMAgent::create(m_cssStore.get(), m_remoteFrontend.get());
     if (m_timelineAgent)
-        m_timelineAgent->resetFrontendProxyObject(m_frontend2.get());
+        m_timelineAgent->resetFrontendProxyObject(m_remoteFrontend.get());
 
     // Initialize Web Inspector title.
     m_frontend->inspectedURLChanged(m_inspectedPage->mainFrame()->loader()->url().string());
@@ -1163,7 +1163,7 @@ void InspectorController::startTimelineProfiler()
     if (m_timelineAgent)
         return;
 
-    m_timelineAgent = new InspectorTimelineAgent(m_frontend2.get());
+    m_timelineAgent = new InspectorTimelineAgent(m_remoteFrontend.get());
     if (m_frontend)
         m_frontend->timelineProfilerWasStarted();
     m_client->timelineProfilerWasStarted();
index 1f416a006d3d5bf0d4b94778288b239d7012925c..ee0c9d6459efde1f9b4a971fe384ed4c5f868d3e 100644 (file)
@@ -69,7 +69,6 @@ class InspectorCSSStore;
 class InspectorDOMStorageResource;
 class InspectorDatabaseResource;
 class InspectorFrontend;
-class InspectorFrontend2;
 class InspectorFrontendClient;
 class InspectorResource;
 class InspectorTimelineAgent;
@@ -78,6 +77,7 @@ class InspectorWorkerResource;
 class KURL;
 class Node;
 class Page;
+class RemoteInspectorFrontend;
 class ResourceRequest;
 class ResourceResponse;
 class ResourceError;
@@ -220,7 +220,7 @@ public:
     const ResourcesMap& resources() const { return m_resources; }
     InspectorResource* resourceForURL(const String& url);
     InspectorFrontend* inspectorFrontend() { return m_frontend.get(); }
-    InspectorFrontend2* inspectorFrontend2() { return m_frontend2.get(); }
+    RemoteInspectorFrontend* remoteInspectorFrontend() { return m_remoteFrontend.get(); }
 
     void drawNodeHighlight(GraphicsContext&) const;
 
@@ -345,7 +345,7 @@ private:
     OwnPtr<InspectorFrontendClient> m_inspectorFrontendClient;
     bool m_openingFrontend;
     OwnPtr<InspectorFrontend> m_frontend;
-    OwnPtr<InspectorFrontend2> m_frontend2;
+    OwnPtr<RemoteInspectorFrontend> m_remoteFrontend;
     RefPtr<InspectorDOMAgent> m_domAgent;
     OwnPtr<InspectorCSSStore> m_cssStore;
     OwnPtr<InspectorTimelineAgent> m_timelineAgent;
index 46bc938a8909d0221b4ed82d9500897b4935f60f..4946fae0802aec1ebc774b5d2c9eafa983948ba0 100644 (file)
@@ -59,7 +59,7 @@
 #include "Node.h"
 #include "NodeList.h"
 #include "PlatformString.h"
-#include "RemoteInspectorFrontend2.h"
+#include "RemoteInspectorFrontend.h"
 #include "RenderStyle.h"
 #include "RenderStyleConstants.h"
 #include "ScriptEventListener.h"
@@ -195,7 +195,7 @@ public:
 
 }
 
-InspectorDOMAgent::InspectorDOMAgent(InspectorCSSStore* cssStore, InspectorFrontend2* frontend)
+InspectorDOMAgent::InspectorDOMAgent(InspectorCSSStore* cssStore, RemoteInspectorFrontend* frontend)
     : EventListener(InspectorDOMAgentType)
     , m_cssStore(cssStore)
     , m_frontend(frontend)
index c00c1330bbe883addc61361ef4e09e35ce1d1285..7cd5a076738329c43f688ee8108018d9f1fe55e7 100644 (file)
@@ -56,7 +56,7 @@ namespace WebCore {
     class CSSStyleSheet;
     class Element;
     class Event;
-    class InspectorFrontend2;
+    class RemoteInspectorFrontend;
     class MatchJob;
     class NameNodeMap;
     class Node;
@@ -77,7 +77,7 @@ namespace WebCore {
 
     class InspectorDOMAgent : public EventListener {
     public:
-        static PassRefPtr<InspectorDOMAgent> create(InspectorCSSStore* cssStore, InspectorFrontend2* frontend)
+        static PassRefPtr<InspectorDOMAgent> create(InspectorCSSStore* cssStore, RemoteInspectorFrontend* frontend)
         {
             return adoptRef(new InspectorDOMAgent(cssStore, frontend));
         }
@@ -89,7 +89,7 @@ namespace WebCore {
                 : 0;
         }
 
-        InspectorDOMAgent(InspectorCSSStore* cssStore, InspectorFrontend2* frontend);
+        InspectorDOMAgent(InspectorCSSStore* cssStore, RemoteInspectorFrontend* frontend);
         ~InspectorDOMAgent();
 
         void reset();
@@ -192,7 +192,7 @@ namespace WebCore {
         void discardBindings();
 
         InspectorCSSStore* m_cssStore;
-        InspectorFrontend2* m_frontend;
+        RemoteInspectorFrontend* m_frontend;
         NodeToIdMap m_documentNodeToIdMap;
         // Owns node mappings for dangling nodes.
         Vector<NodeToIdMap*> m_danglingNodeToIdMaps;
diff --git a/WebCore/inspector/InspectorFrontend2.idl b/WebCore/inspector/InspectorFrontend2.idl
deleted file mode 100644 (file)
index b96d715..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-module WebCore {
-
-    interface [Conditional=INSPECTOR, JS] InspectorFrontend2 {
-        // TimelineAgent
-        void addRecordToTimeline(in Object record);
-
-        // DOMAgent
-        void addNodesToSearchResult(in Array nodeIds);
-        void attributesUpdated(in long id, in Array attributes);
-        void childNodeCountUpdated(in long id, in int newValue);
-        void childNodeInserted(in long parentId, in long prevId, in Object node);
-        void childNodeRemoved(in long parentId, in long id);
-        void didAddRule(in long callId, in Value rule, in boolean selectorAffectsNode);
-        void didApplyDomChange(in long callId, in boolean success);
-        void didApplyStyleText(in long callId, in boolean success, in Value style, in Array changedProperties);
-        void didChangeTagName(in long callId, in long nodeId);
-        void didGetAllStyles(in long callId, in Array styles);
-        void didGetChildNodes(in long callId);
-        void didGetComputedStyle(in long callId, in Value style);
-        void didGetEventListenersForNode(in long callId, in long nodeId, in Array listenersArray);
-        void didGetInlineStyle(in long callId, in Value style);
-        void didGetOuterHTML(in long callId, in String outerHTML);
-        void didGetStyleSheet(in long callId, in Value styleSheet);
-        void didGetStyles(in long callId, in Value styles);
-        void didRemoveNode(in long callId, in long nodeId);
-        void didSetOuterHTML(in long callId, in long nodeId);
-        void didSetRuleSelector(in long callId, in Value rule, in boolean selectorAffectsNode);
-        void didSetStyleProperty(in long callId, in boolean success);
-        void didSetStyleText(in long callId, in boolean success);
-        void didToggleStyleEnabled(in long callId, in Value style);
-        void setChildNodes(in long parentId, in Array nodes);
-        void setDetachedRoot(in Object root);
-        void setDocument(in Value root);
-    };
-}
index 31513d15e2b58d146abd5b98d4e8fcc479d0c729..b5cff689d3adb42c712366cc180b1591933529a9 100644 (file)
@@ -35,7 +35,7 @@
 
 #include "Event.h"
 #include "IntRect.h"
-#include "RemoteInspectorFrontend2.h"
+#include "RemoteInspectorFrontend.h"
 #include "ResourceRequest.h"
 #include "ResourceResponse.h"
 #include "TimelineRecordFactory.h"
@@ -46,7 +46,7 @@ namespace WebCore {
 
 int InspectorTimelineAgent::s_instanceCount = 0;
 
-InspectorTimelineAgent::InspectorTimelineAgent(InspectorFrontend2* frontend)
+InspectorTimelineAgent::InspectorTimelineAgent(RemoteInspectorFrontend* frontend)
     : m_frontend(frontend)
 {
     ++s_instanceCount;
@@ -279,7 +279,7 @@ void InspectorTimelineAgent::reset()
     m_recordStack.clear();
 }
 
-void InspectorTimelineAgent::resetFrontendProxyObject(InspectorFrontend2* frontend)
+void InspectorTimelineAgent::resetFrontendProxyObject(RemoteInspectorFrontend* frontend)
 {
     ASSERT(frontend);
     reset();
index 9a5cb980c36f35c6cacb620377a0a4e8bf032ebe..16d7b839ac686004dd5d2ada0c414f5e4373a2c0 100644 (file)
@@ -42,7 +42,7 @@
 
 namespace WebCore {
 class Event;
-class InspectorFrontend2;
+class RemoteInspectorFrontend;
 class IntRect;
 class ResourceRequest;
 class ResourceResponse;
@@ -74,11 +74,11 @@ enum TimelineRecordType {
 
 class InspectorTimelineAgent : ScriptGCEventListener, public Noncopyable {
 public:
-    InspectorTimelineAgent(InspectorFrontend2* frontend);
+    InspectorTimelineAgent(RemoteInspectorFrontend* frontend);
     ~InspectorTimelineAgent();
 
     void reset();
-    void resetFrontendProxyObject(InspectorFrontend2*);
+    void resetFrontendProxyObject(RemoteInspectorFrontend*);
 
     // Methods called from WebCore.
     void willCallFunction(const String& scriptName, int scriptLine);
@@ -152,7 +152,7 @@ private:
 
     void pushGCEventRecords();
 
-    InspectorFrontend2* m_frontend;
+    RemoteInspectorFrontend* m_frontend;
 
     Vector<TimelineRecordEntry> m_recordStack;
     static int s_instanceCount;
index 300347674d783f80284a3d1fd22c6fc25e49f5dc..a158633bc9b64bde4f4904c5b7071a9ba97de1d5 100644 (file)
@@ -138,11 +138,11 @@ MACRO(GENERATE_INSPECTOR_FROM_IDL _source)
 
   GET_FILENAME_COMPONENT(_name ${_source} NAME_WE)
   ADD_CUSTOM_COMMAND(
-    OUTPUT  ${DERIVED_SOURCES_DIR}/Remote${_name}.cpp ${DERIVED_SOURCES_DIR}/Remote${_name}.h
+    OUTPUT  ${DERIVED_SOURCES_DIR}/Remote${_name}Frontend.cpp ${DERIVED_SOURCES_DIR}/Remote${_name}Frontend.h
     DEPENDS ${BINDING_CODE_GENERATOR} ${SCRIPTS_BINDINGS} ${WEBCORE_DIR}/${_source}
     COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts -I${WEBCORE_DIR}/inspector ${BINDING_CODE_GENERATOR} ${IDL_INCLUDES} --outputDir "${DERIVED_SOURCES_DIR}" --defines "LANGUAGE_JAVASCRIPT=1 ${FEATURE_DEFINES_STR}" --generator Inspector ${WEBCORE_DIR}/${_source}
     VERBATIM)
-  LIST(APPEND Inspector_IDL_FILES ${DERIVED_SOURCES_DIR}/Remote${_name}.cpp)
+  LIST(APPEND Inspector_IDL_FILES ${DERIVED_SOURCES_DIR}/Remote${_name}Frontend.cpp)
   UNSET(_name)
   UNSET(_defines)
 ENDMACRO()