| 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" |
| 11 | 11 |
| 12 #if defined(OS_WIN) | 12 #if defined(OS_WIN) |
| 13 #include "base/file_path.h" | 13 #include "base/file_path.h" |
| 14 #include "gfx/native_widget_types.h" | |
| 15 #include "net/base/file_stream.h" | 14 #include "net/base/file_stream.h" |
| 16 #include "net/url_request/url_request.h" | 15 #include "net/url_request/url_request.h" |
| 16 #include "ui/gfx/native_widget_types.h" |
| 17 | 17 |
| 18 // The PluginDownloadUrlHelper is used to handle one download URL request | 18 // The PluginDownloadUrlHelper is used to handle one download URL request |
| 19 // from the plugin. Each download request is handled by a new instance | 19 // from the plugin. Each download request is handled by a new instance |
| 20 // of this class. | 20 // of this class. |
| 21 class PluginDownloadUrlHelper : public net::URLRequest::Delegate { | 21 class PluginDownloadUrlHelper : public net::URLRequest::Delegate { |
| 22 static const int kDownloadFileBufferSize = 32768; | 22 static const int kDownloadFileBufferSize = 32768; |
| 23 public: | 23 public: |
| 24 // The delegate receives notification about the status of downloads | 24 // The delegate receives notification about the status of downloads |
| 25 // initiated. | 25 // initiated. |
| 26 class DownloadDelegate { | 26 class DownloadDelegate { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 PluginDownloadUrlHelper::DownloadDelegate* delegate_; | 71 PluginDownloadUrlHelper::DownloadDelegate* delegate_; |
| 72 | 72 |
| 73 DISALLOW_COPY_AND_ASSIGN(PluginDownloadUrlHelper); | 73 DISALLOW_COPY_AND_ASSIGN(PluginDownloadUrlHelper); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 #endif // OS_WIN | 76 #endif // OS_WIN |
| 77 | 77 |
| 78 #endif // CHROME_BROWSER_PLUGIN_DOWNLOAD_HELPER_H_ | 78 #endif // CHROME_BROWSER_PLUGIN_DOWNLOAD_HELPER_H_ |
| 79 | 79 |
| 80 | 80 |
| OLD | NEW |