Chromium Code Reviews| 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 358 optional GetFileIconOptions options, | 358 optional GetFileIconOptions options, |
| 359 GetFileIconCallback callback); | 359 GetFileIconCallback callback); |
| 360 | 360 |
| 361 // Open the downloaded file now if the $ref:DownloadItem is complete; | 361 // Open the downloaded file now if the $ref:DownloadItem is complete; |
| 362 // returns an error through $ref:runtime.lastError otherwise. An | 362 // returns an error through $ref:runtime.lastError otherwise. An |
| 363 // $ref:onChanged event will fire when the item is opened for the first | 363 // $ref:onChanged event will fire when the item is opened for the first |
| 364 // time. | 364 // time. |
| 365 // |downloadId|: The identifier for the downloaded file. | 365 // |downloadId|: The identifier for the downloaded file. |
| 366 static void open(long downloadId); | 366 static void open(long downloadId); |
| 367 | 367 |
| 368 // Erase matching $ref:DownloadItem from history | 368 // Erase matching $ref:DownloadItem from history. An $ref.onErased event |
| 369 [nodoc] static void erase(DownloadQuery query, | 369 // will fire for each $ref.DownloadItem that matches <code>query</code>, |
| 370 optional EraseCallback callback); | 370 // then <code>callback</code> will be called. |
| 371 static void erase(DownloadQuery query, optional EraseCallback callback); | |
|
Randy Smith (Not in Mondays)
2012/12/10 19:04:36
I don't understand what runs the callback? Do you
benjhayden
2012/12/10 19:10:48
This is in the same boat as search(), download(),
Randy Smith (Not in Mondays)
2012/12/10 19:17:27
Sorry, I'm sure that this is because I don't look
benjhayden
2012/12/10 19:26:29
The code that iterates through the items to be rem
Randy Smith (Not in Mondays)
2012/12/11 15:28:01
So what's the source dataflow for the ids that are
benjhayden
2012/12/11 18:47:45
Oh! Sorry, I completely missed that the callback t
| |
| 371 | 372 |
| 372 // TODO(benjhayden) Comment. | 373 // TODO(benjhayden) Comment. |
| 373 [nodoc] static void setDestination(long downloadId, DOMString relativePath); | 374 [nodoc] static void setDestination(long downloadId, DOMString relativePath); |
| 374 | 375 |
| 375 // Prompt the user to either accept or cancel a dangerous download. | 376 // Prompt the user to either accept or cancel a dangerous download. |
| 376 // <code>acceptDanger()</code> does not automatically accept dangerous | 377 // <code>acceptDanger()</code> does not automatically accept dangerous |
| 377 // downloads. | 378 // downloads. |
| 378 [nodoc] static void acceptDanger(long downloadId); | 379 [nodoc] static void acceptDanger(long downloadId); |
| 379 | 380 |
| 380 // Show the downloaded file in its folder in a file manager. | 381 // Show the downloaded file in its folder in a file manager. |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 393 // history. | 394 // history. |
| 394 // |downloadId|: The <code>id</code> of the $ref:DownloadItem that was erase d. | 395 // |downloadId|: The <code>id</code> of the $ref:DownloadItem that was erase d. |
| 395 static void onErased(long downloadId); | 396 static void onErased(long downloadId); |
| 396 | 397 |
| 397 // When any of a $ref:DownloadItem's properties | 398 // When any of a $ref:DownloadItem's properties |
| 398 // except <code>bytesReceived</code> changes, this event fires with the | 399 // except <code>bytesReceived</code> changes, this event fires with the |
| 399 // <code>downloadId</code> and an object containing the properties that chan ged. | 400 // <code>downloadId</code> and an object containing the properties that chan ged. |
| 400 static void onChanged(DownloadDelta downloadDelta); | 401 static void onChanged(DownloadDelta downloadDelta); |
| 401 }; | 402 }; |
| 402 }; | 403 }; |
| OLD | NEW |