OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/webui/downloads_dom_handler.h" | 5 #include "chrome/browser/ui/webui/downloads_dom_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "content/browser/tab_contents/tab_contents.h" | 33 #include "content/browser/tab_contents/tab_contents.h" |
34 #include "content/browser/user_metrics.h" | 34 #include "content/browser/user_metrics.h" |
35 #include "grit/generated_resources.h" | 35 #include "grit/generated_resources.h" |
36 #include "ui/gfx/image/image.h" | 36 #include "ui/gfx/image/image.h" |
37 | 37 |
38 #if !defined(OS_MACOSX) | 38 #if !defined(OS_MACOSX) |
39 #include "content/public/browser/browser_thread.h" | 39 #include "content/public/browser/browser_thread.h" |
40 #endif | 40 #endif |
41 | 41 |
42 #if defined(OS_CHROMEOS) | 42 #if defined(OS_CHROMEOS) |
43 #include "chrome/browser/chromeos/extensions/file_manager_util.h" | 43 #include "chrome/browser/extensions/file_manager_util.h" |
44 #endif | 44 #endif |
45 | 45 |
46 using content::BrowserThread; | 46 using content::BrowserThread; |
47 | 47 |
48 namespace { | 48 namespace { |
49 | 49 |
50 // Maximum number of downloads to show. TODO(glen): Remove this and instead | 50 // Maximum number of downloads to show. TODO(glen): Remove this and instead |
51 // stuff the downloads down the pipe slowly. | 51 // stuff the downloads down the pipe slowly. |
52 static const int kMaxDownloads = 150; | 52 static const int kMaxDownloads = 150; |
53 | 53 |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 return NULL; | 400 return NULL; |
401 } | 401 } |
402 | 402 |
403 DownloadItem* DownloadsDOMHandler::GetDownloadByValue(const ListValue* args) { | 403 DownloadItem* DownloadsDOMHandler::GetDownloadByValue(const ListValue* args) { |
404 int id; | 404 int id; |
405 if (ExtractIntegerValue(args, &id)) { | 405 if (ExtractIntegerValue(args, &id)) { |
406 return GetDownloadById(id); | 406 return GetDownloadById(id); |
407 } | 407 } |
408 return NULL; | 408 return NULL; |
409 } | 409 } |
OLD | NEW |