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/plugin_download_helper.h" | 5 #include "chrome/browser/plugin_download_helper.h" |
6 | 6 |
7 #if defined(OS_WIN) && !defined(USE_AURA) | 7 #if defined(OS_WIN) && !defined(USE_AURA) |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "content/browser/browser_thread.h" | 11 #include "content/browser/browser_thread.h" |
| 12 #include "content/common/net/url_fetcher.h" |
12 #include "net/base/io_buffer.h" | 13 #include "net/base/io_buffer.h" |
13 | 14 |
14 PluginDownloadUrlHelper::PluginDownloadUrlHelper( | 15 PluginDownloadUrlHelper::PluginDownloadUrlHelper( |
15 const std::string& download_url, | 16 const std::string& download_url, |
16 gfx::NativeWindow caller_window, | 17 gfx::NativeWindow caller_window, |
17 PluginDownloadUrlHelper::DownloadDelegate* delegate) | 18 PluginDownloadUrlHelper::DownloadDelegate* delegate) |
18 : download_file_fetcher_(NULL), | 19 : download_file_fetcher_(NULL), |
19 download_file_caller_window_(caller_window), | 20 download_file_caller_window_(caller_window), |
20 download_url_(download_url), | 21 download_url_(download_url), |
21 delegate_(delegate) { | 22 delegate_(delegate) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 if (::IsWindow(download_file_caller_window_)) { | 75 if (::IsWindow(download_file_caller_window_)) { |
75 ::SendMessage(download_file_caller_window_, WM_COPYDATA, NULL, | 76 ::SendMessage(download_file_caller_window_, WM_COPYDATA, NULL, |
76 reinterpret_cast<LPARAM>(&download_file_data)); | 77 reinterpret_cast<LPARAM>(&download_file_data)); |
77 } | 78 } |
78 } | 79 } |
79 // Don't access any members after this. | 80 // Don't access any members after this. |
80 delete this; | 81 delete this; |
81 } | 82 } |
82 | 83 |
83 #endif // defined(OS_WIN) && !defined(USE_AURA) | 84 #endif // defined(OS_WIN) && !defined(USE_AURA) |
OLD | NEW |