OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // developerPrivate API. | 5 // developerPrivate API. |
6 // This is a private API exposing developing and debugging functionalities for | 6 // This is a private API exposing developing and debugging functionalities for |
7 // apps and extensions. | 7 // apps and extensions. |
8 | 8 |
9 namespace developerPrivate { | 9 namespace developerPrivate { |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // Unpacked items's path. | 91 // Unpacked items's path. |
92 DOMString item_path; | 92 DOMString item_path; |
93 | 93 |
94 // Permanent key path. | 94 // Permanent key path. |
95 DOMString pem_path; | 95 DOMString pem_path; |
96 | 96 |
97 long override_flags; | 97 long override_flags; |
98 PackStatus status; | 98 PackStatus status; |
99 }; | 99 }; |
100 | 100 |
| 101 callback VoidCallback = void (); |
101 callback BooleanCallback = void (boolean result); | 102 callback BooleanCallback = void (boolean result); |
102 callback ItemsInfoCallback = void (ItemInfo[] result); | 103 callback ItemsInfoCallback = void (ItemInfo[] result); |
103 callback GetStringsCallback = void (object result); | 104 callback GetStringsCallback = void (object result); |
104 callback PathCallback = void (DOMString path); | 105 callback PathCallback = void (DOMString path); |
105 callback PackCallback = void (PackDirectoryResponse response); | 106 callback PackCallback = void (PackDirectoryResponse response); |
106 callback VoidCallback = void(); | 107 callback VoidCallback = void(); |
107 | 108 |
108 interface Functions { | 109 interface Functions { |
109 // Runs auto update for extensions and apps immediately. | 110 // Runs auto update for extensions and apps immediately. |
110 // |callback| : Called with the boolean result, true if autoUpdate is | 111 // |callback| : Called with the boolean result, true if autoUpdate is |
(...skipping 21 matching lines...) Expand all Loading... |
132 static void reload(DOMString itemId, optional VoidCallback callback); | 133 static void reload(DOMString itemId, optional VoidCallback callback); |
133 | 134 |
134 // Restarts a given item with |itemId|. | 135 // Restarts a given item with |itemId|. |
135 static void restart(DOMString itemId, optional VoidCallback callback); | 136 static void restart(DOMString itemId, optional VoidCallback callback); |
136 | 137 |
137 // Enable / Disable a given item with id |itemId|. | 138 // Enable / Disable a given item with id |itemId|. |
138 static void enable(DOMString itemId, | 139 static void enable(DOMString itemId, |
139 boolean enable, | 140 boolean enable, |
140 optional VoidCallback callback); | 141 optional VoidCallback callback); |
141 | 142 |
| 143 // Allow / Disallow item with |item_id| in incognito mode. |
| 144 static void allowIncognito(DOMString item_id, |
| 145 boolean allow, |
| 146 VoidCallback callback); |
| 147 |
142 // Load a user selected unpacked item | 148 // Load a user selected unpacked item |
143 static void loadUnpacked(optional VoidCallback callback); | 149 static void loadUnpacked(optional VoidCallback callback); |
144 | 150 |
145 // Open Dialog to browse to an entry. | 151 // Open Dialog to browse to an entry. |
146 // |select_type| : Select a file or a folder. | 152 // |select_type| : Select a file or a folder. |
147 // |file_type| : Required file type. For Example pem type is for private | 153 // |file_type| : Required file type. For Example pem type is for private |
148 // key and load type is for an unpacked item. | 154 // key and load type is for an unpacked item. |
149 // |callback| : called with selected item's path. | 155 // |callback| : called with selected item's path. |
150 static void choosePath(SelectType select_type, | 156 static void choosePath(SelectType select_type, |
151 FileType file_type, | 157 FileType file_type, |
152 PathCallback callback); | 158 PathCallback callback); |
153 | 159 |
154 // Pack an item with given |path| and |private_key_path| | 160 // Pack an item with given |path| and |private_key_path| |
155 // |callback| : called with the success result string. | 161 // |callback| : called with the success result string. |
156 static void packDirectory(DOMString path, | 162 static void packDirectory(DOMString path, |
157 DOMString private_key_path, | 163 DOMString private_key_path, |
158 long flags, | 164 long flags, |
159 PackCallback callback); | 165 PackCallback callback); |
160 | 166 |
161 // Gets localized translated strings for apps_debugger. It returns the | 167 // Gets localized translated strings for apps_debugger. It returns the |
162 // strings as a dictionary mapping from string identifier to the | 168 // strings as a dictionary mapping from string identifier to the |
163 // translated string to use in the apps_debugger app UI. | 169 // translated string to use in the apps_debugger app UI. |
164 static void getStrings(GetStringsCallback callback); | 170 static void getStrings(GetStringsCallback callback); |
165 }; | 171 }; |
166 | 172 |
167 }; | 173 }; |
OLD | NEW |