OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H__ | 5 #ifndef CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H_ |
6 #define CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H__ | 6 #define CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H_ |
7 | 7 |
8 #include "base/basictypes.h" | |
9 #include "net/url_request/url_request.h" | |
10 #include "net/url_request/url_request_job.h" | 8 #include "net/url_request/url_request_job.h" |
11 #include "chrome/browser/chrome_plugin_host.h" | 9 #include "chrome/browser/chrome_plugin_host.h" |
12 #include "chrome/common/chrome_plugin_api.h" | 10 #include "chrome/common/chrome_plugin_api.h" |
13 #include "chrome/common/chrome_plugin_util.h" | 11 #include "chrome/common/chrome_plugin_util.h" |
14 #include "chrome/common/notification_observer.h" | 12 #include "chrome/common/notification_observer.h" |
15 | 13 |
16 class ChromePluginLib; | 14 class ChromePluginLib; |
| 15 class URLRequest; |
17 | 16 |
18 // A request job that handles network requests intercepted by a Chrome plugin. | 17 // A request job that handles network requests intercepted by a Chrome plugin. |
19 class URLRequestInterceptJob | 18 class URLRequestInterceptJob |
20 : public URLRequestJob, public NotificationObserver { | 19 : public URLRequestJob, public NotificationObserver { |
21 public: | 20 public: |
22 static URLRequestInterceptJob* FromCPRequest(CPRequest* request) { | 21 static URLRequestInterceptJob* FromCPRequest(CPRequest* request) { |
23 return ScopableCPRequest::GetData<URLRequestInterceptJob*>(request); | 22 return ScopableCPRequest::GetData<URLRequestInterceptJob*>(request); |
24 } | 23 } |
25 | 24 |
26 URLRequestInterceptJob(URLRequest* request, ChromePluginLib* plugin, | 25 URLRequestInterceptJob(URLRequest* request, ChromePluginLib* plugin, |
(...skipping 22 matching lines...) Expand all Loading... |
49 private: | 48 private: |
50 void StartAsync(); | 49 void StartAsync(); |
51 void DetachPlugin(); | 50 void DetachPlugin(); |
52 | 51 |
53 scoped_ptr<ScopableCPRequest> cprequest_; | 52 scoped_ptr<ScopableCPRequest> cprequest_; |
54 ChromePluginLib* plugin_; | 53 ChromePluginLib* plugin_; |
55 bool got_headers_; | 54 bool got_headers_; |
56 net::IOBuffer* read_buffer_; | 55 net::IOBuffer* read_buffer_; |
57 int read_buffer_size_; | 56 int read_buffer_size_; |
58 | 57 |
59 DISALLOW_EVIL_CONSTRUCTORS(URLRequestInterceptJob); | 58 DISALLOW_COPY_AND_ASSIGN(URLRequestInterceptJob); |
60 }; | 59 }; |
61 | 60 |
62 | 61 #endif // CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H_ |
63 #endif // CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H__ | |
64 | |
OLD | NEW |