           label: item.label
           enabled: item.enabled
       if item.id?
-        transformed.click = -> InspectorFrontendAPI.contextMenuItemSelected item.id
+        transformed.click = -> DevToolsAPI.contextMenuItemSelected item.id
       template.push transformed
   template
 
-createMenu = (items) ->
+createMenu = (x, y, items, document) ->
   remote = require 'remote'
   Menu = remote.require 'menu'
 

  blob = new Blob([fs.readFileSync(path)])
  blob.name = path
  blob

  # The menu is expected to show asynchronously.
  setImmediate ->
    menu.popup remote.getCurrentWindow()
    DevToolsAPI.contextMenuCleared()

showFileChooserDialog = (callback) ->
  remote = require 'remote'
