home *** CD-ROM | disk | FTP | other *** search
/ Freelog 115 / FreelogNo115-MaiJuin2013.iso / Internet / AvantBrowser / asetup.exe / _data / webkit / chrome.dll / 0 / BINDATA / 26552 < prev    next >
Encoding:
Text File  |  2013-04-03  |  4.5 KB  |  152 lines

  1. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4.  
  5. [
  6.   {
  7.     "namespace": "terminalPrivate",
  8.     "nodoc": true,
  9.     "platforms": ["chromeos"],
  10.     "types": [],
  11.     "functions": [
  12.       {
  13.         "name": "openTerminalProcess",
  14.         "type": "function",
  15.         "description": "Starts new process.",
  16.         "parameters": [
  17.           {
  18.             "type": "string",
  19.             "name": "processName",
  20.             "description": "Name of the process to open. Initially only 'crosh' is supported. Another processes may be added in future."
  21.           },
  22.           {
  23.             "type": "function",
  24.             "name": "callback",
  25.             "optional": false,
  26.             "description": "Returns pid of the launched process. If no process was launched returns -1.",
  27.             "parameters": [
  28.               {
  29.                 "name": "pid",
  30.                 "description": "Pid of the launched process.",
  31.                 "type": "integer"
  32.               }
  33.             ]
  34.           }
  35.         ]
  36.       },
  37.       {
  38.         "name": "closeTerminalProcess",
  39.         "type": "function",
  40.         "description": "Closes previousy opened process.",
  41.         "parameters": [
  42.           {
  43.             "name": "pid",
  44.             "type": "integer",
  45.             "description": "Process id of the process we want to close."
  46.           },
  47.           {
  48.             "name": "callback",
  49.             "type": "function",
  50.             "optional": true,
  51.             "description": "Function that gets called when close operation is started for the process. Returns success of the function.",
  52.             "parameters": [
  53.               {
  54.                 "name": "success",
  55.                 "type": "boolean"
  56.               }
  57.             ]
  58.           }
  59.         ]
  60.       },
  61.       {
  62.         "name": "sendInput",
  63.         "type": "function",
  64.         "description": "Sends input that will be routed to stdin of the process with the specified pid.",
  65.         "parameters": [
  66.           {
  67.             "name": "pid",
  68.             "type": "integer",
  69.             "description": "The pid of the process to which we want to send input."
  70.           },
  71.           {
  72.             "name": "input",
  73.             "type": "string",
  74.             "description": "Input we are sending to the process."
  75.           },
  76.           {
  77.             "name": "callback",
  78.             "type": "function",
  79.             "optional": true,
  80.             "description": "Callback that will be called when sendInput method ends. Returns success.",
  81.             "parameters": [
  82.               {
  83.                 "name": "success",
  84.                 "type": "boolean"
  85.               }
  86.             ]
  87.           }
  88.         ]
  89.       },
  90.       {
  91.         "name": "onTerminalResize",
  92.         "type": "function",
  93.         "description": "Notify the process with the id pid that terminal window size has changed.",
  94.         "parameters": [
  95.           {
  96.             "name": "pid",
  97.             "type": "integer",
  98.             "description": "The pid of the process."
  99.           },
  100.           {
  101.             "name": "width",
  102.             "type": "integer",
  103.             "description": "New window width (as column count)."
  104.           },
  105.           {
  106.             "name": "height",
  107.             "type": "integer",
  108.             "description": "New window height (as row count)."
  109.           },
  110.           {
  111.             "name": "callback",
  112.             "type": "function",
  113.             "optional": true,
  114.             "description": "Callback that will be called when sendInput method ends. Returns success.",
  115.             "parameters": [
  116.               {
  117.                 "name": "success",
  118.                 "type": "boolean"
  119.               }
  120.             ]
  121.           }
  122.         ]
  123.       }
  124.     ],
  125.     "events": [
  126.       {
  127.         "name": "onProcessOutput",
  128.         "type": "function",
  129.         "description": "Fired when an opened process writes something to its output.",
  130.         "parameters": [
  131.           {
  132.             "name": "pid",
  133.             "type": "integer",
  134.             "description": "Pid of the process from which the output came."
  135.           },
  136.           {
  137.             "name": "type",
  138.             "type": "string",
  139.             "description": "Type of the output stream from which output came. When process exits, output type will be set to exit",
  140.             "enum": ["stdout", "stderr", "exit"]
  141.           },
  142.           {
  143.             "name": "text",
  144.             "type": "string",
  145.             "description": "Text that was written to the output stream."
  146.           }
  147.         ]
  148.       }
  149.     ]
  150.   }
  151. ]
  152.