OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 'use strict'; | |
6 | |
7 /** | 5 /** |
8 * Client used to connect to the remote ImageLoader extension. Client class runs | 6 * Client used to connect to the remote ImageLoader extension. Client class runs |
9 * in the extension, where the client.js is included (eg. Files.app). | 7 * in the extension, where the client.js is included (eg. Files.app). |
10 * It sends remote requests using IPC to the ImageLoader class and forwards | 8 * It sends remote requests using IPC to the ImageLoader class and forwards |
11 * its responses. | 9 * its responses. |
12 * | 10 * |
13 * Implements cache, which is stored in the calling extension. | 11 * Implements cache, which is stored in the calling extension. |
14 * | 12 * |
15 * @constructor | 13 * @constructor |
16 */ | 14 */ |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 onError(); | 358 onError(); |
361 return; | 359 return; |
362 } | 360 } |
363 image.src = result.data; | 361 image.src = result.data; |
364 onSuccess(); | 362 onSuccess(); |
365 }; | 363 }; |
366 | 364 |
367 return ImageLoaderClient.getInstance().load( | 365 return ImageLoaderClient.getInstance().load( |
368 url, callback, options, opt_isValid); | 366 url, callback, options, opt_isValid); |
369 }; | 367 }; |
OLD | NEW |