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 27 matching lines...) Expand all Loading... |
38 #include "chrome/browser/ui/webui/fileicon_source.h" | 38 #include "chrome/browser/ui/webui/fileicon_source.h" |
39 #include "chrome/common/pref_names.h" | 39 #include "chrome/common/pref_names.h" |
40 #include "chrome/common/url_constants.h" | 40 #include "chrome/common/url_constants.h" |
41 #include "content/public/browser/browser_thread.h" | 41 #include "content/public/browser/browser_thread.h" |
42 #include "content/public/browser/download_item.h" | 42 #include "content/public/browser/download_item.h" |
43 #include "content/public/browser/url_data_source.h" | 43 #include "content/public/browser/url_data_source.h" |
44 #include "content/public/browser/user_metrics.h" | 44 #include "content/public/browser/user_metrics.h" |
45 #include "content/public/browser/web_contents.h" | 45 #include "content/public/browser/web_contents.h" |
46 #include "content/public/browser/web_ui.h" | 46 #include "content/public/browser/web_ui.h" |
47 #include "extensions/browser/extension_system.h" | 47 #include "extensions/browser/extension_system.h" |
48 #include "grit/generated_resources.h" | |
49 #include "net/base/filename_util.h" | 48 #include "net/base/filename_util.h" |
50 #include "ui/base/l10n/time_format.h" | 49 #include "ui/base/l10n/time_format.h" |
51 #include "ui/gfx/image/image.h" | 50 #include "ui/gfx/image/image.h" |
52 | 51 |
53 using base::UserMetricsAction; | 52 using base::UserMetricsAction; |
54 using content::BrowserContext; | 53 using content::BrowserContext; |
55 using content::BrowserThread; | 54 using content::BrowserThread; |
56 | 55 |
57 namespace { | 56 namespace { |
58 | 57 |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 } | 579 } |
581 | 580 |
582 void DownloadsDOMHandler::CallDownloadsList(const base::ListValue& downloads) { | 581 void DownloadsDOMHandler::CallDownloadsList(const base::ListValue& downloads) { |
583 web_ui()->CallJavascriptFunction("downloadsList", downloads); | 582 web_ui()->CallJavascriptFunction("downloadsList", downloads); |
584 } | 583 } |
585 | 584 |
586 void DownloadsDOMHandler::CallDownloadUpdated( | 585 void DownloadsDOMHandler::CallDownloadUpdated( |
587 const base::ListValue& download_item) { | 586 const base::ListValue& download_item) { |
588 web_ui()->CallJavascriptFunction("downloadUpdated", download_item); | 587 web_ui()->CallJavascriptFunction("downloadUpdated", download_item); |
589 } | 588 } |
OLD | NEW |