| OLD | NEW |
| (Empty) |
| 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 // developerPrivate API. | |
| 6 // This is a private API exposing developing and debugging functionalities for | |
| 7 // apps and extensions. | |
| 8 | |
| 9 namespace developerPrivate { | |
| 10 | |
| 11 enum ItemType { | |
| 12 hosted_app, | |
| 13 packaged_app, | |
| 14 legacy_packaged_app, | |
| 15 extension, | |
| 16 theme | |
| 17 }; | |
| 18 | |
| 19 dictionary ItemInspectView { | |
| 20 // path to the inspect page. | |
| 21 DOMString path; | |
| 22 | |
| 23 // For lazy background pages, the value is -1. | |
| 24 long render_process_id; | |
| 25 | |
| 26 long render_view_id; | |
| 27 boolean incognito; | |
| 28 }; | |
| 29 | |
| 30 dictionary ItemInfo { | |
| 31 DOMString id; | |
| 32 DOMString name; | |
| 33 DOMString version; | |
| 34 DOMString description; | |
| 35 boolean may_disable; | |
| 36 boolean enabled; | |
| 37 DOMString? disabled_reason; | |
| 38 boolean isApp; | |
| 39 ItemType type; | |
| 40 boolean allow_activity; | |
| 41 boolean allow_file_access; | |
| 42 boolean wants_file_access; | |
| 43 boolean enabled_incognito; | |
| 44 boolean is_unpacked; | |
| 45 boolean allow_reload; | |
| 46 DOMString icon; | |
| 47 | |
| 48 // Path of an unpacked extension. | |
| 49 DOMString? path; | |
| 50 | |
| 51 // Options settings page for the item. | |
| 52 DOMString? options_url; | |
| 53 DOMString? app_launch_url; | |
| 54 DOMString? homepage_url; | |
| 55 DOMString? update_url; | |
| 56 boolean offline_enabled; | |
| 57 | |
| 58 // All views of the current extension. | |
| 59 ItemInspectView[] views; | |
| 60 }; | |
| 61 | |
| 62 dictionary InspectOptions { | |
| 63 DOMString extension_id; | |
| 64 DOMString render_process_id; | |
| 65 DOMString render_view_id; | |
| 66 boolean incognito; | |
| 67 }; | |
| 68 | |
| 69 callback BooleanCallback = void (boolean result); | |
| 70 callback ItemsInfoCallback = void (ItemInfo[] result); | |
| 71 | |
| 72 interface Functions { | |
| 73 // Runs auto update for extensions and apps immediately. | |
| 74 // |callback| : Called with the boolean result, true if autoUpdate is | |
| 75 // successful. | |
| 76 static void autoUpdate(BooleanCallback callback); | |
| 77 | |
| 78 // Returns information of all the extensions and apps installed. | |
| 79 // |include_disabled| : include disabled items. | |
| 80 // |include_terminated| : include terminated items. | |
| 81 // |callback| : Called with items info. | |
| 82 static void getItemsInfo(boolean include_disabled, | |
| 83 boolean include_terminated, | |
| 84 ItemsInfoCallback callback); | |
| 85 | |
| 86 // Opens an inspect window for given |options| | |
| 87 static void inspect(InspectOptions options, | |
| 88 BooleanCallback callback); | |
| 89 }; | |
| 90 | |
| 91 }; | |
| OLD | NEW |