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 #ifndef CHROME_BROWSER_PLUGIN_DOWNLOAD_HELPER_H_ | 5 #ifndef CHROME_BROWSER_PLUGIN_DOWNLOAD_HELPER_H_ |
6 #define CHROME_BROWSER_PLUGIN_DOWNLOAD_HELPER_H_ | 6 #define CHROME_BROWSER_PLUGIN_DOWNLOAD_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 // initiated. | 25 // initiated. |
26 class DownloadDelegate { | 26 class DownloadDelegate { |
27 public: | 27 public: |
28 virtual ~DownloadDelegate() {} | 28 virtual ~DownloadDelegate() {} |
29 | 29 |
30 virtual void OnDownloadCompleted(const FilePath& download_path, | 30 virtual void OnDownloadCompleted(const FilePath& download_path, |
31 bool success) {} | 31 bool success) {} |
32 }; | 32 }; |
33 | 33 |
34 PluginDownloadUrlHelper(const std::string& download_url, | 34 PluginDownloadUrlHelper(const std::string& download_url, |
35 int source_pid, gfx::NativeWindow caller_window, | 35 gfx::NativeWindow caller_window, |
36 PluginDownloadUrlHelper::DownloadDelegate* delegate); | 36 PluginDownloadUrlHelper::DownloadDelegate* delegate); |
37 ~PluginDownloadUrlHelper(); | 37 ~PluginDownloadUrlHelper(); |
38 | 38 |
39 void InitiateDownload(net::URLRequestContext* request_context); | 39 void InitiateDownload(net::URLRequestContext* request_context); |
40 | 40 |
41 // net::URLRequest::Delegate | 41 // net::URLRequest::Delegate |
42 virtual void OnAuthRequired(net::URLRequest* request, | 42 virtual void OnAuthRequired(net::URLRequest* request, |
43 net::AuthChallengeInfo* auth_info); | 43 net::AuthChallengeInfo* auth_info); |
44 virtual void OnSSLCertificateError(net::URLRequest* request, | 44 virtual void OnSSLCertificateError(net::URLRequest* request, |
45 int cert_error, | 45 int cert_error, |
(...skipping 13 matching lines...) Expand all Loading... |
59 // The full path of the downloaded file. | 59 // The full path of the downloaded file. |
60 FilePath download_file_path_; | 60 FilePath download_file_path_; |
61 // The buffer passed off to net::URLRequest::Read. | 61 // The buffer passed off to net::URLRequest::Read. |
62 scoped_refptr<net::IOBuffer> download_file_buffer_; | 62 scoped_refptr<net::IOBuffer> download_file_buffer_; |
63 // TODO(port): this comment doesn't describe the situation on Posix. | 63 // TODO(port): this comment doesn't describe the situation on Posix. |
64 // The window handle for sending the WM_COPYDATA notification, | 64 // The window handle for sending the WM_COPYDATA notification, |
65 // indicating that the download completed. | 65 // indicating that the download completed. |
66 gfx::NativeWindow download_file_caller_window_; | 66 gfx::NativeWindow download_file_caller_window_; |
67 | 67 |
68 std::string download_url_; | 68 std::string download_url_; |
69 int download_source_child_unique_id_; | |
70 | 69 |
71 PluginDownloadUrlHelper::DownloadDelegate* delegate_; | 70 PluginDownloadUrlHelper::DownloadDelegate* delegate_; |
72 | 71 |
73 DISALLOW_COPY_AND_ASSIGN(PluginDownloadUrlHelper); | 72 DISALLOW_COPY_AND_ASSIGN(PluginDownloadUrlHelper); |
74 }; | 73 }; |
75 | 74 |
76 #endif // OS_WIN | 75 #endif // OS_WIN |
77 | 76 |
78 #endif // CHROME_BROWSER_PLUGIN_DOWNLOAD_HELPER_H_ | 77 #endif // CHROME_BROWSER_PLUGIN_DOWNLOAD_HELPER_H_ |
79 | 78 |
80 | 79 |
OLD | NEW |