summaryrefslogtreecommitdiff
path: root/Source/web/InspectorFrontendClientImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/web/InspectorFrontendClientImpl.cpp')
-rw-r--r--Source/web/InspectorFrontendClientImpl.cpp46
1 files changed, 28 insertions, 18 deletions
diff --git a/Source/web/InspectorFrontendClientImpl.cpp b/Source/web/InspectorFrontendClientImpl.cpp
index eab9ff6a8..a4e7807bf 100644
--- a/Source/web/InspectorFrontendClientImpl.cpp
+++ b/Source/web/InspectorFrontendClientImpl.cpp
@@ -37,9 +37,9 @@
#include "bindings/v8/ScriptController.h"
#include "core/dom/Document.h"
#include "core/inspector/InspectorFrontendHost.h"
-#include "core/page/Frame.h"
+#include "core/frame/Frame.h"
#include "core/page/Page.h"
-#include "core/platform/NotImplemented.h"
+#include "platform/NotImplemented.h"
#include "public/platform/WebFloatPoint.h"
#include "public/platform/WebString.h"
#include "wtf/text/WTFString.h"
@@ -78,32 +78,42 @@ void InspectorFrontendClientImpl::windowObjectCleared()
ScriptController* scriptController = m_frontendPage->mainFrame() ? m_frontendPage->mainFrame()->script() : 0;
if (scriptController) {
String installLegacyOverrides =
- "(function(host, legacyMethodNames) {"
- " function dispatch(methodName) {"
+ "" // Support for legacy front-ends (<M31). Do not add items here.
+ "(function(host, methodNames) {"
+ " var callId = 0;"
+ " function dispatch(methodName)"
+ " {"
" var argsArray = Array.prototype.slice.call(arguments, 1);"
- " var message = {'method': methodName};"
+ " var message = {\"method\": methodName, \"id\": ++callId};"
" if (argsArray.length)"
" message.params = argsArray;"
" this.sendMessageToEmbedder(JSON.stringify(message));"
" };"
- " legacyMethodNames.forEach(function(methodName) {"
- " host[methodName] = dispatch.bind(host, methodName);"
- " });"
+ " methodNames.forEach(function(methodName) { host[methodName] = dispatch.bind(host, methodName); });"
"})(InspectorFrontendHost,"
- " ['moveWindowBy',"
+ " ['addFileSystem',"
+ " 'append',"
" 'bringToFront',"
- " 'requestSetDockSide',"
+ " 'indexPath',"
+ " 'moveWindowBy',"
" 'openInNewTab',"
- " 'save',"
- " 'append',"
+ " 'removeFileSystem',"
" 'requestFileSystems',"
- " 'indexPath',"
- " 'stopIndexing',"
+ " 'requestSetDockSide',"
+ " 'save',"
" 'searchInPath',"
- " 'addFileSystem',"
- " 'removeFileSystem']);";
-
- scriptController->executeScriptInMainWorld(ScriptSourceCode(installLegacyOverrides));
+ " 'stopIndexing']);"
+ ""
+ "" // Support for legacy front-ends (<M28). Do not add items here.
+ "InspectorFrontendHost.canInspectWorkers = function() { return true; };"
+ "InspectorFrontendHost.canSaveAs = function() { return true; };"
+ "InspectorFrontendHost.canSave = function() { return true; };"
+ "InspectorFrontendHost.supportsFileSystems = function() { return true; };"
+ "InspectorFrontendHost.loaded = function() {};"
+ "InspectorFrontendHost.hiddenPanels = function() { return ""; };"
+ "InspectorFrontendHost.localizedStringsURL = function() { return ""; };"
+ "InspectorFrontendHost.close = function(url) { };";
+ scriptController->executeScriptInMainWorld(installLegacyOverrides, ScriptController::ExecuteScriptWhenScriptsDisabled);
}
}