developer_private.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918
  1. // Copyright 2022 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. // This file was generated by:
  5. // tools/json_schema_compiler/compiler.py.
  6. // NOTE: The format of types has changed. 'FooType' is now
  7. // 'chrome.developerPrivate.FooType'.
  8. // Please run the closure compiler before committing changes.
  9. // See https://chromium.googlesource.com/chromium/src/+/main/docs/closure_compilation.md
  10. /** @fileoverview Externs generated from namespace: developerPrivate */
  11. /** @const */
  12. chrome.developerPrivate = {};
  13. /**
  14. * @enum {string}
  15. */
  16. chrome.developerPrivate.ItemType = {
  17. HOSTED_APP: 'hosted_app',
  18. PACKAGED_APP: 'packaged_app',
  19. LEGACY_PACKAGED_APP: 'legacy_packaged_app',
  20. EXTENSION: 'extension',
  21. THEME: 'theme',
  22. };
  23. /**
  24. * @typedef {{
  25. * path: string,
  26. * render_process_id: number,
  27. * render_view_id: number,
  28. * incognito: boolean,
  29. * generatedBackgroundPage: boolean
  30. * }}
  31. */
  32. chrome.developerPrivate.ItemInspectView;
  33. /**
  34. * @typedef {{
  35. * extension_id: string,
  36. * render_process_id: (string|number),
  37. * render_view_id: (string|number),
  38. * incognito: boolean
  39. * }}
  40. */
  41. chrome.developerPrivate.InspectOptions;
  42. /**
  43. * @typedef {{
  44. * message: string
  45. * }}
  46. */
  47. chrome.developerPrivate.InstallWarning;
  48. /**
  49. * @enum {string}
  50. */
  51. chrome.developerPrivate.ExtensionType = {
  52. HOSTED_APP: 'HOSTED_APP',
  53. PLATFORM_APP: 'PLATFORM_APP',
  54. LEGACY_PACKAGED_APP: 'LEGACY_PACKAGED_APP',
  55. EXTENSION: 'EXTENSION',
  56. THEME: 'THEME',
  57. SHARED_MODULE: 'SHARED_MODULE',
  58. };
  59. /**
  60. * @enum {string}
  61. */
  62. chrome.developerPrivate.Location = {
  63. FROM_STORE: 'FROM_STORE',
  64. UNPACKED: 'UNPACKED',
  65. THIRD_PARTY: 'THIRD_PARTY',
  66. INSTALLED_BY_DEFAULT: 'INSTALLED_BY_DEFAULT',
  67. UNKNOWN: 'UNKNOWN',
  68. };
  69. /**
  70. * @enum {string}
  71. */
  72. chrome.developerPrivate.ViewType = {
  73. APP_WINDOW: 'APP_WINDOW',
  74. BACKGROUND_CONTENTS: 'BACKGROUND_CONTENTS',
  75. COMPONENT: 'COMPONENT',
  76. EXTENSION_BACKGROUND_PAGE: 'EXTENSION_BACKGROUND_PAGE',
  77. EXTENSION_DIALOG: 'EXTENSION_DIALOG',
  78. EXTENSION_GUEST: 'EXTENSION_GUEST',
  79. EXTENSION_POPUP: 'EXTENSION_POPUP',
  80. EXTENSION_SERVICE_WORKER_BACKGROUND: 'EXTENSION_SERVICE_WORKER_BACKGROUND',
  81. TAB_CONTENTS: 'TAB_CONTENTS',
  82. OFFSCREEN_DOCUMENT: 'OFFSCREEN_DOCUMENT',
  83. };
  84. /**
  85. * @enum {string}
  86. */
  87. chrome.developerPrivate.ErrorType = {
  88. MANIFEST: 'MANIFEST',
  89. RUNTIME: 'RUNTIME',
  90. };
  91. /**
  92. * @enum {string}
  93. */
  94. chrome.developerPrivate.ErrorLevel = {
  95. LOG: 'LOG',
  96. WARN: 'WARN',
  97. ERROR: 'ERROR',
  98. };
  99. /**
  100. * @enum {string}
  101. */
  102. chrome.developerPrivate.ExtensionState = {
  103. ENABLED: 'ENABLED',
  104. DISABLED: 'DISABLED',
  105. TERMINATED: 'TERMINATED',
  106. BLACKLISTED: 'BLACKLISTED',
  107. };
  108. /**
  109. * @enum {string}
  110. */
  111. chrome.developerPrivate.CommandScope = {
  112. GLOBAL: 'GLOBAL',
  113. CHROME: 'CHROME',
  114. };
  115. /**
  116. * @typedef {{
  117. * isEnabled: boolean,
  118. * isActive: boolean
  119. * }}
  120. */
  121. chrome.developerPrivate.AccessModifier;
  122. /**
  123. * @typedef {{
  124. * lineNumber: number,
  125. * columnNumber: number,
  126. * url: string,
  127. * functionName: string
  128. * }}
  129. */
  130. chrome.developerPrivate.StackFrame;
  131. /**
  132. * @typedef {{
  133. * type: !chrome.developerPrivate.ErrorType,
  134. * extensionId: string,
  135. * fromIncognito: boolean,
  136. * source: string,
  137. * message: string,
  138. * id: number,
  139. * manifestKey: string,
  140. * manifestSpecific: (string|undefined)
  141. * }}
  142. */
  143. chrome.developerPrivate.ManifestError;
  144. /**
  145. * @typedef {{
  146. * type: !chrome.developerPrivate.ErrorType,
  147. * extensionId: string,
  148. * fromIncognito: boolean,
  149. * source: string,
  150. * message: string,
  151. * id: number,
  152. * severity: !chrome.developerPrivate.ErrorLevel,
  153. * contextUrl: string,
  154. * occurrences: number,
  155. * renderViewId: number,
  156. * renderProcessId: number,
  157. * canInspect: boolean,
  158. * stackTrace: !Array<!chrome.developerPrivate.StackFrame>
  159. * }}
  160. */
  161. chrome.developerPrivate.RuntimeError;
  162. /**
  163. * @typedef {{
  164. * suspiciousInstall: boolean,
  165. * corruptInstall: boolean,
  166. * updateRequired: boolean,
  167. * blockedByPolicy: boolean,
  168. * reloading: boolean,
  169. * custodianApprovalRequired: boolean,
  170. * parentDisabledPermissions: boolean
  171. * }}
  172. */
  173. chrome.developerPrivate.DisableReasons;
  174. /**
  175. * @typedef {{
  176. * openInTab: boolean,
  177. * url: string
  178. * }}
  179. */
  180. chrome.developerPrivate.OptionsPage;
  181. /**
  182. * @typedef {{
  183. * url: string,
  184. * specified: boolean
  185. * }}
  186. */
  187. chrome.developerPrivate.HomePage;
  188. /**
  189. * @typedef {{
  190. * url: string,
  191. * renderProcessId: number,
  192. * renderViewId: number,
  193. * incognito: boolean,
  194. * isIframe: boolean,
  195. * type: !chrome.developerPrivate.ViewType
  196. * }}
  197. */
  198. chrome.developerPrivate.ExtensionView;
  199. /**
  200. * @enum {string}
  201. */
  202. chrome.developerPrivate.HostAccess = {
  203. ON_CLICK: 'ON_CLICK',
  204. ON_SPECIFIC_SITES: 'ON_SPECIFIC_SITES',
  205. ON_ALL_SITES: 'ON_ALL_SITES',
  206. };
  207. /**
  208. * @typedef {{
  209. * text: string
  210. * }}
  211. */
  212. chrome.developerPrivate.ControlledInfo;
  213. /**
  214. * @typedef {{
  215. * description: string,
  216. * keybinding: string,
  217. * name: string,
  218. * isActive: boolean,
  219. * scope: !chrome.developerPrivate.CommandScope,
  220. * isExtensionAction: boolean
  221. * }}
  222. */
  223. chrome.developerPrivate.Command;
  224. /**
  225. * @typedef {{
  226. * id: string,
  227. * name: string
  228. * }}
  229. */
  230. chrome.developerPrivate.DependentExtension;
  231. /**
  232. * @typedef {{
  233. * message: string,
  234. * submessages: !Array<string>
  235. * }}
  236. */
  237. chrome.developerPrivate.Permission;
  238. /**
  239. * @typedef {{
  240. * host: string,
  241. * granted: boolean
  242. * }}
  243. */
  244. chrome.developerPrivate.SiteControl;
  245. /**
  246. * @typedef {{
  247. * hasAllHosts: boolean,
  248. * hostAccess: !chrome.developerPrivate.HostAccess,
  249. * hosts: !Array<!chrome.developerPrivate.SiteControl>
  250. * }}
  251. */
  252. chrome.developerPrivate.RuntimeHostPermissions;
  253. /**
  254. * @typedef {{
  255. * simplePermissions: !Array<!chrome.developerPrivate.Permission>,
  256. * runtimeHostPermissions: (!chrome.developerPrivate.RuntimeHostPermissions|undefined)
  257. * }}
  258. */
  259. chrome.developerPrivate.Permissions;
  260. /**
  261. * @typedef {{
  262. * blacklistText: (string|undefined),
  263. * commands: !Array<!chrome.developerPrivate.Command>,
  264. * controlledInfo: (!chrome.developerPrivate.ControlledInfo|undefined),
  265. * dependentExtensions: !Array<!chrome.developerPrivate.DependentExtension>,
  266. * description: string,
  267. * disableReasons: !chrome.developerPrivate.DisableReasons,
  268. * errorCollection: !chrome.developerPrivate.AccessModifier,
  269. * fileAccess: !chrome.developerPrivate.AccessModifier,
  270. * homePage: !chrome.developerPrivate.HomePage,
  271. * iconUrl: string,
  272. * id: string,
  273. * incognitoAccess: !chrome.developerPrivate.AccessModifier,
  274. * installWarnings: !Array<string>,
  275. * launchUrl: (string|undefined),
  276. * location: !chrome.developerPrivate.Location,
  277. * locationText: (string|undefined),
  278. * manifestErrors: !Array<!chrome.developerPrivate.ManifestError>,
  279. * manifestHomePageUrl: string,
  280. * mustRemainInstalled: boolean,
  281. * name: string,
  282. * offlineEnabled: boolean,
  283. * optionsPage: (!chrome.developerPrivate.OptionsPage|undefined),
  284. * path: (string|undefined),
  285. * permissions: !chrome.developerPrivate.Permissions,
  286. * prettifiedPath: (string|undefined),
  287. * runtimeErrors: !Array<!chrome.developerPrivate.RuntimeError>,
  288. * runtimeWarnings: !Array<string>,
  289. * state: !chrome.developerPrivate.ExtensionState,
  290. * type: !chrome.developerPrivate.ExtensionType,
  291. * updateUrl: string,
  292. * userMayModify: boolean,
  293. * version: string,
  294. * views: !Array<!chrome.developerPrivate.ExtensionView>,
  295. * webStoreUrl: string,
  296. * showSafeBrowsingAllowlistWarning: boolean
  297. * }}
  298. */
  299. chrome.developerPrivate.ExtensionInfo;
  300. /**
  301. * @typedef {{
  302. * canLoadUnpacked: boolean,
  303. * inDeveloperMode: boolean,
  304. * isDeveloperModeControlledByPolicy: boolean,
  305. * isIncognitoAvailable: boolean,
  306. * isChildAccount: boolean
  307. * }}
  308. */
  309. chrome.developerPrivate.ProfileInfo;
  310. /**
  311. * @typedef {{
  312. * id: string,
  313. * name: string,
  314. * version: string,
  315. * description: string,
  316. * may_disable: boolean,
  317. * enabled: boolean,
  318. * isApp: boolean,
  319. * type: !chrome.developerPrivate.ItemType,
  320. * allow_activity: boolean,
  321. * allow_file_access: boolean,
  322. * wants_file_access: boolean,
  323. * incognito_enabled: boolean,
  324. * is_unpacked: boolean,
  325. * allow_reload: boolean,
  326. * terminated: boolean,
  327. * allow_incognito: boolean,
  328. * icon_url: string,
  329. * path: (string|undefined),
  330. * options_url: (string|undefined),
  331. * app_launch_url: (string|undefined),
  332. * homepage_url: (string|undefined),
  333. * update_url: (string|undefined),
  334. * install_warnings: !Array<!chrome.developerPrivate.InstallWarning>,
  335. * manifest_errors: !Array<*>,
  336. * runtime_errors: !Array<*>,
  337. * offline_enabled: boolean,
  338. * views: !Array<!chrome.developerPrivate.ItemInspectView>
  339. * }}
  340. */
  341. chrome.developerPrivate.ItemInfo;
  342. /**
  343. * @typedef {{
  344. * includeDisabled: (boolean|undefined),
  345. * includeTerminated: (boolean|undefined)
  346. * }}
  347. */
  348. chrome.developerPrivate.GetExtensionsInfoOptions;
  349. /**
  350. * @typedef {{
  351. * extensionId: string,
  352. * fileAccess: (boolean|undefined),
  353. * incognitoAccess: (boolean|undefined),
  354. * errorCollection: (boolean|undefined),
  355. * hostAccess: (!chrome.developerPrivate.HostAccess|undefined)
  356. * }}
  357. */
  358. chrome.developerPrivate.ExtensionConfigurationUpdate;
  359. /**
  360. * @typedef {{
  361. * inDeveloperMode: (boolean|undefined)
  362. * }}
  363. */
  364. chrome.developerPrivate.ProfileConfigurationUpdate;
  365. /**
  366. * @typedef {{
  367. * extensionId: string,
  368. * commandName: string,
  369. * scope: (!chrome.developerPrivate.CommandScope|undefined),
  370. * keybinding: (string|undefined)
  371. * }}
  372. */
  373. chrome.developerPrivate.ExtensionCommandUpdate;
  374. /**
  375. * @typedef {{
  376. * failQuietly: (boolean|undefined),
  377. * populateErrorForUnpacked: (boolean|undefined)
  378. * }}
  379. */
  380. chrome.developerPrivate.ReloadOptions;
  381. /**
  382. * @typedef {{
  383. * failQuietly: (boolean|undefined),
  384. * populateError: (boolean|undefined),
  385. * retryGuid: (string|undefined),
  386. * useDraggedPath: (boolean|undefined)
  387. * }}
  388. */
  389. chrome.developerPrivate.LoadUnpackedOptions;
  390. /**
  391. * @enum {string}
  392. */
  393. chrome.developerPrivate.UserSiteSet = {
  394. PERMITTED: 'PERMITTED',
  395. RESTRICTED: 'RESTRICTED',
  396. };
  397. /**
  398. * @typedef {{
  399. * siteList: !chrome.developerPrivate.UserSiteSet,
  400. * hosts: !Array<string>
  401. * }}
  402. */
  403. chrome.developerPrivate.UserSiteSettingsOptions;
  404. /**
  405. * @typedef {{
  406. * permittedSites: !Array<string>,
  407. * restrictedSites: !Array<string>
  408. * }}
  409. */
  410. chrome.developerPrivate.UserSiteSettings;
  411. /**
  412. * @typedef {{
  413. * siteList: (!chrome.developerPrivate.UserSiteSet|undefined),
  414. * numExtensions: number,
  415. * site: string
  416. * }}
  417. */
  418. chrome.developerPrivate.SiteInfo;
  419. /**
  420. * @typedef {{
  421. * etldPlusOne: string,
  422. * numExtensions: number,
  423. * sites: !Array<!chrome.developerPrivate.SiteInfo>
  424. * }}
  425. */
  426. chrome.developerPrivate.SiteGroup;
  427. /**
  428. * @typedef {{
  429. * id: string,
  430. * siteAccess: !chrome.developerPrivate.HostAccess
  431. * }}
  432. */
  433. chrome.developerPrivate.MatchingExtensionInfo;
  434. /**
  435. * @enum {string}
  436. */
  437. chrome.developerPrivate.PackStatus = {
  438. SUCCESS: 'SUCCESS',
  439. ERROR: 'ERROR',
  440. WARNING: 'WARNING',
  441. };
  442. /**
  443. * @enum {string}
  444. */
  445. chrome.developerPrivate.FileType = {
  446. LOAD: 'LOAD',
  447. PEM: 'PEM',
  448. };
  449. /**
  450. * @enum {string}
  451. */
  452. chrome.developerPrivate.SelectType = {
  453. FILE: 'FILE',
  454. FOLDER: 'FOLDER',
  455. };
  456. /**
  457. * @enum {string}
  458. */
  459. chrome.developerPrivate.EventType = {
  460. INSTALLED: 'INSTALLED',
  461. UNINSTALLED: 'UNINSTALLED',
  462. LOADED: 'LOADED',
  463. UNLOADED: 'UNLOADED',
  464. VIEW_REGISTERED: 'VIEW_REGISTERED',
  465. VIEW_UNREGISTERED: 'VIEW_UNREGISTERED',
  466. ERROR_ADDED: 'ERROR_ADDED',
  467. ERRORS_REMOVED: 'ERRORS_REMOVED',
  468. PREFS_CHANGED: 'PREFS_CHANGED',
  469. WARNINGS_CHANGED: 'WARNINGS_CHANGED',
  470. COMMAND_ADDED: 'COMMAND_ADDED',
  471. COMMAND_REMOVED: 'COMMAND_REMOVED',
  472. PERMISSIONS_CHANGED: 'PERMISSIONS_CHANGED',
  473. SERVICE_WORKER_STARTED: 'SERVICE_WORKER_STARTED',
  474. SERVICE_WORKER_STOPPED: 'SERVICE_WORKER_STOPPED',
  475. };
  476. /**
  477. * @typedef {{
  478. * message: string,
  479. * item_path: string,
  480. * pem_path: string,
  481. * override_flags: number,
  482. * status: !chrome.developerPrivate.PackStatus
  483. * }}
  484. */
  485. chrome.developerPrivate.PackDirectoryResponse;
  486. /**
  487. * @typedef {{
  488. * name: string
  489. * }}
  490. */
  491. chrome.developerPrivate.ProjectInfo;
  492. /**
  493. * @typedef {{
  494. * event_type: !chrome.developerPrivate.EventType,
  495. * item_id: string,
  496. * extensionInfo: (!chrome.developerPrivate.ExtensionInfo|undefined)
  497. * }}
  498. */
  499. chrome.developerPrivate.EventData;
  500. /**
  501. * @typedef {{
  502. * beforeHighlight: string,
  503. * highlight: string,
  504. * afterHighlight: string
  505. * }}
  506. */
  507. chrome.developerPrivate.ErrorFileSource;
  508. /**
  509. * @typedef {{
  510. * error: string,
  511. * path: string,
  512. * source: (!chrome.developerPrivate.ErrorFileSource|undefined),
  513. * retryGuid: string
  514. * }}
  515. */
  516. chrome.developerPrivate.LoadError;
  517. /**
  518. * @typedef {{
  519. * extensionId: string,
  520. * pathSuffix: string,
  521. * message: string,
  522. * manifestKey: (string|undefined),
  523. * manifestSpecific: (string|undefined),
  524. * lineNumber: (number|undefined)
  525. * }}
  526. */
  527. chrome.developerPrivate.RequestFileSourceProperties;
  528. /**
  529. * @typedef {{
  530. * highlight: string,
  531. * beforeHighlight: string,
  532. * afterHighlight: string,
  533. * title: string,
  534. * message: string
  535. * }}
  536. */
  537. chrome.developerPrivate.RequestFileSourceResponse;
  538. /**
  539. * @typedef {{
  540. * extensionId: (string|undefined),
  541. * renderViewId: number,
  542. * renderProcessId: number,
  543. * isServiceWorker: (boolean|undefined),
  544. * incognito: (boolean|undefined),
  545. * url: (string|undefined),
  546. * lineNumber: (number|undefined),
  547. * columnNumber: (number|undefined)
  548. * }}
  549. */
  550. chrome.developerPrivate.OpenDevToolsProperties;
  551. /**
  552. * @typedef {{
  553. * extensionId: string,
  554. * errorIds: (!Array<number>|undefined),
  555. * type: (!chrome.developerPrivate.ErrorType|undefined)
  556. * }}
  557. */
  558. chrome.developerPrivate.DeleteExtensionErrorsProperties;
  559. /**
  560. * Runs auto update for extensions and apps immediately.
  561. * @param {function(): void=} callback Called after update check completes.
  562. */
  563. chrome.developerPrivate.autoUpdate = function(callback) {};
  564. /**
  565. * Returns information of all the extensions and apps installed.
  566. * @param {!chrome.developerPrivate.GetExtensionsInfoOptions=} options Options
  567. * to restrict the items returned.
  568. * @param {function(!Array<!chrome.developerPrivate.ExtensionInfo>): void=}
  569. * callback Called with extensions info.
  570. */
  571. chrome.developerPrivate.getExtensionsInfo = function(options, callback) {};
  572. /**
  573. * Returns information of a particular extension.
  574. * @param {string} id The id of the extension.
  575. * @param {function(!chrome.developerPrivate.ExtensionInfo): void=} callback
  576. * Called with the result.
  577. */
  578. chrome.developerPrivate.getExtensionInfo = function(id, callback) {};
  579. /**
  580. * Returns the size of a particular extension on disk (already formatted).
  581. * @param {string} id The id of the extension.
  582. * @param {function(string): void} callback Called with the result.
  583. */
  584. chrome.developerPrivate.getExtensionSize = function(id, callback) {};
  585. /**
  586. * Returns information of all the extensions and apps installed.
  587. * @param {boolean} includeDisabled include disabled items.
  588. * @param {boolean} includeTerminated include terminated items.
  589. * @param {function(!Array<!chrome.developerPrivate.ItemInfo>): void} callback
  590. * Called with items info.
  591. * @deprecated Use getExtensionsInfo
  592. */
  593. chrome.developerPrivate.getItemsInfo = function(includeDisabled, includeTerminated, callback) {};
  594. /**
  595. * Returns the current profile's configuration.
  596. * @param {function(!chrome.developerPrivate.ProfileInfo): void} callback
  597. */
  598. chrome.developerPrivate.getProfileConfiguration = function(callback) {};
  599. /**
  600. * Updates the active profile.
  601. * @param {!chrome.developerPrivate.ProfileConfigurationUpdate} update The
  602. * parameters for updating the profile's configuration. Any properties
  603. * omitted from |update| will not be changed.
  604. * @param {function(): void=} callback
  605. */
  606. chrome.developerPrivate.updateProfileConfiguration = function(update, callback) {};
  607. /**
  608. * Opens a permissions dialog.
  609. * @param {string} extensionId The id of the extension to show permissions for.
  610. * @param {function(): void=} callback
  611. */
  612. chrome.developerPrivate.showPermissionsDialog = function(extensionId, callback) {};
  613. /**
  614. * Reloads a given extension.
  615. * @param {string} extensionId The id of the extension to reload.
  616. * @param {!chrome.developerPrivate.ReloadOptions=} options Additional
  617. * configuration parameters.
  618. * @param {function((!chrome.developerPrivate.LoadError|undefined)): void=}
  619. * callback
  620. */
  621. chrome.developerPrivate.reload = function(extensionId, options, callback) {};
  622. /**
  623. * Modifies an extension's current configuration.
  624. * @param {!chrome.developerPrivate.ExtensionConfigurationUpdate} update The
  625. * parameters for updating the extension's configuration. Any properties
  626. * omitted from |update| will not be changed.
  627. * @param {function(): void=} callback
  628. */
  629. chrome.developerPrivate.updateExtensionConfiguration = function(update, callback) {};
  630. /**
  631. * Loads a user-selected unpacked item.
  632. * @param {!chrome.developerPrivate.LoadUnpackedOptions=} options Additional
  633. * configuration parameters.
  634. * @param {function((!chrome.developerPrivate.LoadError|undefined)): void=}
  635. * callback
  636. */
  637. chrome.developerPrivate.loadUnpacked = function(options, callback) {};
  638. /**
  639. * Installs the file that was dragged and dropped onto the associated page.
  640. * @param {function(): void=} callback
  641. */
  642. chrome.developerPrivate.installDroppedFile = function(callback) {};
  643. /**
  644. * Notifies the browser that a user began a drag in order to install an
  645. * extension.
  646. */
  647. chrome.developerPrivate.notifyDragInstallInProgress = function() {};
  648. /**
  649. * Loads an extension / app.
  650. * @param {DirectoryEntry} directory The directory to load the extension from.
  651. * @param {function(string): void} callback
  652. */
  653. chrome.developerPrivate.loadDirectory = function(directory, callback) {};
  654. /**
  655. * Open Dialog to browse to an entry.
  656. * @param {!chrome.developerPrivate.SelectType} selectType Select a file or a
  657. * folder.
  658. * @param {!chrome.developerPrivate.FileType} fileType Required file type. For
  659. * example, pem type is for private key and load type is for an unpacked
  660. * item.
  661. * @param {function(string): void} callback called with selected item's path.
  662. */
  663. chrome.developerPrivate.choosePath = function(selectType, fileType, callback) {};
  664. /**
  665. * Pack an extension.
  666. * @param {string} path
  667. * @param {string=} privateKeyPath The path of the private key, if one is given.
  668. * @param {number=} flags Special flags to apply to the loading process, if any.
  669. * @param {function(!chrome.developerPrivate.PackDirectoryResponse): void=}
  670. * callback called with the success result string.
  671. */
  672. chrome.developerPrivate.packDirectory = function(path, privateKeyPath, flags, callback) {};
  673. /**
  674. * Returns true if the profile is managed.
  675. * @param {function(boolean): void} callback
  676. */
  677. chrome.developerPrivate.isProfileManaged = function(callback) {};
  678. /**
  679. * Reads and returns the contents of a file related to an extension which caused
  680. * an error.
  681. * @param {!chrome.developerPrivate.RequestFileSourceProperties} properties
  682. * @param {function(!chrome.developerPrivate.RequestFileSourceResponse): void}
  683. * callback
  684. */
  685. chrome.developerPrivate.requestFileSource = function(properties, callback) {};
  686. /**
  687. * Open the developer tools to focus on a particular error.
  688. * @param {!chrome.developerPrivate.OpenDevToolsProperties} properties
  689. * @param {function(): void=} callback
  690. */
  691. chrome.developerPrivate.openDevTools = function(properties, callback) {};
  692. /**
  693. * Delete reported extension errors.
  694. * @param {!chrome.developerPrivate.DeleteExtensionErrorsProperties} properties
  695. * The properties specifying the errors to remove.
  696. * @param {function(): void=} callback
  697. */
  698. chrome.developerPrivate.deleteExtensionErrors = function(properties, callback) {};
  699. /**
  700. * Repairs the extension specified.
  701. * @param {string} extensionId The id of the extension to repair.
  702. * @param {function(): void=} callback
  703. */
  704. chrome.developerPrivate.repairExtension = function(extensionId, callback) {};
  705. /**
  706. * Shows the options page for the extension specified.
  707. * @param {string} extensionId The id of the extension to show the options page
  708. * for.
  709. * @param {function(): void=} callback
  710. */
  711. chrome.developerPrivate.showOptions = function(extensionId, callback) {};
  712. /**
  713. * Shows the path of the extension specified.
  714. * @param {string} extensionId The id of the extension to show the path for.
  715. * @param {function(): void=} callback
  716. */
  717. chrome.developerPrivate.showPath = function(extensionId, callback) {};
  718. /**
  719. * (Un)suspends global shortcut handling.
  720. * @param {boolean} isSuspended Whether or not shortcut handling should be
  721. * suspended.
  722. * @param {function(): void=} callback
  723. */
  724. chrome.developerPrivate.setShortcutHandlingSuspended = function(isSuspended, callback) {};
  725. /**
  726. * Updates an extension command.
  727. * @param {!chrome.developerPrivate.ExtensionCommandUpdate} update The
  728. * parameters for updating the extension command.
  729. * @param {function(): void=} callback
  730. */
  731. chrome.developerPrivate.updateExtensionCommand = function(update, callback) {};
  732. /**
  733. * Adds a new host permission to the extension. The extension will only have
  734. * access to the host if it is within the requested permissions.
  735. * @param {string} extensionId The id of the extension to modify.
  736. * @param {string} host The host to add.
  737. * @param {function(): void=} callback
  738. */
  739. chrome.developerPrivate.addHostPermission = function(extensionId, host, callback) {};
  740. /**
  741. * Removes a host permission from the extension. This should only be called with
  742. * a host that the extension has access to.
  743. * @param {string} extensionId The id of the extension to modify.
  744. * @param {string} host The host to remove.
  745. * @param {function(): void=} callback
  746. */
  747. chrome.developerPrivate.removeHostPermission = function(extensionId, host, callback) {};
  748. /**
  749. * Returns the user specified site settings (which origins can extensions
  750. * always/never run on) for the current profile.
  751. * @param {function(!chrome.developerPrivate.UserSiteSettings): void=} callback
  752. */
  753. chrome.developerPrivate.getUserSiteSettings = function(callback) {};
  754. /**
  755. * Adds hosts to the set of user permitted or restricted sites. If any hosts are
  756. * in the other set than what's specified in `options`, then they are removed
  757. * from that set.
  758. * @param {!chrome.developerPrivate.UserSiteSettingsOptions} options
  759. * @param {function(): void=} callback
  760. */
  761. chrome.developerPrivate.addUserSpecifiedSites = function(options, callback) {};
  762. /**
  763. * Removes hosts from the specified set of user permitted or restricted sites.
  764. * @param {!chrome.developerPrivate.UserSiteSettingsOptions} options
  765. * @param {function(): void=} callback
  766. */
  767. chrome.developerPrivate.removeUserSpecifiedSites = function(options, callback) {};
  768. /**
  769. * Returns all hosts specified by user site settings, grouped by each host's
  770. * eTLD+1.
  771. * @param {function(!Array<!chrome.developerPrivate.SiteGroup>): void=} callback
  772. */
  773. chrome.developerPrivate.getUserAndExtensionSitesByEtld = function(callback) {};
  774. /**
  775. * @param {string} site
  776. * @param {function(!Array<!chrome.developerPrivate.MatchingExtensionInfo>): void=}
  777. * callback
  778. */
  779. chrome.developerPrivate.getMatchingExtensionsForSite = function(site, callback) {};
  780. /**
  781. * @param {string} id
  782. * @param {boolean} enabled
  783. * @param {function(): void=} callback
  784. * @deprecated Use management.setEnabled
  785. */
  786. chrome.developerPrivate.enable = function(id, enabled, callback) {};
  787. /**
  788. * @param {string} extensionId
  789. * @param {boolean} allow
  790. * @param {function(): void=} callback
  791. * @deprecated Use updateExtensionConfiguration
  792. */
  793. chrome.developerPrivate.allowIncognito = function(extensionId, allow, callback) {};
  794. /**
  795. * @param {string} extensionId
  796. * @param {boolean} allow
  797. * @param {function(): void=} callback
  798. * @deprecated Use updateExtensionConfiguration
  799. */
  800. chrome.developerPrivate.allowFileAccess = function(extensionId, allow, callback) {};
  801. /**
  802. * @param {!chrome.developerPrivate.InspectOptions} options
  803. * @param {function(): void=} callback
  804. * @deprecated Use openDevTools
  805. */
  806. chrome.developerPrivate.inspect = function(options, callback) {};
  807. /**
  808. * Fired when a item state is changed.
  809. * @type {!ChromeEvent}
  810. */
  811. chrome.developerPrivate.onItemStateChanged;
  812. /**
  813. * Fired when the profile's state has changed.
  814. * @type {!ChromeEvent}
  815. */
  816. chrome.developerPrivate.onProfileStateChanged;
  817. /**
  818. * Fired when the lists of sites in the user's site settings have changed.
  819. * @type {!ChromeEvent}
  820. */
  821. chrome.developerPrivate.onUserSiteSettingsChanged;