Changeset 106777 in webkit


Ignore:
Timestamp:
Feb 5, 2012 11:39:40 PM (12 years ago)
Author:
yurys@chromium.org
Message:

Web Inspector: CodeGeneratorInspector.py: switch domain agents to formal interfaces in BackendDispatcher
https://bugs.webkit.org/show_bug.cgi?id=77444

Patch by Peter Rybin <peter.rybin@gmail.com> on 2012-02-05
Reviewed by Yury Semikhatsky.

All agent code is switched to formal interfaces. Actual agent class
names and includes are dropped from InspectorBackendDispatcher.h.

  • inspector/CodeGeneratorInspector.py:

(DomainNameFixes.get_fixed_data):
(Generator.go):

  • inspector/InspectorAgent.h:
  • inspector/InspectorApplicationCacheAgent.h:
  • inspector/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::getMatchedStylesForNode):

  • inspector/InspectorCSSAgent.h:

(InspectorCSSAgent):

  • inspector/InspectorConsoleAgent.h:
  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::highlightNode):

  • inspector/InspectorDOMAgent.h:

(InspectorDOMAgent):

  • inspector/InspectorDOMDebuggerAgent.h:
  • inspector/InspectorDOMStorageAgent.h:
  • inspector/InspectorDatabaseAgent.h:
  • inspector/InspectorDebuggerAgent.cpp:

(WebCore::InspectorDebuggerAgent::setBreakpoint):
(WebCore::InspectorDebuggerAgent::continueToLocation):

  • inspector/InspectorDebuggerAgent.h:

(InspectorDebuggerAgent):

  • inspector/InspectorFileSystemAgent.h:
  • inspector/InspectorIndexedDBAgent.h:
  • inspector/InspectorMemoryAgent.h:
  • inspector/InspectorPageAgent.h:
  • inspector/InspectorProfilerAgent.cpp:

(WebCore::InspectorProfilerAgent::getProfile):
(WebCore::InspectorProfilerAgent::removeProfile):

  • inspector/InspectorProfilerAgent.h:

(InspectorProfilerAgent):

  • inspector/InspectorResourceAgent.cpp:

(WebCore::InspectorResourceAgent::setExtraHTTPHeaders):

  • inspector/InspectorResourceAgent.h:

(InspectorResourceAgent):

  • inspector/InspectorRuntimeAgent.h:
  • inspector/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::start):

  • inspector/InspectorTimelineAgent.h:

(InspectorTimelineAgent):

  • inspector/InspectorWorkerAgent.cpp:

(WebCore::InspectorWorkerAgent::sendMessageToWorker):

  • inspector/InspectorWorkerAgent.h:

(InspectorWorkerAgent):

