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 BooleanCallback = void (boolean result); | 101 callback BooleanCallback = void (boolean result); |
asargent_no_longer_on_chrome
2013/02/22 00:04:06
nit: a BooleanCallback like this should only be us
Gaurav
2013/02/25 18:26:51
Done.
| |
102 callback ItemsInfoCallback = void (ItemInfo[] result); | 102 callback ItemsInfoCallback = void (ItemInfo[] result); |
103 callback GetStringsCallback = void (object result); | 103 callback GetStringsCallback = void (object result); |
104 callback PathCallback = void (DOMString path); | 104 callback PathCallback = void (DOMString path); |
105 callback PackCallback = void (PackDirectoryResponse response); | 105 callback PackCallback = void (PackDirectoryResponse response); |
106 | 106 |
107 interface Functions { | 107 interface Functions { |
108 // Runs auto update for extensions and apps immediately. | 108 // Runs auto update for extensions and apps immediately. |
109 // |callback| : Called with the boolean result, true if autoUpdate is | 109 // |callback| : Called with the boolean result, true if autoUpdate is |
110 // successful. | 110 // successful. |
111 static void autoUpdate(BooleanCallback callback); | 111 static void autoUpdate(BooleanCallback callback); |
(...skipping 16 matching lines...) Expand all Loading... | |
128 BooleanCallback callback); | 128 BooleanCallback callback); |
129 | 129 |
130 // Reloads a given item with |itemId|. | 130 // Reloads a given item with |itemId|. |
131 static void reload(DOMString itemId, BooleanCallback callback); | 131 static void reload(DOMString itemId, BooleanCallback callback); |
132 | 132 |
133 // Enable / Disable a given item with id |itemId|. | 133 // Enable / Disable a given item with id |itemId|. |
134 static void enable(DOMString itemId, | 134 static void enable(DOMString itemId, |
135 boolean enable, | 135 boolean enable, |
136 BooleanCallback callback); | 136 BooleanCallback callback); |
137 | 137 |
138 // Allow / Disallow item with |item_id| in incognito mode. | |
139 static void allowIncognito(DOMString item_id, | |
140 boolean allow, | |
141 BooleanCallback callback); | |
142 | |
138 // Load a user selected unpacked item | 143 // Load a user selected unpacked item |
139 static void loadUnpacked(BooleanCallback callback); | 144 static void loadUnpacked(BooleanCallback callback); |
140 | 145 |
141 // Open Dialog to browse to an entry. | 146 // Open Dialog to browse to an entry. |
142 // |select_type| : Select a file or a folder. | 147 // |select_type| : Select a file or a folder. |
143 // |file_type| : Required file type. For Example pem type is for private | 148 // |file_type| : Required file type. For Example pem type is for private |
144 // key and load type is for an unpacked item. | 149 // key and load type is for an unpacked item. |
145 // |callback| : called with selected item's path. | 150 // |callback| : called with selected item's path. |
146 static void choosePath(SelectType select_type, | 151 static void choosePath(SelectType select_type, |
147 FileType file_type, | 152 FileType file_type, |
148 PathCallback callback); | 153 PathCallback callback); |
149 | 154 |
150 // Pack an item with given |path| and |private_key_path| | 155 // Pack an item with given |path| and |private_key_path| |
151 // |callback| : called with the success result string. | 156 // |callback| : called with the success result string. |
152 static void packDirectory(DOMString path, | 157 static void packDirectory(DOMString path, |
153 DOMString private_key_path, | 158 DOMString private_key_path, |
154 long flags, | 159 long flags, |
155 PackCallback callback); | 160 PackCallback callback); |
156 | 161 |
157 // Gets localized translated strings for apps_debugger. It returns the | 162 // Gets localized translated strings for apps_debugger. It returns the |
158 // strings as a dictionary mapping from string identifier to the | 163 // strings as a dictionary mapping from string identifier to the |
159 // translated string to use in the apps_debugger app UI. | 164 // translated string to use in the apps_debugger app UI. |
160 static void getStrings(GetStringsCallback callback); | 165 static void getStrings(GetStringsCallback callback); |
161 }; | 166 }; |
162 | 167 |
163 }; | 168 }; |
OLD | NEW |