OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 200 |
201 /** | 201 /** |
202 * @param {string} url | 202 * @param {string} url |
203 * @param {string} headers | 203 * @param {string} headers |
204 * @param {number} streamId | 204 * @param {number} streamId |
205 * @param {function(!InspectorFrontendHostAPI.LoadNetworkResourceResult)} ca
llback | 205 * @param {function(!InspectorFrontendHostAPI.LoadNetworkResourceResult)} ca
llback |
206 */ | 206 */ |
207 loadNetworkResource: function(url, headers, streamId, callback) { }, | 207 loadNetworkResource: function(url, headers, streamId, callback) { }, |
208 | 208 |
209 /** | 209 /** |
| 210 * @param {function(!Object<string, string>)} callback |
| 211 */ |
| 212 getPreferences: function(callback) { }, |
| 213 |
| 214 /** |
| 215 * @param {string} name |
| 216 * @param {string} value |
| 217 */ |
| 218 setPreference: function(name, value) { }, |
| 219 |
| 220 /** |
| 221 * @param {string} name |
| 222 */ |
| 223 removePreference: function(name) { }, |
| 224 |
| 225 clearPreferences: function() { }, |
| 226 |
| 227 /** |
210 * @param {!FileSystem} fileSystem | 228 * @param {!FileSystem} fileSystem |
211 */ | 229 */ |
212 upgradeDraggedFileSystemPermissions: function(fileSystem) { }, | 230 upgradeDraggedFileSystemPermissions: function(fileSystem) { }, |
213 | 231 |
214 /** | 232 /** |
215 * @return {string} | 233 * @return {string} |
216 */ | 234 */ |
217 platform: function() { }, | 235 platform: function() { }, |
218 | 236 |
219 /** | 237 /** |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 * @param {number} streamId | 513 * @param {number} streamId |
496 * @param {function(!InspectorFrontendHostAPI.LoadNetworkResourceResult)} ca
llback | 514 * @param {function(!InspectorFrontendHostAPI.LoadNetworkResourceResult)} ca
llback |
497 */ | 515 */ |
498 loadNetworkResource: function(url, headers, streamId, callback) | 516 loadNetworkResource: function(url, headers, streamId, callback) |
499 { | 517 { |
500 callback({statusCode : 404}); | 518 callback({statusCode : 404}); |
501 }, | 519 }, |
502 | 520 |
503 /** | 521 /** |
504 * @override | 522 * @override |
| 523 * @param {function(!Object<string, string>)} callback |
| 524 */ |
| 525 getPreferences: function(callback) |
| 526 { |
| 527 var prefs = {}; |
| 528 for (var name in window.localStorage) |
| 529 prefs[name] = window.localStorage[name]; |
| 530 callback(prefs); |
| 531 }, |
| 532 |
| 533 /** |
| 534 * @override |
| 535 * @param {string} name |
| 536 * @param {string} value |
| 537 */ |
| 538 setPreference: function(name, value) |
| 539 { |
| 540 window.localStorage[name] = value; |
| 541 }, |
| 542 |
| 543 /** |
| 544 * @override |
| 545 * @param {string} name |
| 546 */ |
| 547 removePreference: function(name) |
| 548 { |
| 549 delete window.localStorage[name]; |
| 550 }, |
| 551 |
| 552 /** |
| 553 * @override |
| 554 */ |
| 555 clearPreferences: function() |
| 556 { |
| 557 window.localStorage.clear(); |
| 558 }, |
| 559 |
| 560 /** |
| 561 * @override |
505 * @param {!FileSystem} fileSystem | 562 * @param {!FileSystem} fileSystem |
506 */ | 563 */ |
507 upgradeDraggedFileSystemPermissions: function(fileSystem) | 564 upgradeDraggedFileSystemPermissions: function(fileSystem) |
508 { | 565 { |
509 }, | 566 }, |
510 | 567 |
511 /** | 568 /** |
512 * @override | 569 * @override |
513 * @param {number} requestId | 570 * @param {number} requestId |
514 * @param {string} fileSystemPath | 571 * @param {string} fileSystemPath |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 // so the host instance should not initialized there. | 770 // so the host instance should not initialized there. |
714 initializeInspectorFrontendHost(); | 771 initializeInspectorFrontendHost(); |
715 window.InspectorFrontendAPI = new InspectorFrontendAPIImpl(); | 772 window.InspectorFrontendAPI = new InspectorFrontendAPIImpl(); |
716 if (!window.DevToolsHost) { | 773 if (!window.DevToolsHost) { |
717 WebInspector.setLocalizationPlatform(InspectorFrontendHost.platform()); | 774 WebInspector.setLocalizationPlatform(InspectorFrontendHost.platform()); |
718 } else { | 775 } else { |
719 WebInspector.setLocalizationPlatform(DevToolsHost.platform()); | 776 WebInspector.setLocalizationPlatform(DevToolsHost.platform()); |
720 } | 777 } |
721 | 778 |
722 })(); | 779 })(); |
OLD | NEW |