| 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 15 matching lines...) Expand all Loading... |
| 26 #include "chrome/browser/download/download_danger_prompt.h" | 26 #include "chrome/browser/download/download_danger_prompt.h" |
| 27 #include "chrome/browser/download/download_history.h" | 27 #include "chrome/browser/download/download_history.h" |
| 28 #include "chrome/browser/download/download_item_model.h" | 28 #include "chrome/browser/download/download_item_model.h" |
| 29 #include "chrome/browser/download/download_prefs.h" | 29 #include "chrome/browser/download/download_prefs.h" |
| 30 #include "chrome/browser/download/download_query.h" | 30 #include "chrome/browser/download/download_query.h" |
| 31 #include "chrome/browser/download/download_service.h" | 31 #include "chrome/browser/download/download_service.h" |
| 32 #include "chrome/browser/download/download_service_factory.h" | 32 #include "chrome/browser/download/download_service_factory.h" |
| 33 #include "chrome/browser/download/drag_download_item.h" | 33 #include "chrome/browser/download/drag_download_item.h" |
| 34 #include "chrome/browser/extensions/api/downloads/downloads_api.h" | 34 #include "chrome/browser/extensions/api/downloads/downloads_api.h" |
| 35 #include "chrome/browser/extensions/extension_service.h" | 35 #include "chrome/browser/extensions/extension_service.h" |
| 36 #include "chrome/browser/extensions/extension_system.h" | |
| 37 #include "chrome/browser/platform_util.h" | 36 #include "chrome/browser/platform_util.h" |
| 38 #include "chrome/browser/profiles/profile.h" | 37 #include "chrome/browser/profiles/profile.h" |
| 39 #include "chrome/browser/ui/webui/fileicon_source.h" | 38 #include "chrome/browser/ui/webui/fileicon_source.h" |
| 40 #include "chrome/common/pref_names.h" | 39 #include "chrome/common/pref_names.h" |
| 41 #include "chrome/common/url_constants.h" | 40 #include "chrome/common/url_constants.h" |
| 42 #include "content/public/browser/browser_thread.h" | 41 #include "content/public/browser/browser_thread.h" |
| 43 #include "content/public/browser/download_item.h" | 42 #include "content/public/browser/download_item.h" |
| 44 #include "content/public/browser/url_data_source.h" | 43 #include "content/public/browser/url_data_source.h" |
| 45 #include "content/public/browser/user_metrics.h" | 44 #include "content/public/browser/user_metrics.h" |
| 46 #include "content/public/browser/web_contents.h" | 45 #include "content/public/browser/web_contents.h" |
| 47 #include "content/public/browser/web_contents_view.h" | 46 #include "content/public/browser/web_contents_view.h" |
| 48 #include "content/public/browser/web_ui.h" | 47 #include "content/public/browser/web_ui.h" |
| 48 #include "extensions/browser/extension_system.h" |
| 49 #include "grit/generated_resources.h" | 49 #include "grit/generated_resources.h" |
| 50 #include "net/base/net_util.h" | 50 #include "net/base/net_util.h" |
| 51 #include "ui/base/l10n/time_format.h" | 51 #include "ui/base/l10n/time_format.h" |
| 52 #include "ui/gfx/image/image.h" | 52 #include "ui/gfx/image/image.h" |
| 53 | 53 |
| 54 using base::UserMetricsAction; | 54 using base::UserMetricsAction; |
| 55 using content::BrowserContext; | 55 using content::BrowserContext; |
| 56 using content::BrowserThread; | 56 using content::BrowserThread; |
| 57 | 57 |
| 58 namespace { | 58 namespace { |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 } | 575 } |
| 576 | 576 |
| 577 void DownloadsDOMHandler::CallDownloadsList(const base::ListValue& downloads) { | 577 void DownloadsDOMHandler::CallDownloadsList(const base::ListValue& downloads) { |
| 578 web_ui()->CallJavascriptFunction("downloadsList", downloads); | 578 web_ui()->CallJavascriptFunction("downloadsList", downloads); |
| 579 } | 579 } |
| 580 | 580 |
| 581 void DownloadsDOMHandler::CallDownloadUpdated( | 581 void DownloadsDOMHandler::CallDownloadUpdated( |
| 582 const base::ListValue& download_item) { | 582 const base::ListValue& download_item) { |
| 583 web_ui()->CallJavascriptFunction("downloadUpdated", download_item); | 583 web_ui()->CallJavascriptFunction("downloadUpdated", download_item); |
| 584 } | 584 } |
| OLD | NEW |