| 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 [permissions=downloads] | 5 [permissions=downloads] |
| 6 namespace downloads { | 6 namespace downloads { |
| 7 [inline_doc] dictionary HeaderNameValuePair { | 7 [inline_doc] dictionary HeaderNameValuePair { |
| 8 // Name of the HTTP header. | 8 // Name of the HTTP header. |
| 9 DOMString name; | 9 DOMString name; |
| 10 | 10 |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 static void erase(DownloadQuery query, optional EraseCallback callback); | 375 static void erase(DownloadQuery query, optional EraseCallback callback); |
| 376 | 376 |
| 377 // TODO(benjhayden) Comment. | 377 // TODO(benjhayden) Comment. |
| 378 [nodoc] static void setDestination(long downloadId, DOMString relativePath); | 378 [nodoc] static void setDestination(long downloadId, DOMString relativePath); |
| 379 | 379 |
| 380 // Prompt the user to either accept or cancel a dangerous download. | 380 // Prompt the user to either accept or cancel a dangerous download. |
| 381 // <code>acceptDanger()</code> does not automatically accept dangerous | 381 // <code>acceptDanger()</code> does not automatically accept dangerous |
| 382 // downloads. | 382 // downloads. |
| 383 [nodoc] static void acceptDanger(long downloadId); | 383 [nodoc] static void acceptDanger(long downloadId); |
| 384 | 384 |
| 385 // Initiate dragging the file to another application. | 385 // Initiate dragging the downloaded file to another application. |
| 386 [nodoc] static void drag(long downloadId); | 386 static void drag(long downloadId); |
| 387 }; | 387 }; |
| 388 | 388 |
| 389 interface Events { | 389 interface Events { |
| 390 // This event fires with the $ref:DownloadItem | 390 // This event fires with the $ref:DownloadItem |
| 391 // object when a download begins. | 391 // object when a download begins. |
| 392 static void onCreated(DownloadItem downloadItem); | 392 static void onCreated(DownloadItem downloadItem); |
| 393 | 393 |
| 394 // Fires with the <code>downloadId</code> when a download is erased from | 394 // Fires with the <code>downloadId</code> when a download is erased from |
| 395 // history. | 395 // history. |
| 396 // |downloadId|: The <code>id</code> of the $ref:DownloadItem that was erase
d. | 396 // |downloadId|: The <code>id</code> of the $ref:DownloadItem that was erase
d. |
| 397 static void onErased(long downloadId); | 397 static void onErased(long downloadId); |
| 398 | 398 |
| 399 // When any of a $ref:DownloadItem's properties | 399 // When any of a $ref:DownloadItem's properties |
| 400 // except <code>bytesReceived</code> changes, this event fires with the | 400 // except <code>bytesReceived</code> changes, this event fires with the |
| 401 // <code>downloadId</code> and an object containing the properties that chan
ged. | 401 // <code>downloadId</code> and an object containing the properties that chan
ged. |
| 402 static void onChanged(DownloadDelta downloadDelta); | 402 static void onChanged(DownloadDelta downloadDelta); |
| 403 }; | 403 }; |
| 404 }; | 404 }; |
| OLD | NEW |