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 #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 28 matching lines...) Expand all Loading... |
39 #include "content/public/browser/url_data_source.h" | 39 #include "content/public/browser/url_data_source.h" |
40 #include "content/public/browser/user_metrics.h" | 40 #include "content/public/browser/user_metrics.h" |
41 #include "content/public/browser/web_contents.h" | 41 #include "content/public/browser/web_contents.h" |
42 #include "content/public/browser/web_contents_view.h" | 42 #include "content/public/browser/web_contents_view.h" |
43 #include "content/public/browser/web_ui.h" | 43 #include "content/public/browser/web_ui.h" |
44 #include "grit/generated_resources.h" | 44 #include "grit/generated_resources.h" |
45 #include "net/base/net_util.h" | 45 #include "net/base/net_util.h" |
46 #include "ui/gfx/image/image.h" | 46 #include "ui/gfx/image/image.h" |
47 | 47 |
48 #if defined(OS_CHROMEOS) | 48 #if defined(OS_CHROMEOS) |
49 #include "chrome/browser/chromeos/extensions/file_manager_util.h" | 49 #include "chrome/browser/chromeos/extensions/file_manager/file_manager_util.h" |
50 #endif | 50 #endif |
51 | 51 |
52 using content::BrowserContext; | 52 using content::BrowserContext; |
53 using content::BrowserThread; | 53 using content::BrowserThread; |
54 using content::UserMetricsAction; | 54 using content::UserMetricsAction; |
55 | 55 |
56 namespace { | 56 namespace { |
57 | 57 |
58 // Maximum number of downloads to show. TODO(glen): Remove this and instead | 58 // Maximum number of downloads to show. TODO(glen): Remove this and instead |
59 // stuff the downloads down the pipe slowly. | 59 // stuff the downloads down the pipe slowly. |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 } | 525 } |
526 | 526 |
527 void DownloadsDOMHandler::CallDownloadsList(const base::ListValue& downloads) { | 527 void DownloadsDOMHandler::CallDownloadsList(const base::ListValue& downloads) { |
528 web_ui()->CallJavascriptFunction("downloadsList", downloads); | 528 web_ui()->CallJavascriptFunction("downloadsList", downloads); |
529 } | 529 } |
530 | 530 |
531 void DownloadsDOMHandler::CallDownloadUpdated( | 531 void DownloadsDOMHandler::CallDownloadUpdated( |
532 const base::ListValue& download_item) { | 532 const base::ListValue& download_item) { |
533 web_ui()->CallJavascriptFunction("downloadUpdated", download_item); | 533 web_ui()->CallJavascriptFunction("downloadUpdated", download_item); |
534 } | 534 } |
OLD | NEW |