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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 ItemInspectView[] views; | 61 ItemInspectView[] views; |
62 }; | 62 }; |
63 | 63 |
64 dictionary InspectOptions { | 64 dictionary InspectOptions { |
65 DOMString extension_id; | 65 DOMString extension_id; |
66 DOMString render_process_id; | 66 DOMString render_process_id; |
67 DOMString render_view_id; | 67 DOMString render_view_id; |
68 boolean incognito; | 68 boolean incognito; |
69 }; | 69 }; |
70 | 70 |
71 enum PackStatus { | |
72 SUCCESS, | |
73 ERROR, | |
74 WARNING | |
75 }; | |
76 | |
77 dictionary PackItemResponse { | |
78 | |
miket_OOO
2013/01/09 18:52:41
this newline isn't needed (follow style of others
Gaurav
2013/01/12 01:08:26
Done.
| |
79 // The response message of success or error. | |
80 DOMString message; | |
81 | |
82 // Unpacked items's path. | |
83 DOMString item_path; | |
miket_OOO
2013/01/09 18:52:41
The prevailing style in the IDL is itemPath, pemPa
Gaurav
2013/01/12 01:08:26
I changed the naming from camel case to underscore
| |
84 | |
85 // Permanent key path. | |
86 DOMString pem_path; | |
87 | |
88 long override_flags; | |
89 PackStatus status; | |
90 }; | |
91 | |
71 callback BooleanCallback = void (boolean result); | 92 callback BooleanCallback = void (boolean result); |
72 callback ItemsInfoCallback = void (ItemInfo[] result); | 93 callback ItemsInfoCallback = void (ItemInfo[] result); |
73 callback GetStringsCallback = void (object result); | 94 callback GetStringsCallback = void (object result); |
95 callback PathCallback = void (DOMString path); | |
96 callback PackCallback = void (PackItemResponse response); | |
74 | 97 |
75 interface Functions { | 98 interface Functions { |
76 // Runs auto update for extensions and apps immediately. | 99 // Runs auto update for extensions and apps immediately. |
77 // |callback| : Called with the boolean result, true if autoUpdate is | 100 // |callback| : Called with the boolean result, true if autoUpdate is |
78 // successful. | 101 // successful. |
79 static void autoUpdate(BooleanCallback callback); | 102 static void autoUpdate(BooleanCallback callback); |
80 | 103 |
81 // Returns information of all the extensions and apps installed. | 104 // Returns information of all the extensions and apps installed. |
82 // |include_disabled| : include disabled items. | 105 // |include_disabled| : include disabled items. |
83 // |include_terminated| : include terminated items. | 106 // |include_terminated| : include terminated items. |
84 // |callback| : Called with items info. | 107 // |callback| : Called with items info. |
85 static void getItemsInfo(boolean include_disabled, | 108 static void getItemsInfo(boolean include_disabled, |
86 boolean include_terminated, | 109 boolean include_terminated, |
87 ItemsInfoCallback callback); | 110 ItemsInfoCallback callback); |
88 | 111 |
89 // Opens an inspect window for given |options| | 112 // Opens an inspect window for given |options| |
90 static void inspect(InspectOptions options, | 113 static void inspect(InspectOptions options, |
91 BooleanCallback callback); | 114 BooleanCallback callback); |
92 | 115 |
93 // Enable / Disable file access for a given |itemId| | 116 // Enable / Disable file access for a given |item_id| |
miket_OOO
2013/01/09 18:52:41
Hmmmm. These changes seem to go in the wrong style
Gaurav
2013/01/12 01:08:26
Did them to be consistent with enums. Should I rev
| |
94 static void allowFileAccess(DOMString itemId, | 117 static void allowFileAccess(DOMString item_id, |
95 boolean isAllow, | 118 boolean is_allow, |
miket_OOO
2013/01/09 18:52:41
isAllowed sounds more natural (isEnabled below, to
Gaurav
2013/01/12 01:08:26
Done.
| |
96 BooleanCallback callback); | 119 BooleanCallback callback); |
97 | 120 |
98 // Reloads a given item with |itemId| | 121 // Reloads a given item with |item_id| |
99 static void reload(DOMString itemId, BooleanCallback callback); | 122 static void reload(DOMString item_id, BooleanCallback callback); |
100 | 123 |
101 // Uninstalls a given item with |itemId| | 124 // Uninstalls a given item with |item_id| |
102 static void uninstall(DOMString itemId, BooleanCallback callback); | 125 static void uninstall(DOMString item_id, BooleanCallback callback); |
103 | 126 |
104 // Enable / Disable a given item with id |itemId| | 127 // Enable / Disable a given item with id |item_id| |
105 static void enable(DOMString itemId, | 128 static void enable(DOMString item_id, |
106 boolean isEnable, | 129 boolean is_enable, |
107 BooleanCallback callback); | 130 BooleanCallback callback); |
108 | 131 |
109 // Load a user selected unpacked extension | 132 // Load a user selected unpacked item |
110 static void loadUnpacked(BooleanCallback callback); | 133 static void loadUnpacked(BooleanCallback callback); |
111 | 134 |
135 // Open Dialog to browse to an entry. | |
136 // |select_type| : The select type folder or file. | |
137 // |file_type| : Required file type. | |
asargent_no_longer_on_chrome
2013/01/09 00:48:05
What are the legal values for this? Does this mean
miket_OOO
2013/01/09 18:52:41
An example would be good if a full enumeration isn
Gaurav
2013/01/12 01:08:26
Done.
Gaurav
2013/01/12 01:08:26
Done.
| |
138 // |callback| : called with selected item's path. | |
139 static void chooseItem(DOMString select_type, | |
asargent_no_longer_on_chrome
2013/01/09 00:48:05
Nit: maybe "choosePath" would be a better name for
Gaurav
2013/01/12 01:08:26
Done.
| |
140 DOMString file_type, | |
141 PathCallback callback); | |
142 | |
143 // Pack an item with given |item_path| and |private_key_path| | |
144 // |callback| : called with the success result string. | |
145 static void packItem(DOMString item_path, | |
asargent_no_longer_on_chrome
2013/01/09 00:48:05
nit: I assume you use the term 'item' here and els
Gaurav
2013/01/12 01:08:26
Done.
| |
146 DOMString private_key_path, | |
147 long flags, | |
148 PackCallback callback); | |
149 | |
112 // Gets translated strings. | 150 // Gets translated strings. |
113 static void getStrings(GetStringsCallback callback); | 151 static void getStrings(GetStringsCallback callback); |
114 }; | 152 }; |
115 | 153 |
116 }; | 154 }; |
OLD | NEW |