| 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 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 PluginDownloadUrlHelper(const std::string& download_url, | 39 PluginDownloadUrlHelper(const std::string& download_url, |
| 40 gfx::NativeWindow caller_window, | 40 gfx::NativeWindow caller_window, |
| 41 PluginDownloadUrlHelper::DownloadDelegate* delegate); | 41 PluginDownloadUrlHelper::DownloadDelegate* delegate); |
| 42 ~PluginDownloadUrlHelper(); | 42 ~PluginDownloadUrlHelper(); |
| 43 | 43 |
| 44 void InitiateDownload(net::URLRequestContextGetter* request_context, | 44 void InitiateDownload(net::URLRequestContextGetter* request_context, |
| 45 base::MessageLoopProxy* file_thread_proxy); | 45 base::MessageLoopProxy* file_thread_proxy); |
| 46 | 46 |
| 47 // content::URLFetcherDelegate | 47 // content::URLFetcherDelegate |
| 48 virtual void OnURLFetchComplete(const URLFetcher* source); | 48 virtual void OnURLFetchComplete(const content::URLFetcher* source); |
| 49 | 49 |
| 50 void OnDownloadCompleted(net::URLRequest* request); | 50 void OnDownloadCompleted(net::URLRequest* request); |
| 51 | 51 |
| 52 protected: | 52 protected: |
| 53 // The download file request initiated by the plugin. | 53 // The download file request initiated by the plugin. |
| 54 scoped_ptr<URLFetcher> download_file_fetcher_; | 54 scoped_ptr<content::URLFetcher> download_file_fetcher_; |
| 55 // TODO(port): this comment doesn't describe the situation on Posix. | 55 // TODO(port): this comment doesn't describe the situation on Posix. |
| 56 // The window handle for sending the WM_COPYDATA notification, | 56 // The window handle for sending the WM_COPYDATA notification, |
| 57 // indicating that the download completed. | 57 // indicating that the download completed. |
| 58 gfx::NativeWindow download_file_caller_window_; | 58 gfx::NativeWindow download_file_caller_window_; |
| 59 | 59 |
| 60 std::string download_url_; | 60 std::string download_url_; |
| 61 | 61 |
| 62 PluginDownloadUrlHelper::DownloadDelegate* delegate_; | 62 PluginDownloadUrlHelper::DownloadDelegate* delegate_; |
| 63 | 63 |
| 64 DISALLOW_COPY_AND_ASSIGN(PluginDownloadUrlHelper); | 64 DISALLOW_COPY_AND_ASSIGN(PluginDownloadUrlHelper); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 #endif // OS_WIN | 67 #endif // OS_WIN |
| 68 | 68 |
| 69 #endif // CHROME_BROWSER_PLUGIN_DOWNLOAD_HELPER_H_ | 69 #endif // CHROME_BROWSER_PLUGIN_DOWNLOAD_HELPER_H_ |
| OLD | NEW |