OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/plugins/npapi/webplugin_impl.h" | 5 #include "content/renderer/webplugin_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/debug/crash_logging.h" | 8 #include "base/debug/crash_logging.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "cc/layers/io_surface_layer.h" | 15 #include "cc/layers/io_surface_layer.h" |
| 16 #include "content/child/npapi/plugin_host.h" |
| 17 #include "content/child/npapi/plugin_instance.h" |
| 18 #include "content/child/npapi/webplugin_delegate.h" |
| 19 #include "content/renderer/webplugin_page_delegate.h" |
16 #include "net/base/escape.h" | 20 #include "net/base/escape.h" |
17 #include "net/base/net_errors.h" | 21 #include "net/base/net_errors.h" |
18 #include "net/http/http_response_headers.h" | 22 #include "net/http/http_response_headers.h" |
19 #include "skia/ext/platform_canvas.h" | 23 #include "skia/ext/platform_canvas.h" |
20 #include "third_party/WebKit/public/platform/WebCString.h" | 24 #include "third_party/WebKit/public/platform/WebCString.h" |
21 #include "third_party/WebKit/public/platform/WebCookieJar.h" | 25 #include "third_party/WebKit/public/platform/WebCookieJar.h" |
22 #include "third_party/WebKit/public/platform/WebData.h" | 26 #include "third_party/WebKit/public/platform/WebData.h" |
23 #include "third_party/WebKit/public/platform/WebHTTPBody.h" | 27 #include "third_party/WebKit/public/platform/WebHTTPBody.h" |
24 #include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h" | 28 #include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h" |
25 #include "third_party/WebKit/public/platform/WebURL.h" | 29 #include "third_party/WebKit/public/platform/WebURL.h" |
26 #include "third_party/WebKit/public/platform/WebURLError.h" | 30 #include "third_party/WebKit/public/platform/WebURLError.h" |
27 #include "third_party/WebKit/public/platform/WebURLLoader.h" | 31 #include "third_party/WebKit/public/platform/WebURLLoader.h" |
28 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" | 32 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" |
29 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 33 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
30 #include "third_party/WebKit/public/web/WebConsoleMessage.h" | 34 #include "third_party/WebKit/public/web/WebConsoleMessage.h" |
31 #include "third_party/WebKit/public/web/WebCursorInfo.h" | 35 #include "third_party/WebKit/public/web/WebCursorInfo.h" |
32 #include "third_party/WebKit/public/web/WebDocument.h" | 36 #include "third_party/WebKit/public/web/WebDocument.h" |
33 #include "third_party/WebKit/public/web/WebFrame.h" | 37 #include "third_party/WebKit/public/web/WebFrame.h" |
34 #include "third_party/WebKit/public/web/WebInputEvent.h" | 38 #include "third_party/WebKit/public/web/WebInputEvent.h" |
35 #include "third_party/WebKit/public/web/WebKit.h" | 39 #include "third_party/WebKit/public/web/WebKit.h" |
36 #include "third_party/WebKit/public/web/WebPluginContainer.h" | 40 #include "third_party/WebKit/public/web/WebPluginContainer.h" |
37 #include "third_party/WebKit/public/web/WebPluginParams.h" | 41 #include "third_party/WebKit/public/web/WebPluginParams.h" |
38 #include "third_party/WebKit/public/web/WebURLLoaderOptions.h" | 42 #include "third_party/WebKit/public/web/WebURLLoaderOptions.h" |
39 #include "third_party/WebKit/public/web/WebView.h" | 43 #include "third_party/WebKit/public/web/WebView.h" |
40 #include "ui/gfx/rect.h" | 44 #include "ui/gfx/rect.h" |
41 #include "url/gurl.h" | 45 #include "url/gurl.h" |
42 #include "url/url_util.h" | 46 #include "url/url_util.h" |
43 #include "webkit/glue/multipart_response_delegate.h" | 47 #include "webkit/glue/multipart_response_delegate.h" |
44 #include "webkit/plugins/npapi/plugin_host.h" | |
45 #include "webkit/plugins/npapi/plugin_instance.h" | |
46 #include "webkit/plugins/npapi/webplugin_delegate.h" | |
47 #include "webkit/plugins/npapi/webplugin_page_delegate.h" | |
48 #include "webkit/plugins/plugin_constants.h" | 48 #include "webkit/plugins/plugin_constants.h" |
49 #include "webkit/renderer/appcache/web_application_cache_host_impl.h" | 49 #include "webkit/renderer/appcache/web_application_cache_host_impl.h" |
50 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" | 50 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" |
51 | 51 |
52 using appcache::WebApplicationCacheHostImpl; | 52 using appcache::WebApplicationCacheHostImpl; |
53 using WebKit::WebCanvas; | 53 using WebKit::WebCanvas; |
54 using WebKit::WebConsoleMessage; | 54 using WebKit::WebConsoleMessage; |
55 using WebKit::WebCookieJar; | 55 using WebKit::WebCookieJar; |
56 using WebKit::WebCString; | 56 using WebKit::WebCString; |
57 using WebKit::WebCursorInfo; | 57 using WebKit::WebCursorInfo; |
(...skipping 13 matching lines...) Expand all Loading... |
71 using WebKit::WebURLError; | 71 using WebKit::WebURLError; |
72 using WebKit::WebURLLoader; | 72 using WebKit::WebURLLoader; |
73 using WebKit::WebURLLoaderClient; | 73 using WebKit::WebURLLoaderClient; |
74 using WebKit::WebURLLoaderOptions; | 74 using WebKit::WebURLLoaderOptions; |
75 using WebKit::WebURLRequest; | 75 using WebKit::WebURLRequest; |
76 using WebKit::WebURLResponse; | 76 using WebKit::WebURLResponse; |
77 using WebKit::WebVector; | 77 using WebKit::WebVector; |
78 using WebKit::WebView; | 78 using WebKit::WebView; |
79 using webkit_glue::MultipartResponseDelegate; | 79 using webkit_glue::MultipartResponseDelegate; |
80 | 80 |
81 namespace webkit { | 81 namespace content { |
82 namespace npapi { | |
83 | 82 |
84 namespace { | 83 namespace { |
85 | 84 |
86 // This class handles individual multipart responses. It is instantiated when | 85 // This class handles individual multipart responses. It is instantiated when |
87 // we receive HTTP status code 206 in the HTTP response. This indicates | 86 // we receive HTTP status code 206 in the HTTP response. This indicates |
88 // that the response could have multiple parts each separated by a boundary | 87 // that the response could have multiple parts each separated by a boundary |
89 // specified in the response header. | 88 // specified in the response header. |
90 class MultiPartResponseClient : public WebURLLoaderClient { | 89 class MultiPartResponseClient : public WebURLLoaderClient { |
91 public: | 90 public: |
92 explicit MultiPartResponseClient(WebPluginResourceClient* resource_client) | 91 explicit MultiPartResponseClient(WebPluginResourceClient* resource_client) |
(...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1437 | 1436 |
1438 case PLUGIN_SRC: | 1437 case PLUGIN_SRC: |
1439 webframe_->setReferrerForRequest(*request, plugin_url_); | 1438 webframe_->setReferrerForRequest(*request, plugin_url_); |
1440 break; | 1439 break; |
1441 | 1440 |
1442 default: | 1441 default: |
1443 break; | 1442 break; |
1444 } | 1443 } |
1445 } | 1444 } |
1446 | 1445 |
1447 } // namespace npapi | 1446 } // namespace content |
1448 } // namespace webkit | |
OLD | NEW |