| 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/active_downloads_ui.h" | 5 #include "chrome/browser/ui/webui/active_downloads_ui.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" | 40 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" |
| 41 #include "chrome/browser/ui/webui/fileicon_source_chromeos.h" | 41 #include "chrome/browser/ui/webui/fileicon_source_chromeos.h" |
| 42 #include "chrome/common/chrome_paths.h" | 42 #include "chrome/common/chrome_paths.h" |
| 43 #include "chrome/common/chrome_switches.h" | 43 #include "chrome/common/chrome_switches.h" |
| 44 #include "chrome/common/url_constants.h" | 44 #include "chrome/common/url_constants.h" |
| 45 #include "content/browser/renderer_host/render_view_host.h" | 45 #include "content/browser/renderer_host/render_view_host.h" |
| 46 #include "content/browser/renderer_host/render_view_host_delegate.h" | 46 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 47 #include "content/public/browser/download_item.h" | 47 #include "content/public/browser/download_item.h" |
| 48 #include "content/public/browser/download_manager.h" | 48 #include "content/public/browser/download_manager.h" |
| 49 #include "content/public/browser/web_contents.h" | 49 #include "content/public/browser/web_contents.h" |
| 50 #include "content/public/browser/web_ui_message_handler.h" |
| 50 #include "grit/browser_resources.h" | 51 #include "grit/browser_resources.h" |
| 51 #include "grit/chromium_strings.h" | 52 #include "grit/chromium_strings.h" |
| 52 #include "grit/generated_resources.h" | 53 #include "grit/generated_resources.h" |
| 53 #include "grit/locale_settings.h" | 54 #include "grit/locale_settings.h" |
| 54 #include "net/base/escape.h" | 55 #include "net/base/escape.h" |
| 55 #include "net/url_request/url_request_file_job.h" | 56 #include "net/url_request/url_request_file_job.h" |
| 56 #include "ui/base/resource/resource_bundle.h" | 57 #include "ui/base/resource/resource_bundle.h" |
| 57 | 58 |
| 58 using content::WebContents; | 59 using content::WebContents; |
| 60 using content::WebUIMessageHandler; |
| 59 | 61 |
| 60 namespace { | 62 namespace { |
| 61 | 63 |
| 62 static const int kPopupLeft = 0; | 64 static const int kPopupLeft = 0; |
| 63 static const int kPopupTop = 0; | 65 static const int kPopupTop = 0; |
| 64 static const int kPopupWidth = 250; | 66 static const int kPopupWidth = 250; |
| 65 // Minimum height of window must be 100, so kPopupHeight has space for | 67 // Minimum height of window must be 100, so kPopupHeight has space for |
| 66 // 2 download rows of 36 px and 'Show all files' link which is 29px. | 68 // 2 download rows of 36 px and 'Show all files' link which is 29px. |
| 67 static const int kPopupHeight = 36 * 2 + 29; | 69 static const int kPopupHeight = 36 * 2 + 29; |
| 68 | 70 |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 return (*it); | 426 return (*it); |
| 425 } | 427 } |
| 426 } | 428 } |
| 427 } | 429 } |
| 428 return NULL; | 430 return NULL; |
| 429 } | 431 } |
| 430 | 432 |
| 431 const ActiveDownloadsUI::DownloadList& ActiveDownloadsUI::GetDownloads() const { | 433 const ActiveDownloadsUI::DownloadList& ActiveDownloadsUI::GetDownloads() const { |
| 432 return handler_->downloads(); | 434 return handler_->downloads(); |
| 433 } | 435 } |
| OLD | NEW |