diff options
author | Andrei Popescu <andreip@google.com> | 2009-08-19 14:09:30 +0100 |
---|---|---|
committer | Andrei Popescu <andreip@google.com> | 2009-08-19 14:09:30 +0100 |
commit | 058ccc7ba0a4d59b9f6e92808332aa9895425fc7 (patch) | |
tree | 276aad5a2bbc2fd7d65d21bfca42c9de88b3dd20 /WebCore/inspector/InspectorFrontend.cpp | |
parent | 2796dd1bf3b4b01e7e1d96ea91bd3a212f647579 (diff) | |
download | external_webkit-058ccc7ba0a4d59b9f6e92808332aa9895425fc7.zip external_webkit-058ccc7ba0a4d59b9f6e92808332aa9895425fc7.tar.gz external_webkit-058ccc7ba0a4d59b9f6e92808332aa9895425fc7.tar.bz2 |
Revert "Merge WebKit r47420"
This reverts commit d227fc870c7a697500a3c900c31baf05fb9a8524.
Diffstat (limited to 'WebCore/inspector/InspectorFrontend.cpp')
-rw-r--r-- | WebCore/inspector/InspectorFrontend.cpp | 68 |
1 files changed, 23 insertions, 45 deletions
diff --git a/WebCore/inspector/InspectorFrontend.cpp b/WebCore/inspector/InspectorFrontend.cpp index f745ae3..af65fb4 100644 --- a/WebCore/inspector/InspectorFrontend.cpp +++ b/WebCore/inspector/InspectorFrontend.cpp @@ -32,7 +32,7 @@ #include "ConsoleMessage.h" #include "Frame.h" -#include "InspectorController.h" +#include "InspectorController.h" // TODO(pfeldman): Extract SpecialPanels to remove include. #include "Node.h" #include "ScriptFunctionCall.h" #include "ScriptObject.h" @@ -49,9 +49,8 @@ namespace WebCore { -InspectorFrontend::InspectorFrontend(InspectorController* inspectorController, ScriptState* scriptState, ScriptObject webInspector) - : m_inspectorController(inspectorController) - , m_scriptState(scriptState) +InspectorFrontend::InspectorFrontend(ScriptState* scriptState, ScriptObject webInspector) + : m_scriptState(scriptState) , m_webInspector(webInspector) { } @@ -80,17 +79,12 @@ void InspectorFrontend::addMessageToConsole(const ScriptObject& messageObj, cons function->appendArgument(frames[i]); } else if (!wrappedArguments.isEmpty()) { for (unsigned i = 0; i < wrappedArguments.size(); ++i) - function->appendArgument(m_inspectorController->wrapObject(wrappedArguments[i])); + function->appendArgument(wrappedArguments[i]); } else function->appendArgument(message); function->call(); } -void InspectorFrontend::clearConsoleMessages() -{ - callSimpleFunction("clearConsoleMessages"); -} - bool InspectorFrontend::addResource(long long identifier, const ScriptObject& resourceObj) { OwnPtr<ScriptFunctionCall> function(newFunctionCall("addResource")); @@ -118,10 +112,14 @@ void InspectorFrontend::removeResource(long long identifier) function->call(); } -void InspectorFrontend::updateFocusedNode(long long nodeId) +void InspectorFrontend::updateFocusedNode(Node* node) { + ScriptObject quarantinedNode; + if (!getQuarantinedScriptObject(node, quarantinedNode)) + return; + OwnPtr<ScriptFunctionCall> function(newFunctionCall("updateFocusedNode")); - function->appendArgument(nodeId); + function->appendArgument(quarantinedNode); function->call(); } @@ -132,6 +130,17 @@ void InspectorFrontend::setAttachedWindow(bool attached) function->call(); } +void InspectorFrontend::inspectedWindowScriptObjectCleared(Frame* frame) +{ + ScriptObject domWindow; + if (!getQuarantinedScriptObject(frame->domWindow(), domWindow)) + return; + + OwnPtr<ScriptFunctionCall> function(newFunctionCall("inspectedWindowCleared")); + function->appendArgument(domWindow); + function->call(); +} + void InspectorFrontend::showPanel(int panel) { const char* showFunctionName; @@ -277,9 +286,9 @@ bool InspectorFrontend::addDOMStorage(const ScriptObject& domStorageObj) } #endif -void InspectorFrontend::setDocument(const ScriptObject& root) +void InspectorFrontend::setDocumentElement(const ScriptObject& root) { - OwnPtr<ScriptFunctionCall> function(newFunctionCall("setDocument")); + OwnPtr<ScriptFunctionCall> function(newFunctionCall("setDocumentElement")); function->appendArgument(root); function->call(); } @@ -340,37 +349,6 @@ void InspectorFrontend::didApplyDomChange(int callId, bool success) function->call(); } -#if ENABLE(DATABASE) -void InspectorFrontend::selectDatabase(Database* database) -{ - OwnPtr<ScriptFunctionCall> function(newFunctionCall("selectDatabase")); - ScriptObject quarantinedObject; - if (!getQuarantinedScriptObject(database, quarantinedObject)) - return; - function->appendArgument(quarantinedObject); - function->call(); -} -#endif - -#if ENABLE(DOM_STORAGE) -void InspectorFrontend::selectDOMStorage(Storage* storage) -{ - OwnPtr<ScriptFunctionCall> function(newFunctionCall("selectDOMStorage")); - ScriptObject quarantinedObject; - if (!getQuarantinedScriptObject(storage, quarantinedObject)) - return; - function->appendArgument(quarantinedObject); - function->call(); -} -#endif - -void InspectorFrontend::addNodesToSearchResult(const String& nodeIds) -{ - OwnPtr<ScriptFunctionCall> function(newFunctionCall("addNodesToSearchResult")); - function->appendArgument(nodeIds); - function->call(); -} - PassOwnPtr<ScriptFunctionCall> InspectorFrontend::newFunctionCall(const String& functionName) { ScriptFunctionCall* function = new ScriptFunctionCall(m_scriptState, m_webInspector, "dispatch"); |