| 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 17 matching lines...) Expand all Loading... |
| 28 #include "chrome/browser/download/download_query.h" | 28 #include "chrome/browser/download/download_query.h" |
| 29 #include "chrome/browser/download/download_service.h" | 29 #include "chrome/browser/download/download_service.h" |
| 30 #include "chrome/browser/download/download_service_factory.h" | 30 #include "chrome/browser/download/download_service_factory.h" |
| 31 #include "chrome/browser/download/download_util.h" | 31 #include "chrome/browser/download/download_util.h" |
| 32 #include "chrome/browser/platform_util.h" | 32 #include "chrome/browser/platform_util.h" |
| 33 #include "chrome/browser/profiles/profile.h" | 33 #include "chrome/browser/profiles/profile.h" |
| 34 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 34 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
| 35 #include "chrome/browser/ui/webui/fileicon_source.h" | 35 #include "chrome/browser/ui/webui/fileicon_source.h" |
| 36 #include "chrome/common/time_format.h" | 36 #include "chrome/common/time_format.h" |
| 37 #include "chrome/common/url_constants.h" | 37 #include "chrome/common/url_constants.h" |
| 38 #include "content/public/browser/browser_thread.h" |
| 38 #include "content/public/browser/download_item.h" | 39 #include "content/public/browser/download_item.h" |
| 39 #include "content/public/browser/user_metrics.h" | 40 #include "content/public/browser/user_metrics.h" |
| 40 #include "content/public/browser/web_contents.h" | 41 #include "content/public/browser/web_contents.h" |
| 41 #include "content/public/browser/web_ui.h" | 42 #include "content/public/browser/web_ui.h" |
| 42 #include "grit/generated_resources.h" | 43 #include "grit/generated_resources.h" |
| 43 #include "net/base/net_util.h" | 44 #include "net/base/net_util.h" |
| 44 #include "ui/gfx/image/image.h" | 45 #include "ui/gfx/image/image.h" |
| 45 | 46 |
| 46 #if !defined(OS_MACOSX) | 47 #if !defined(OS_MACOSX) |
| 47 #include "content/public/browser/browser_thread.h" | 48 #include "content/public/browser/browser_thread.h" |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 } | 506 } |
| 506 | 507 |
| 507 void DownloadsDOMHandler::CallDownloadsList(const base::ListValue& downloads) { | 508 void DownloadsDOMHandler::CallDownloadsList(const base::ListValue& downloads) { |
| 508 web_ui()->CallJavascriptFunction("downloadsList", downloads); | 509 web_ui()->CallJavascriptFunction("downloadsList", downloads); |
| 509 } | 510 } |
| 510 | 511 |
| 511 void DownloadsDOMHandler::CallDownloadUpdated( | 512 void DownloadsDOMHandler::CallDownloadUpdated( |
| 512 const base::ListValue& download_item) { | 513 const base::ListValue& download_item) { |
| 513 web_ui()->CallJavascriptFunction("downloadUpdated", download_item); | 514 web_ui()->CallJavascriptFunction("downloadUpdated", download_item); |
| 514 } | 515 } |
| OLD | NEW |