Location:
trunk/Source/WebCore
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r106776 r106777  
     12012-02-05  Peter Rybin  <peter.rybin@gmail.com>
     2
     3        Web Inspector: CodeGeneratorInspector.py: switch domain agents to formal interfaces in BackendDispatcher
     4        https://bugs.webkit.org/show_bug.cgi?id=77444
     5
     6        Reviewed by Yury Semikhatsky.
     7
     8        All agent code is switched to formal interfaces. Actual agent class
     9        names and includes are dropped from InspectorBackendDispatcher.h.
     10
     11        * inspector/CodeGeneratorInspector.py:
     12        (DomainNameFixes.get_fixed_data):
     13        (Generator.go):
     14        * inspector/InspectorAgent.h:
     15        * inspector/InspectorApplicationCacheAgent.h:
     16        * inspector/InspectorCSSAgent.cpp:
     17        (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
     18        * inspector/InspectorCSSAgent.h:
     19        (InspectorCSSAgent):
     20        * inspector/InspectorConsoleAgent.h:
     21        * inspector/InspectorDOMAgent.cpp:
     22        (WebCore::InspectorDOMAgent::highlightNode):
     23        * inspector/InspectorDOMAgent.h:
     24        (InspectorDOMAgent):
     25        * inspector/InspectorDOMDebuggerAgent.h:
     26        * inspector/InspectorDOMStorageAgent.h:
     27        * inspector/InspectorDatabaseAgent.h:
     28        * inspector/InspectorDebuggerAgent.cpp:
     29        (WebCore::InspectorDebuggerAgent::setBreakpoint):
     30        (WebCore::InspectorDebuggerAgent::continueToLocation):
     31        * inspector/InspectorDebuggerAgent.h:
     32        (InspectorDebuggerAgent):
     33        * inspector/InspectorFileSystemAgent.h:
     34        * inspector/InspectorIndexedDBAgent.h:
     35        * inspector/InspectorMemoryAgent.h:
     36        * inspector/InspectorPageAgent.h:
     37        * inspector/InspectorProfilerAgent.cpp:
     38        (WebCore::InspectorProfilerAgent::getProfile):
     39        (WebCore::InspectorProfilerAgent::removeProfile):
     40        * inspector/InspectorProfilerAgent.h:
     41        (InspectorProfilerAgent):
     42        * inspector/InspectorResourceAgent.cpp:
     43        (WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
     44        * inspector/InspectorResourceAgent.h:
     45        (InspectorResourceAgent):
     46        * inspector/InspectorRuntimeAgent.h:
     47        * inspector/InspectorTimelineAgent.cpp:
     48        (WebCore::InspectorTimelineAgent::start):
     49        * inspector/InspectorTimelineAgent.h:
     50        (InspectorTimelineAgent):
     51        * inspector/InspectorWorkerAgent.cpp:
     52        (WebCore::InspectorWorkerAgent::sendMessageToWorker):
     53        * inspector/InspectorWorkerAgent.h:
     54        (InspectorWorkerAgent):
     55
    1562012-02-05  Kentaro Hara  <haraken@chromium.org>
    257
  • trunk/Source/WebCore/inspector/CodeGeneratorInspector.py

    r106469 r106777  
    154154    @classmethod
    155155    def get_fixed_data(cls, domain_name):
    156         if domain_name in cls.agent_type_map:
    157             agent_name_res = cls.agent_type_map[domain_name]
    158         else:
    159             agent_name_res = "Inspector%sAgent" % domain_name
    160 
    161156        field_name_res = Capitalizer.upper_camel_case_to_lower(domain_name) + "Agent"
    162157
    163158        class Res(object):
    164             agent_type_name = agent_name_res
    165159            skip_js_bind = domain_name in cls.skip_js_bind_domains
    166160            agent_field_name = field_name_res
     
    185179
    186180    skip_js_bind_domains = set(["Runtime", "DOMDebugger"])
    187     agent_type_map = {"Network": "InspectorResourceAgent", "Inspector": "InspectorAgent", }
    188181
    189182
     
    16761669class InspectorFrontendChannel;
    16771670
    1678 $forwardDeclarations
    1679 
    16801671typedef String ErrorString;
    16811672
     
    17321723#include "InspectorFrontendChannel.h"
    17331724#include <wtf/text/WTFString.h>
    1734 $includes
    17351725
    17361726namespace WebCore {
     
    17481738    { }
    17491739
    1750     void clearFrontend() { m_inspectorFrontendChannel = 0; }
    1751     void dispatch(const String& message);
    1752     void reportProtocolError(const long* const callId, CommonErrorCode, const String& errorMessage, PassRefPtr<InspectorArray> data) const;
     1740    virtual void clearFrontend() { m_inspectorFrontendChannel = 0; }
     1741    virtual void dispatch(const String& message);
     1742    virtual void reportProtocolError(const long* const callId, CommonErrorCode, const String& errorMessage, PassRefPtr<InspectorArray> data) const;
    17531743    using InspectorBackendDispatcher::reportProtocolError;
    17541744
     
    23982388    backend_constructor_init_list = []
    23992389    backend_field_list = []
    2400     backend_forward_list = []
    2401     backend_include_list = []
    24022390    frontend_constructor_init_list = []
    24032391    type_builder_fragments = []
     
    24602448            Generator.backend_agent_interface_list.append("    class %s {\n" % agent_interface_name)
    24612449            Generator.backend_agent_interface_list.append("    public:\n")
    2462             Generator.backend_agent_interface_list.append("        virtual ~%s() { }\n" % agent_interface_name);
    24632450            if "commands" in json_domain:
    24642451                for json_command in json_domain["commands"]:
    24652452                    Generator.process_command(json_command, domain_name, agent_field_name)
     2453            Generator.backend_agent_interface_list.append("\n    protected:\n")
     2454            Generator.backend_agent_interface_list.append("        virtual ~%s() { }\n" % agent_interface_name)
    24662455            Generator.backend_agent_interface_list.append("    };\n\n")
    24672456
     
    24782467            Generator.backend_virtual_setters_list,
    24792468            Generator.backend_setters_list,
    2480             Generator.backend_field_list,
    2481             Generator.backend_forward_list,
    2482             Generator.backend_include_list]
     2469            Generator.backend_field_list]
    24832470
    24842471        for json_domain in sorted_json_domains:
     
    24942481            agent_interface_name = Capitalizer.lower_camel_case_to_upper(domain_name) + "CommandHandler"
    24952482
    2496             agent_type_name = domain_fixes.agent_type_name
    24972483            agent_field_name = domain_fixes.agent_field_name
    24982484            Generator.backend_constructor_init_list.append("        , m_%s(0)" % agent_field_name)
    2499             Generator.backend_virtual_setters_list.append("    virtual void registerAgent(%s /* %s */* %s) = 0;" % (agent_type_name, agent_interface_name, agent_field_name))
    2500             Generator.backend_setters_list.append("    void registerAgent(%s /* %s */* %s) { ASSERT(!m_%s); m_%s = %s; }" % (agent_type_name, agent_interface_name, agent_field_name, agent_field_name, agent_field_name, agent_field_name))
    2501             Generator.backend_field_list.append("    %s /* %s */* m_%s;" % (agent_type_name, agent_interface_name, agent_field_name))
    2502             Generator.backend_forward_list.append("class %s;" % agent_type_name)
    2503             Generator.backend_include_list.append("#include \"%s.h\"" % agent_type_name)
     2485            Generator.backend_virtual_setters_list.append("    virtual void registerAgent(%s* %s) = 0;" % (agent_interface_name, agent_field_name))
     2486            Generator.backend_setters_list.append("    virtual void registerAgent(%s* %s) { ASSERT(!m_%s); m_%s = %s; }" % (agent_interface_name, agent_field_name, agent_field_name, agent_field_name, agent_field_name))
     2487            Generator.backend_field_list.append("    %s* m_%s;" % (agent_interface_name, agent_field_name))
    25042488
    25052489            if domain_guard:
     
    28032787    virtualSetters=join(Generator.backend_virtual_setters_list, "\n"),
    28042788    agentInterfaces=join(Generator.backend_agent_interface_list, ""),
    2805     methodNamesEnumContent=join(Generator.method_name_enum_list, "\n"),
    2806     forwardDeclarations=join(Generator.backend_forward_list, "\n")))
     2789    methodNamesEnumContent=join(Generator.method_name_enum_list, "\n")))
    28072790
    28082791backend_cpp_file.write(Templates.backend_cpp.substitute(None,
     
    28112794    fieldDeclarations=join(Generator.backend_field_list, "\n"),
    28122795    methodNameDeclarations=join(Generator.backend_method_name_declaration_list, "\n"),
    2813     includes=join(Generator.backend_include_list, "\n"),
    28142796    methods=join(Generator.backend_method_implementation_list, "\n"),
    28152797    methodDeclarations=join(Generator.backend_method_declaration_list, "\n"),
  • trunk/Source/WebCore/inspector/InspectorAgent.h

    r103325 r106777  
    5353typedef String ErrorString;
    5454
    55 class InspectorAgent : public InspectorBaseAgent<InspectorAgent> {
     55class InspectorAgent : public InspectorBaseAgent<InspectorAgent>, public InspectorBackendDispatcher::InspectorCommandHandler {
    5656    WTF_MAKE_NONCOPYABLE(InspectorAgent);
    5757public:
  • trunk/Source/WebCore/inspector/InspectorApplicationCacheAgent.h

    r103389 r106777  
    5050typedef String ErrorString;
    5151
    52 class InspectorApplicationCacheAgent : public InspectorBaseAgent<InspectorApplicationCacheAgent> {
     52class InspectorApplicationCacheAgent : public InspectorBaseAgent<InspectorApplicationCacheAgent>, public InspectorBackendDispatcher::ApplicationCacheCommandHandler {
    5353    WTF_MAKE_NONCOPYABLE(InspectorApplicationCacheAgent); WTF_MAKE_FAST_ALLOCATED;
    5454public:
     
    6969
    7070    // ApplicationCache API for InspectorFrontend
    71     void enable(ErrorString*);
    72     void getFramesWithManifests(ErrorString*, RefPtr<InspectorArray>& result);
    73     void getManifestForFrame(ErrorString*, const String& frameId, String* manifestURL);
    74     void getApplicationCacheForFrame(ErrorString*, const String& frameId, RefPtr<InspectorObject>& applicationCache);
     71    virtual void enable(ErrorString*);
     72    virtual void getFramesWithManifests(ErrorString*, RefPtr<InspectorArray>& result);
     73    virtual void getManifestForFrame(ErrorString*, const String& frameId, String* manifestURL);
     74    virtual void getApplicationCacheForFrame(ErrorString*, const String& frameId, RefPtr<InspectorObject>& applicationCache);
    7575
    7676private:
  • trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp

    r106756 r106777  
    332332}
    333333
    334 void InspectorCSSAgent::getMatchedStylesForNode(ErrorString* errorString, int nodeId, const RefPtr<InspectorArray>* forcedPseudoClasses, bool* needPseudo, bool* needInherited, RefPtr<InspectorArray>& matchedCSSRules, RefPtr<InspectorArray>& pseudoIdRules, RefPtr<InspectorArray>& inheritedEntries)
     334void InspectorCSSAgent::getMatchedStylesForNode(ErrorString* errorString, int nodeId, const RefPtr<InspectorArray>* forcedPseudoClasses, const bool* needPseudo, const bool* needInherited, RefPtr<InspectorArray>& matchedCSSRules, RefPtr<InspectorArray>& pseudoIdRules, RefPtr<InspectorArray>& inheritedEntries)
    335335{
    336336    Element* element = elementForId(errorString, nodeId);
  • trunk/Source/WebCore/inspector/InspectorCSSAgent.h

    r104710 r106777  
    5555#if ENABLE(INSPECTOR)
    5656
    57 class InspectorCSSAgent : public InspectorBaseAgent<InspectorCSSAgent>, public InspectorDOMAgent::DOMListener {
     57class InspectorCSSAgent : public InspectorBaseAgent<InspectorCSSAgent>, public InspectorDOMAgent::DOMListener, public InspectorBackendDispatcher::CSSCommandHandler {
    5858    WTF_MAKE_NONCOPYABLE(InspectorCSSAgent);
    5959public:
     
    7171    virtual void discardAgent();
    7272    virtual void restore();
    73     void enable(ErrorString*);
    74     void disable(ErrorString*);
     73    virtual void enable(ErrorString*);
     74    virtual void disable(ErrorString*);
    7575    void reset();
    7676    void mediaQueryResultChanged();
    7777
    78     void getComputedStyleForNode(ErrorString*, int nodeId, const RefPtr<InspectorArray>* forcedPseudoClasses, RefPtr<InspectorArray>& style);
    79     void getInlineStylesForNode(ErrorString*, int nodeId, RefPtr<InspectorObject>& inlineStyle, RefPtr<InspectorArray>& attributes);
    80     void getMatchedStylesForNode(ErrorString*, int nodeId, const RefPtr<InspectorArray>* forcedPseudoClasses, bool* includePseudo, bool* includeInherited, RefPtr<InspectorArray>& matchedCSSRules, RefPtr<InspectorArray>& pseudoIdRules, RefPtr<InspectorArray>& inheritedEntries);
    81     void getAllStyleSheets(ErrorString*, RefPtr<InspectorArray>& styleSheetInfos);
    82     void getStyleSheet(ErrorString*, const String& styleSheetId, RefPtr<InspectorObject>& result);
    83     void getStyleSheetText(ErrorString*, const String& styleSheetId, String* result);
    84     void setStyleSheetText(ErrorString*, const String& styleSheetId, const String& text);
    85     void setPropertyText(ErrorString*, const RefPtr<InspectorObject>& styleId, int propertyIndex, const String& text, bool overwrite, RefPtr<InspectorObject>& result);
    86     void toggleProperty(ErrorString*, const RefPtr<InspectorObject>& styleId, int propertyIndex, bool disable, RefPtr<InspectorObject>& result);
    87     void setRuleSelector(ErrorString*, const RefPtr<InspectorObject>& ruleId, const String& selector, RefPtr<InspectorObject>& result);
    88     void addRule(ErrorString*, const int contextNodeId, const String& selector, RefPtr<InspectorObject>& result);
    89     void getSupportedCSSProperties(ErrorString*, RefPtr<InspectorArray>& result);
     78    virtual void getComputedStyleForNode(ErrorString*, int nodeId, const RefPtr<InspectorArray>* forcedPseudoClasses, RefPtr<InspectorArray>& style);
     79    virtual void getInlineStylesForNode(ErrorString*, int nodeId, RefPtr<InspectorObject>& inlineStyle, RefPtr<InspectorArray>& attributes);
     80    virtual void getMatchedStylesForNode(ErrorString*, int nodeId, const RefPtr<InspectorArray>* forcedPseudoClasses, const bool* includePseudo, const bool* includeInherited, RefPtr<InspectorArray>& matchedCSSRules, RefPtr<InspectorArray>& pseudoIdRules, RefPtr<InspectorArray>& inheritedEntries);
     81    virtual void getAllStyleSheets(ErrorString*, RefPtr<InspectorArray>& styleSheetInfos);
     82    virtual void getStyleSheet(ErrorString*, const String& styleSheetId, RefPtr<InspectorObject>& result);
     83    virtual void getStyleSheetText(ErrorString*, const String& styleSheetId, String* result);
     84    virtual void setStyleSheetText(ErrorString*, const String& styleSheetId, const String& text);
     85    virtual void setPropertyText(ErrorString*, const RefPtr<InspectorObject>& styleId, int propertyIndex, const String& text, bool overwrite, RefPtr<InspectorObject>& result);
     86    virtual void toggleProperty(ErrorString*, const RefPtr<InspectorObject>& styleId, int propertyIndex, bool disable, RefPtr<InspectorObject>& result);
     87    virtual void setRuleSelector(ErrorString*, const RefPtr<InspectorObject>& ruleId, const String& selector, RefPtr<InspectorObject>& result);
     88    virtual void addRule(ErrorString*, int contextNodeId, const String& selector, RefPtr<InspectorObject>& result);
     89    virtual void getSupportedCSSProperties(ErrorString*, RefPtr<InspectorArray>& result);
    9090
    91     void startSelectorProfiler(ErrorString*);
    92     void stopSelectorProfiler(ErrorString*, RefPtr<InspectorObject>&);
     91    virtual void startSelectorProfiler(ErrorString*);
     92    virtual void stopSelectorProfiler(ErrorString*, RefPtr<InspectorObject>&);
     93
    9394    void stopSelectorProfilerImpl(ErrorString*, RefPtr<InspectorObject>* = 0);
    9495    void willMatchRule(const CSSStyleRule*);
  • trunk/Source/WebCore/inspector/InspectorConsoleAgent.h

    r104803 r106777  
    5353typedef String ErrorString;
    5454
    55 class InspectorConsoleAgent : public InspectorBaseAgent<InspectorConsoleAgent> {
     55class InspectorConsoleAgent : public InspectorBaseAgent<InspectorConsoleAgent>, public InspectorBackendDispatcher::ConsoleCommandHandler {
    5656    WTF_MAKE_NONCOPYABLE(InspectorConsoleAgent);
    5757public:
     
    5959    virtual ~InspectorConsoleAgent();
    6060
    61     void enable(ErrorString*);
    62     void disable(ErrorString*);
     61    virtual void enable(ErrorString*);
     62    virtual void disable(ErrorString*);
    6363    virtual void clearMessages(ErrorString*);
    6464    void reset();
     
    8484    void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL);
    8585#endif
    86     void setMonitoringXHREnabled(ErrorString* error, bool enabled);
     86    virtual void setMonitoringXHREnabled(ErrorString*, bool enabled);
    8787    virtual void addInspectedNode(ErrorString*, int nodeId) = 0;
    8888
  • trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp

    r106695 r106777  
    976976    ErrorString*,
    977977    int nodeId,
    978     const RefPtr<InspectorObject> highlightConfig)
     978    const RefPtr<InspectorObject>& highlightConfig)
    979979{
    980980    if (Node* node = nodeForId(nodeId)) {
  • trunk/Source/WebCore/inspector/InspectorDOMAgent.h

    r105679 r106777  
    9090};
    9191
    92 class InspectorDOMAgent : public InspectorBaseAgent<InspectorDOMAgent> {
     92class InspectorDOMAgent : public InspectorBaseAgent<InspectorDOMAgent>, public InspectorBackendDispatcher::DOMCommandHandler {
    9393    WTF_MAKE_NONCOPYABLE(InspectorDOMAgent);
    9494public:
     
    117117
    118118    // Methods called from the frontend for DOM nodes inspection.
    119     void querySelector(ErrorString*, int nodeId, const String& selectors, int* elementId);
    120     void querySelectorAll(ErrorString*, int nodeId, const String& selectors, RefPtr<InspectorArray>& result);
    121     void getDocument(ErrorString*, RefPtr<InspectorObject>& root);
    122     void requestChildNodes(ErrorString*, int nodeId);
    123     void setAttributeValue(ErrorString*, int elementId, const String& name, const String& value);
    124     void setAttributesAsText(ErrorString*, int elementId, const String& text, const String* const name);
    125     void removeAttribute(ErrorString*, int elementId, const String& name);
    126     void removeNode(ErrorString*, int nodeId);
    127     void setNodeName(ErrorString*, int nodeId, const String& name, int* newId);
    128     void getOuterHTML(ErrorString*, int nodeId, WTF::String* outerHTML);
    129     void setOuterHTML(ErrorString*, int nodeId, const String& outerHTML);
    130     void setNodeValue(ErrorString*, int nodeId, const String& value);
    131     void getEventListenersForNode(ErrorString*, int nodeId, RefPtr<InspectorArray>& listenersArray);
    132     void performSearch(ErrorString*, const String& whitespaceTrimmedQuery, String* searchId, int* resultCount);
    133     void getSearchResults(ErrorString*, const String& searchId, int fromIndex, int toIndex, RefPtr<InspectorArray>&);
    134     void discardSearchResults(ErrorString*, const String& searchId);
    135     void resolveNode(ErrorString*, int nodeId, const String* const objectGroup, RefPtr<InspectorObject>& result);
    136     void getAttributes(ErrorString*, int nodeId, RefPtr<InspectorArray>& result);
    137     void setInspectModeEnabled(ErrorString*, bool enabled, const RefPtr<InspectorObject>* highlightConfig);
    138     void requestNode(ErrorString*, const String& objectId, int* nodeId);
    139     void pushNodeByPathToFrontend(ErrorString*, const String& path, int* nodeId);
    140     void hideHighlight(ErrorString*);
    141     void highlightRect(ErrorString*, int x, int y, int width, int height, const RefPtr<InspectorObject>* color, const RefPtr<InspectorObject>* outlineColor);
    142     void highlightNode(ErrorString*, int nodeId, const RefPtr<InspectorObject> highlightConfig);
    143     void highlightFrame(ErrorString*, const String& frameId, const RefPtr<InspectorObject>* color, const RefPtr<InspectorObject>* outlineColor);
    144     void moveTo(ErrorString*, int nodeId, int targetNodeId, const int* const anchorNodeId, int* newNodeId);
     119    virtual void querySelector(ErrorString*, int nodeId, const String& selectors, int* elementId);
     120    virtual void querySelectorAll(ErrorString*, int nodeId, const String& selectors, RefPtr<InspectorArray>& result);
     121    virtual void getDocument(ErrorString*, RefPtr<InspectorObject>& root);
     122    virtual void requestChildNodes(ErrorString*, int nodeId);
     123    virtual void setAttributeValue(ErrorString*, int elementId, const String& name, const String& value);
     124    virtual void setAttributesAsText(ErrorString*, int elementId, const String& text, const String* name);
     125    virtual void removeAttribute(ErrorString*, int elementId, const String& name);
     126    virtual void removeNode(ErrorString*, int nodeId);
     127    virtual void setNodeName(ErrorString*, int nodeId, const String& name, int* newId);
     128    virtual void getOuterHTML(ErrorString*, int nodeId, WTF::String* outerHTML);
     129    virtual void setOuterHTML(ErrorString*, int nodeId, const String& outerHTML);
     130    virtual void setNodeValue(ErrorString*, int nodeId, const String& value);
     131    virtual void getEventListenersForNode(ErrorString*, int nodeId, RefPtr<InspectorArray>& listenersArray);
     132    virtual void performSearch(ErrorString*, const String& whitespaceTrimmedQuery, String* searchId, int* resultCount);
     133    virtual void getSearchResults(ErrorString*, const String& searchId, int fromIndex, int toIndex, RefPtr<InspectorArray>&);
     134    virtual void discardSearchResults(ErrorString*, const String& searchId);
     135    virtual void resolveNode(ErrorString*, int nodeId, const String* objectGroup, RefPtr<InspectorObject>& result);
     136    virtual void getAttributes(ErrorString*, int nodeId, RefPtr<InspectorArray>& result);
     137    virtual void setInspectModeEnabled(ErrorString*, bool enabled, const RefPtr<InspectorObject>* highlightConfig);
     138    virtual void requestNode(ErrorString*, const String& objectId, int* nodeId);
     139    virtual void pushNodeByPathToFrontend(ErrorString*, const String& path, int* nodeId);
     140    virtual void hideHighlight(ErrorString*);
     141    virtual void highlightRect(ErrorString*, int x, int y, int width, int height, const RefPtr<InspectorObject>* color, const RefPtr<InspectorObject>* outlineColor);
     142    virtual void highlightNode(ErrorString*, int nodeId, const RefPtr<InspectorObject>& highlightConfig);
     143    virtual void highlightFrame(ErrorString*, const String& frameId, const RefPtr<InspectorObject>* color, const RefPtr<InspectorObject>* outlineColor);
     144    virtual void moveTo(ErrorString*, int nodeId, int targetNodeId, const int* anchorNodeId, int* newNodeId);
    145145
    146146    Node* highlightedNode() const;
  • trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h

    r106347 r106777  
    5555typedef String ErrorString;
    5656
    57 class InspectorDOMDebuggerAgent : public InspectorBaseAgent<InspectorDOMDebuggerAgent>, public InspectorDebuggerAgent::Listener {
     57class InspectorDOMDebuggerAgent : public InspectorBaseAgent<InspectorDOMDebuggerAgent>, public InspectorDebuggerAgent::Listener, public InspectorBackendDispatcher::DOMDebuggerCommandHandler {
    5858    WTF_MAKE_NONCOPYABLE(InspectorDOMDebuggerAgent);
    5959public:
     
    6363
    6464    // DOMDebugger API for InspectorFrontend
    65     void setXHRBreakpoint(ErrorString*, const String& url);
    66     void removeXHRBreakpoint(ErrorString*, const String& url);
    67     void setEventListenerBreakpoint(ErrorString*, const String& eventName);
    68     void removeEventListenerBreakpoint(ErrorString*, const String& eventName);
    69     void setInstrumentationBreakpoint(ErrorString*, const String& eventName);
    70     void removeInstrumentationBreakpoint(ErrorString*, const String& eventName);
    71     void setDOMBreakpoint(ErrorString*, int nodeId, const String& type);
    72     void removeDOMBreakpoint(ErrorString*, int nodeId, const String& type);
     65    virtual void setXHRBreakpoint(ErrorString*, const String& url);
     66    virtual void removeXHRBreakpoint(ErrorString*, const String& url);
     67    virtual void setEventListenerBreakpoint(ErrorString*, const String& eventName);
     68    virtual void removeEventListenerBreakpoint(ErrorString*, const String& eventName);
     69    virtual void setInstrumentationBreakpoint(ErrorString*, const String& eventName);
     70    virtual void removeInstrumentationBreakpoint(ErrorString*, const String& eventName);
     71    virtual void setDOMBreakpoint(ErrorString*, int nodeId, const String& type);
     72    virtual void removeDOMBreakpoint(ErrorString*, int nodeId, const String& type);
    7373
    7474    // InspectorInstrumentation API
  • trunk/Source/WebCore/inspector/InspectorDOMStorageAgent.h

    r103389 r106777  
    4848typedef String ErrorString;
    4949
    50 class InspectorDOMStorageAgent : public InspectorBaseAgent<InspectorDOMStorageAgent> {
     50class InspectorDOMStorageAgent : public InspectorBaseAgent<InspectorDOMStorageAgent>, public InspectorBackendDispatcher::DOMStorageCommandHandler {
    5151public:
    5252    static PassOwnPtr<InspectorDOMStorageAgent> create(InstrumentingAgents* instrumentingAgents, InspectorState* state)
     
    6363
    6464    // Called from the front-end.
    65     void enable(ErrorString*);
    66     void disable(ErrorString*);
    67     void getDOMStorageEntries(ErrorString*, int storageId, RefPtr<InspectorArray>& entries);
    68     void setDOMStorageItem(ErrorString*, int storageId, const String& key, const String& value, bool* success);
    69     void removeDOMStorageItem(ErrorString*, int storageId, const String& key, bool* success);
     65    virtual void enable(ErrorString*);
     66    virtual void disable(ErrorString*);
     67    virtual void getDOMStorageEntries(ErrorString*, int storageId, RefPtr<InspectorArray>& entries);
     68    virtual void setDOMStorageItem(ErrorString*, int storageId, const String& key, const String& value, bool* success);
     69    virtual void removeDOMStorageItem(ErrorString*, int storageId, const String& key, bool* success);
    7070
    7171    // Called from the injected script.
  • trunk/Source/WebCore/inspector/InspectorDatabaseAgent.h

    r103389 r106777  
    4646typedef String ErrorString;
    4747
    48 class InspectorDatabaseAgent : public InspectorBaseAgent<InspectorDatabaseAgent> {
     48class InspectorDatabaseAgent : public InspectorBaseAgent<InspectorDatabaseAgent>, public InspectorBackendDispatcher::DatabaseCommandHandler {
    4949public:
    5050    class FrontendProvider;
     
    6363
    6464    // Called from the front-end.
    65     void enable(ErrorString*);
    66     void disable(ErrorString*);
    67     void getDatabaseTableNames(ErrorString*, int databaseId, RefPtr<InspectorArray>& names);
    68     void executeSQL(ErrorString*, int databaseId, const String& query, bool* success, int* transactionId);
     65    virtual void enable(ErrorString*);
     66    virtual void disable(ErrorString*);
     67    virtual void getDatabaseTableNames(ErrorString*, int databaseId, RefPtr<InspectorArray>& names);
     68    virtual void executeSQL(ErrorString*, int databaseId, const String& query, bool* success, int* transactionId);
    6969
    7070    // Called from the injected script.
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp

    r106662 r106777  
    256256}
    257257
    258 void InspectorDebuggerAgent::setBreakpoint(ErrorString* errorString, PassRefPtr<InspectorObject> location, const String* const optionalCondition, String* outBreakpointId, RefPtr<InspectorObject>& actualLocation)
     258void InspectorDebuggerAgent::setBreakpoint(ErrorString* errorString, const RefPtr<InspectorObject>& location, const String* const optionalCondition, String* outBreakpointId, RefPtr<InspectorObject>& actualLocation)
    259259{
    260260    String scriptId;
     
    292292}
    293293
    294 void InspectorDebuggerAgent::continueToLocation(ErrorString* errorString, PassRefPtr<InspectorObject> location)
     294void InspectorDebuggerAgent::continueToLocation(ErrorString* errorString, const RefPtr<InspectorObject>& location)
    295295{
    296296    if (!m_continueToLocationBreakpointId.isEmpty()) {
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h

    r106662 r106777  
    5959typedef String ErrorString;
    6060
    61 class InspectorDebuggerAgent : public InspectorBaseAgent<InspectorDebuggerAgent>, public ScriptDebugListener {
     61class InspectorDebuggerAgent : public InspectorBaseAgent<InspectorDebuggerAgent>, public ScriptDebugListener, public InspectorBackendDispatcher::DebuggerCommandHandler {
    6262    WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent); WTF_MAKE_FAST_ALLOCATED;
    6363public:
     
    6666    virtual ~InspectorDebuggerAgent();
    6767
    68     void causesRecompilation(ErrorString*, bool*);
    69     void canSetScriptSource(ErrorString*, bool*);
    70     void supportsNativeBreakpoints(ErrorString*, bool*);
     68    virtual void causesRecompilation(ErrorString*, bool*);
     69    virtual void canSetScriptSource(ErrorString*, bool*);
     70    virtual void supportsNativeBreakpoints(ErrorString*, bool*);
    7171
    72     void enable(ErrorString*);
    73     void disable(ErrorString*);
     72    virtual void enable(ErrorString*);
     73    virtual void disable(ErrorString*);
    7474
    7575    virtual void setFrontend(InspectorFrontend*);
     
    8181
    8282    // Part of the protocol.
    83     void setBreakpointsActive(ErrorString*, bool active);
     83    virtual void setBreakpointsActive(ErrorString*, bool active);
    8484
    85     void setBreakpointByUrl(ErrorString*, int lineNumber, const String* const optionalURL, const String* const optionalURLRegex, const int* const optionalColumnNumber, const String* const optionalCondition, String* breakpointId, RefPtr<InspectorArray>& locations);
    86     void setBreakpoint(ErrorString*, PassRefPtr<InspectorObject> location, const String* const optionalCondition, String* breakpointId, RefPtr<InspectorObject>& actualLocation);
    87     void removeBreakpoint(ErrorString*, const String& breakpointId);
    88     void continueToLocation(ErrorString*, PassRefPtr<InspectorObject> location);
     85    virtual void setBreakpointByUrl(ErrorString*, int lineNumber, const String* optionalURL, const String* optionalURLRegex, const int* optionalColumnNumber, const String* optionalCondition, String* breakpointId, RefPtr<InspectorArray>& locations);
     86    virtual void setBreakpoint(ErrorString*, const RefPtr<InspectorObject>& location, const String* optionalCondition, String* breakpointId, RefPtr<InspectorObject>& actualLocation);
     87    virtual void removeBreakpoint(ErrorString*, const String& breakpointId);
     88    virtual void continueToLocation(ErrorString*, const RefPtr<InspectorObject>& location);
    8989
    90     void searchInContent(ErrorString*, const String& scriptId, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<InspectorArray>&);
    91     void setScriptSource(ErrorString*, const String& scriptId, const String& newContent, const bool* const preview, RefPtr<InspectorArray>& newCallFrames, RefPtr<InspectorObject>& result);
    92     void getScriptSource(ErrorString*, const String& scriptId, String* scriptSource);
    93     void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<InspectorObject>& details);
     90    virtual void searchInContent(ErrorString*, const String& scriptId, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<InspectorArray>&);
     91    virtual void setScriptSource(ErrorString*, const String& scriptId, const String& newContent, const bool* preview, RefPtr<InspectorArray>& newCallFrames, RefPtr<InspectorObject>& result);
     92    virtual void getScriptSource(ErrorString*, const String& scriptId, String* scriptSource);
     93    virtual void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<InspectorObject>& details);
    9494    void schedulePauseOnNextStatement(const String& breakReason, PassRefPtr<InspectorObject> data);
    9595    void cancelPauseOnNextStatement();
    9696    void breakProgram(const String& breakReason, PassRefPtr<InspectorObject> data);
    97     void pause(ErrorString*);
    98     void resume(ErrorString*);
    99     void stepOver(ErrorString*);
    100     void stepInto(ErrorString*);
    101     void stepOut(ErrorString*);
    102     void setPauseOnExceptions(ErrorString*, const String& pauseState);
    103     void evaluateOnCallFrame(ErrorString*,
     97    virtual void pause(ErrorString*);
     98    virtual void resume(ErrorString*);
     99    virtual void stepOver(ErrorString*);
     100    virtual void stepInto(ErrorString*);
     101    virtual void stepOut(ErrorString*);
     102    virtual void setPauseOnExceptions(ErrorString*, const String& pauseState);
     103    virtual void evaluateOnCallFrame(ErrorString*,
    104104                             const String& callFrameId,
    105105                             const String& expression,
    106                              const String* const objectGroup,
    107                              const bool* const includeCommandLineAPI,
    108                              const bool* const returnByValue,
     106                             const String* objectGroup,
     107                             const bool* includeCommandLineAPI,
     108                             const bool* returnByValue,
    109109                             RefPtr<InspectorObject>& result,
    110110                             bool* wasThrown);
  • trunk/Source/WebCore/inspector/InspectorFileSystemAgent.h

    r101345 r106777  
    4646class InstrumentingAgents;
    4747
    48 class InspectorFileSystemAgent : public InspectorBaseAgent<InspectorFileSystemAgent> {
     48class InspectorFileSystemAgent : public InspectorBaseAgent<InspectorFileSystemAgent>, public InspectorBackendDispatcher::FileSystemCommandHandler {
    4949public:
    5050    static PassOwnPtr<InspectorFileSystemAgent> create(InstrumentingAgents*, InspectorState*);
     
    5454    void fileSystemInvalidated(PassRefPtr<DOMFileSystem>);
    5555
    56     void enable(ErrorString*);
    57     void disable(ErrorString*);
     56    virtual void enable(ErrorString*);
     57    virtual void disable(ErrorString*);
    5858
    5959    virtual void setFrontend(InspectorFrontend*);
  • trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.h

    r105864 r106777  
    4444typedef String ErrorString;
    4545
    46 class InspectorIndexedDBAgent : public InspectorBaseAgent<InspectorIndexedDBAgent> {
     46class InspectorIndexedDBAgent : public InspectorBaseAgent<InspectorIndexedDBAgent>, public InspectorBackendDispatcher::IndexedDBCommandHandler {
    4747public:
    4848    class FrontendProvider;
     
    5959
    6060    // Called from the front-end.
    61     void enable(ErrorString*);
    62     void disable(ErrorString*);
    63     void requestDatabaseNamesForFrame(ErrorString*, int requestId, const String& frameId);
    64     void requestDatabase(ErrorString*, int requestId, const String& frameId, const String& databaseName);
     61    virtual void enable(ErrorString*);
     62    virtual void disable(ErrorString*);
     63    virtual void requestDatabaseNamesForFrame(ErrorString*, int requestId, const String& frameId);
     64    virtual void requestDatabase(ErrorString*, int requestId, const String& frameId, const String& databaseName);
    6565private:
    6666    InspectorIndexedDBAgent(InstrumentingAgents*, InspectorState*, InspectorPageAgent*);
  • trunk/Source/WebCore/inspector/InspectorMemoryAgent.h

    r105157 r106777  
    4848typedef String ErrorString;
    4949
    50 class InspectorMemoryAgent : public InspectorBaseAgent<InspectorMemoryAgent> {
     50class InspectorMemoryAgent : public InspectorBaseAgent<InspectorMemoryAgent>, public InspectorBackendDispatcher::MemoryCommandHandler {
    5151    WTF_MAKE_NONCOPYABLE(InspectorMemoryAgent);
    5252public:
  • trunk/Source/WebCore/inspector/InspectorPageAgent.h

    r105600 r106777  
    6161typedef String ErrorString;
    6262
    63 class InspectorPageAgent : public InspectorBaseAgent<InspectorPageAgent> {
     63class InspectorPageAgent : public InspectorBaseAgent<InspectorPageAgent>, public InspectorBackendDispatcher::PageCommandHandler {
    6464    WTF_MAKE_NONCOPYABLE(InspectorPageAgent);
    6565public:
     
    8888
    8989    // Page API for InspectorFrontend
    90     void enable(ErrorString*);
    91     void disable(ErrorString*);
    92     void addScriptToEvaluateOnLoad(ErrorString*, const String& source, String* result);
    93     void removeScriptToEvaluateOnLoad(ErrorString*, const String& identifier);
    94     void reload(ErrorString*, const bool* const optionalIgnoreCache, const String* optionalScriptToEvaluateOnLoad);
    95     void navigate(ErrorString*, const String& url);
    96     void getCookies(ErrorString*, RefPtr<InspectorArray>& cookies, WTF::String* cookiesString);
    97     void deleteCookie(ErrorString*, const String& cookieName, const String& domain);
    98     void getResourceTree(ErrorString*, RefPtr<InspectorObject>&);
    99     void getResourceContent(ErrorString*, const String& frameId, const String& url, String* content, bool* base64Encoded);
    100     void searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<InspectorArray>&);
    101     void searchInResources(ErrorString*, const String&, const bool* const caseSensitive, const bool* const isRegex, RefPtr<InspectorArray>&);
    102     void setDocumentContent(ErrorString*, const String& frameId, const String& html);
    103     void setScreenSizeOverride(ErrorString*, const int width, const int height);
     90    virtual void enable(ErrorString*);
     91    virtual void disable(ErrorString*);
     92    virtual void addScriptToEvaluateOnLoad(ErrorString*, const String& source, String* result);
     93    virtual void removeScriptToEvaluateOnLoad(ErrorString*, const String& identifier);
     94    virtual void reload(ErrorString*, const bool* optionalIgnoreCache, const String* optionalScriptToEvaluateOnLoad);
     95    virtual void navigate(ErrorString*, const String& url);
     96    virtual void getCookies(ErrorString*, RefPtr<InspectorArray>& cookies, WTF::String* cookiesString);
     97    virtual void deleteCookie(ErrorString*, const String& cookieName, const String& domain);
     98    virtual void getResourceTree(ErrorString*, RefPtr<InspectorObject>&);
     99    virtual void getResourceContent(ErrorString*, const String& frameId, const String& url, String* content, bool* base64Encoded);
     100    virtual void searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<InspectorArray>&);
     101    virtual void searchInResources(ErrorString*, const String&, const bool* caseSensitive, const bool* isRegex, RefPtr<InspectorArray>&);
     102    virtual void setDocumentContent(ErrorString*, const String& frameId, const String& html);
     103    virtual void setScreenSizeOverride(ErrorString*, int width, int height);
    104104
    105105    // InspectorInstrumentation API
  • trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp

    r104945 r106777  
    218218} // namespace
    219219
    220 void InspectorProfilerAgent::getProfile(ErrorString*, const String& type, unsigned uid, RefPtr<InspectorObject>& profileObject)
    221 {
     220void InspectorProfilerAgent::getProfile(ErrorString*, const String& type, int rawUid, RefPtr<InspectorObject>& profileObject)
     221{
     222    unsigned uid = static_cast<unsigned>(rawUid);
    222223    if (type == CPUProfileType) {
    223224        ProfilesMap::iterator it = m_profiles.find(uid);
     
    241242}
    242243
    243 void InspectorProfilerAgent::removeProfile(ErrorString*, const String& type, unsigned uid)
    244 {
     244void InspectorProfilerAgent::removeProfile(ErrorString*, const String& type, int rawUid)
     245{
     246    unsigned uid = static_cast<unsigned>(rawUid);
    245247    if (type == CPUProfileType) {
    246248        if (m_profiles.contains(uid))
  • trunk/Source/WebCore/inspector/InspectorProfilerAgent.h

    r103389 r106777  
    5656typedef String ErrorString;
    5757
    58 class InspectorProfilerAgent : public InspectorBaseAgent<InspectorProfilerAgent> {
     58class InspectorProfilerAgent : public InspectorBaseAgent<InspectorProfilerAgent>, public InspectorBackendDispatcher::ProfilerCommandHandler {
    5959    WTF_MAKE_NONCOPYABLE(InspectorProfilerAgent); WTF_MAKE_FAST_ALLOCATED;
    6060public:
     
    6565    void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
    6666    void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL);
    67     void collectGarbage(ErrorString*);
    68     void clearProfiles(ErrorString*) { resetState(); }
     67    virtual void collectGarbage(ErrorString*);
     68    virtual void clearProfiles(ErrorString*) { resetState(); }
    6969    void resetState();
    7070
    71     void causesRecompilation(ErrorString*, bool*);
    72     void isSampling(ErrorString*, bool*);
    73     void hasHeapProfiler(ErrorString*, bool*);
     71    virtual void causesRecompilation(ErrorString*, bool*);
     72    virtual void isSampling(ErrorString*, bool*);
     73    virtual void hasHeapProfiler(ErrorString*, bool*);
    7474
    75     void enable(ErrorString*);
    76     void disable(ErrorString*);
    77     void start(ErrorString* = 0);
    78     void stop(ErrorString* = 0);
     75    virtual void enable(ErrorString*);
     76    virtual void disable(ErrorString*);
     77    virtual void start(ErrorString* = 0);
     78    virtual void stop(ErrorString* = 0);
    7979
    8080    void disable();
     
    8282    bool enabled() { return m_enabled; }
    8383    String getCurrentUserInitiatedProfileName(bool incrementProfileNumber = false);
    84     void getProfileHeaders(ErrorString* error, RefPtr<InspectorArray>& headers);
    85     void getProfile(ErrorString* error, const String& type, unsigned uid, RefPtr<InspectorObject>& profileObject);
    86     void removeProfile(ErrorString* error, const String& type, unsigned uid);
     84    virtual void getProfileHeaders(ErrorString*, RefPtr<InspectorArray>& headers);
     85    virtual void getProfile(ErrorString*, const String& type, int uid, RefPtr<InspectorObject>& profileObject);
     86    virtual void removeProfile(ErrorString*, const String& type, int uid);
    8787
    8888    virtual void setFrontend(InspectorFrontend*);
     
    9090    virtual void restore();
    9191
    92     void takeHeapSnapshot(ErrorString*);
     92    virtual void takeHeapSnapshot(ErrorString*);
    9393    void toggleRecordButton(bool isProfiling);
    9494
    95     void getObjectByHeapObjectId(ErrorString*, int id, RefPtr<InspectorObject>& result);
     95    virtual void getObjectByHeapObjectId(ErrorString*, int id, RefPtr<InspectorObject>& result);
    9696
    9797private:
  • trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp

    r103759 r106777  
    474474}
    475475
    476 void InspectorResourceAgent::setExtraHTTPHeaders(ErrorString*, PassRefPtr<InspectorObject> headers)
     476void InspectorResourceAgent::setExtraHTTPHeaders(ErrorString*, const RefPtr<InspectorObject>& headers)
    477477{
    478478    m_state->setObject(ResourceAgentState::extraRequestHeaders, headers);
  • trunk/Source/WebCore/inspector/InspectorResourceAgent.h

    r101651 r106777  
    7474typedef String ErrorString;
    7575
    76 class InspectorResourceAgent : public InspectorBaseAgent<InspectorResourceAgent> {
     76class InspectorResourceAgent : public InspectorBaseAgent<InspectorResourceAgent>, public InspectorBackendDispatcher::NetworkCommandHandler {
    7777public:
    7878    static PassOwnPtr<InspectorResourceAgent> create(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorClient* client, InspectorState* state)
     
    124124
    125125    // Called from frontend
    126     void enable(ErrorString*);
    127     void disable(ErrorString*);
    128     void setUserAgentOverride(ErrorString*, const String& userAgent);
    129     void setExtraHTTPHeaders(ErrorString*, PassRefPtr<InspectorObject>);
    130     void getResponseBody(ErrorString*, const String& requestId, String* content, bool* base64Encoded);
     126    virtual void enable(ErrorString*);
     127    virtual void disable(ErrorString*);
     128    virtual void setUserAgentOverride(ErrorString*, const String& userAgent);
     129    virtual void setExtraHTTPHeaders(ErrorString*, const RefPtr<InspectorObject>&);
     130    virtual void getResponseBody(ErrorString*, const String& requestId, String* content, bool* base64Encoded);
     131    // FIXME: this seems to be unsued.
    131132    void clearCache(ErrorString*, const String* const optionalPreservedLoaderId);
    132133
    133     void canClearBrowserCache(ErrorString*, bool*);
    134     void clearBrowserCache(ErrorString*);
    135     void canClearBrowserCookies(ErrorString*, bool*);
    136     void clearBrowserCookies(ErrorString*);
    137     void setCacheDisabled(ErrorString*, bool cacheDisabled);
     134    virtual void canClearBrowserCache(ErrorString*, bool*);
     135    virtual void clearBrowserCache(ErrorString*);
     136    virtual void canClearBrowserCookies(ErrorString*, bool*);
     137    virtual void clearBrowserCookies(ErrorString*);
     138    virtual void setCacheDisabled(ErrorString*, bool cacheDisabled);
    138139
    139140private:
  • trunk/Source/WebCore/inspector/InspectorRuntimeAgent.h

    r103389 r106777  
    5252typedef String ErrorString;
    5353
    54 class InspectorRuntimeAgent : public InspectorBaseAgent<InspectorRuntimeAgent> {
     54class InspectorRuntimeAgent : public InspectorBaseAgent<InspectorRuntimeAgent>, public InspectorBackendDispatcher::RuntimeCommandHandler {
    5555    WTF_MAKE_NONCOPYABLE(InspectorRuntimeAgent);
    5656public:
     
    5858
    5959    // Part of the protocol.
    60     void evaluate(ErrorString*,
     60    virtual void evaluate(ErrorString*,
    6161                  const String& expression,
    62                   const String* const objectGroup,
    63                   const bool* const includeCommandLineAPI,
    64                   const bool* const doNotPauseOnExceptions,
    65                   const String* const frameId,
    66                   const bool* const returnByValue,
     62                  const String* objectGroup,
     63                  const bool* includeCommandLineAPI,
     64                  const bool* doNotPauseOnExceptions,
     65                  const String* frameId,
     66                  const bool* returnByValue,
    6767                  RefPtr<InspectorObject>& result,
    6868                  bool* wasThrown);
    69     void callFunctionOn(ErrorString*,
     69    virtual void callFunctionOn(ErrorString*,
    7070                        const String& objectId,
    7171                        const String& expression,
    72                         const RefPtr<InspectorArray>* const optionalArguments,
    73                         const bool* const returnByValue,
     72                        const RefPtr<InspectorArray>* optionalArguments,
     73                        const bool* returnByValue,
    7474                        RefPtr<InspectorObject>& result,
    7575                        bool* wasThrown);
    76     void releaseObject(ErrorString*, const String& objectId);
    77     void getProperties(ErrorString*, const String& objectId, const bool* const ownProperties, RefPtr<InspectorArray>& result);
    78     void releaseObjectGroup(ErrorString*, const String& objectGroup);
    79     void run(ErrorString*);
     76    virtual void releaseObject(ErrorString*, const String& objectId);
     77    virtual void getProperties(ErrorString*, const String& objectId, const bool* ownProperties, RefPtr<InspectorArray>& result);
     78    virtual void releaseObjectGroup(ErrorString*, const String& objectGroup);
     79    virtual void run(ErrorString*);
    8080
    8181#if ENABLE(JAVASCRIPT_DEBUGGER)
  • trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp

    r105877 r106777  
    137137}
    138138
    139 void InspectorTimelineAgent::start(ErrorString*, int* maxCallStackDepth)
     139void InspectorTimelineAgent::start(ErrorString*, const int* maxCallStackDepth)
    140140{
    141141    if (!m_frontend)
  • trunk/Source/WebCore/inspector/InspectorTimelineAgent.h

    r105877 r106777  
    5555typedef String ErrorString;
    5656
    57 class InspectorTimelineAgent : public InspectorBaseAgent<InspectorTimelineAgent>, ScriptGCEventListener {
     57class InspectorTimelineAgent : public InspectorBaseAgent<InspectorTimelineAgent>, ScriptGCEventListener, public InspectorBackendDispatcher::TimelineCommandHandler {
    5858    WTF_MAKE_NONCOPYABLE(InspectorTimelineAgent);
    5959public:
     
    6969    virtual void restore();
    7070
    71     void start(ErrorString*, int* maxCallStackDepth);
    72     void stop(ErrorString*);
    73     void setIncludeMemoryDetails(ErrorString*, bool);
     71    virtual void start(ErrorString*, const int* maxCallStackDepth);
     72    virtual void stop(ErrorString*);
     73    virtual void setIncludeMemoryDetails(ErrorString*, bool);
    7474
    7575    int id() const { return m_id; }
  • trunk/Source/WebCore/inspector/InspectorWorkerAgent.cpp

    r101367 r106777  
    170170}
    171171
    172 void InspectorWorkerAgent::sendMessageToWorker(ErrorString* error, int workerId, PassRefPtr<InspectorObject> message)
     172void InspectorWorkerAgent::sendMessageToWorker(ErrorString* error, int workerId, const RefPtr<InspectorObject>& message)
    173173{
    174174    WorkerFrontendChannel* channel = m_idToChannel.get(workerId);
  • trunk/Source/WebCore/inspector/InspectorWorkerAgent.h

    r101345 r106777  
    4848typedef String ErrorString;
    4949
    50 class InspectorWorkerAgent : public InspectorBaseAgent<InspectorWorkerAgent> {
     50class InspectorWorkerAgent : public InspectorBaseAgent<InspectorWorkerAgent>, public InspectorBackendDispatcher::WorkerCommandHandler {
    5151public:
    5252    static PassOwnPtr<InspectorWorkerAgent> create(InstrumentingAgents*, InspectorState*);
     
    6363
    6464    // Called from InspectorBackendDispatcher
    65     void setWorkerInspectionEnabled(ErrorString*, bool value);
    66     void connectToWorker(ErrorString*, int workerId);
    67     void disconnectFromWorker(ErrorString*, int workerId);
    68     void sendMessageToWorker(ErrorString*, int workerId, PassRefPtr<InspectorObject> message);
    69     void setAutoconnectToWorkers(ErrorString*, bool value);
     65    virtual void setWorkerInspectionEnabled(ErrorString*, bool value);
     66    virtual void connectToWorker(ErrorString*, int workerId);
     67    virtual void disconnectFromWorker(ErrorString*, int workerId);
     68    virtual void sendMessageToWorker(ErrorString*, int workerId, const RefPtr<InspectorObject>& message);
     69    virtual void setAutoconnectToWorkers(ErrorString*, bool value);
    7070
    7171private:
Note: See TracChangeset for help on using the changeset viewer.