Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: webkit/plugins/npapi/webplugin_impl.cc

Issue 6012002: Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi and put... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/npapi/webplugin_impl.h ('k') | webkit/plugins/npapi/webplugin_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/glue/plugins/webplugin_impl.h" 5 #include "webkit/plugins/npapi/webplugin_impl.h"
6 6
7 #include "base/linked_ptr.h" 7 #include "base/linked_ptr.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "base/stringprintf.h" 11 #include "base/stringprintf.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "gfx/rect.h" 13 #include "gfx/rect.h"
14 #include "googleurl/src/gurl.h" 14 #include "googleurl/src/gurl.h"
15 #include "net/base/escape.h" 15 #include "net/base/escape.h"
(...skipping 16 matching lines...) Expand all
32 #include "third_party/WebKit/WebKit/chromium/public/WebPluginContainer.h" 32 #include "third_party/WebKit/WebKit/chromium/public/WebPluginContainer.h"
33 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" 33 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h"
34 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" 34 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
35 #include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" 35 #include "third_party/WebKit/WebKit/chromium/public/WebURLError.h"
36 #include "third_party/WebKit/WebKit/chromium/public/WebURLLoader.h" 36 #include "third_party/WebKit/WebKit/chromium/public/WebURLLoader.h"
37 #include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h" 37 #include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h"
38 #include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" 38 #include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h"
39 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" 39 #include "third_party/WebKit/WebKit/chromium/public/WebView.h"
40 #include "webkit/appcache/web_application_cache_host_impl.h" 40 #include "webkit/appcache/web_application_cache_host_impl.h"
41 #include "webkit/glue/multipart_response_delegate.h" 41 #include "webkit/glue/multipart_response_delegate.h"
42 #include "webkit/glue/plugins/plugin_host.h" 42 #include "webkit/plugins/npapi/plugin_host.h"
43 #include "webkit/glue/plugins/plugin_instance.h" 43 #include "webkit/plugins/npapi/plugin_instance.h"
44 #include "webkit/glue/plugins/webplugin_delegate.h" 44 #include "webkit/plugins/npapi/webplugin_delegate.h"
45 #include "webkit/glue/plugins/webplugin_page_delegate.h" 45 #include "webkit/plugins/npapi/webplugin_page_delegate.h"
46 46
47 using appcache::WebApplicationCacheHostImpl; 47 using appcache::WebApplicationCacheHostImpl;
48 using WebKit::WebCanvas; 48 using WebKit::WebCanvas;
49 using WebKit::WebConsoleMessage; 49 using WebKit::WebConsoleMessage;
50 using WebKit::WebCookieJar; 50 using WebKit::WebCookieJar;
51 using WebKit::WebCString; 51 using WebKit::WebCString;
52 using WebKit::WebCursorInfo; 52 using WebKit::WebCursorInfo;
53 using WebKit::WebData; 53 using WebKit::WebData;
54 using WebKit::WebDataSource; 54 using WebKit::WebDataSource;
55 using WebKit::WebDevToolsAgent; 55 using WebKit::WebDevToolsAgent;
(...skipping 10 matching lines...) Expand all
66 using WebKit::WebURL; 66 using WebKit::WebURL;
67 using WebKit::WebURLError; 67 using WebKit::WebURLError;
68 using WebKit::WebURLLoader; 68 using WebKit::WebURLLoader;
69 using WebKit::WebURLLoaderClient; 69 using WebKit::WebURLLoaderClient;
70 using WebKit::WebURLRequest; 70 using WebKit::WebURLRequest;
71 using WebKit::WebURLResponse; 71 using WebKit::WebURLResponse;
72 using WebKit::WebVector; 72 using WebKit::WebVector;
73 using WebKit::WebView; 73 using WebKit::WebView;
74 using webkit_glue::MultipartResponseDelegate; 74 using webkit_glue::MultipartResponseDelegate;
75 75
76 namespace webkit_glue { 76 namespace webkit {
77 namespace npapi {
78
77 namespace { 79 namespace {
78 80
79 // This class handles individual multipart responses. It is instantiated when 81 // This class handles individual multipart responses. It is instantiated when
80 // we receive HTTP status code 206 in the HTTP response. This indicates 82 // we receive HTTP status code 206 in the HTTP response. This indicates
81 // that the response could have multiple parts each separated by a boundary 83 // that the response could have multiple parts each separated by a boundary
82 // specified in the response header. 84 // specified in the response header.
83 class MultiPartResponseClient : public WebURLLoaderClient { 85 class MultiPartResponseClient : public WebURLLoaderClient {
84 public: 86 public:
85 explicit MultiPartResponseClient(WebPluginResourceClient* resource_client) 87 explicit MultiPartResponseClient(WebPluginResourceClient* resource_client)
86 : resource_client_(resource_client) { 88 : resource_client_(resource_client) {
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 } 596 }
595 } 597 }
596 } 598 }
597 599
598 bool WebPluginImpl::SetPostData(WebURLRequest* request, 600 bool WebPluginImpl::SetPostData(WebURLRequest* request,
599 const char *buf, 601 const char *buf,
600 uint32 length) { 602 uint32 length) {
601 std::vector<std::string> names; 603 std::vector<std::string> names;
602 std::vector<std::string> values; 604 std::vector<std::string> values;
603 std::vector<char> body; 605 std::vector<char> body;
604 bool rv = NPAPI::PluginHost::SetPostData(buf, length, &names, &values, &body); 606 bool rv = PluginHost::SetPostData(buf, length, &names, &values, &body);
605 607
606 for (size_t i = 0; i < names.size(); ++i) { 608 for (size_t i = 0; i < names.size(); ++i) {
607 request->addHTTPHeaderField(WebString::fromUTF8(names[i]), 609 request->addHTTPHeaderField(WebString::fromUTF8(names[i]),
608 WebString::fromUTF8(values[i])); 610 WebString::fromUTF8(values[i]));
609 } 611 }
610 612
611 WebString content_type_header = WebString::fromUTF8("Content-Type"); 613 WebString content_type_header = WebString::fromUTF8("Content-Type");
612 const WebString& content_type = 614 const WebString& content_type =
613 request->httpHeaderField(content_type_header); 615 request->httpHeaderField(content_type_header);
614 if (content_type.isEmpty()) { 616 if (content_type.isEmpty()) {
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 1385
1384 WebDevToolsAgent* WebPluginImpl::GetDevToolsAgent() { 1386 WebDevToolsAgent* WebPluginImpl::GetDevToolsAgent() {
1385 if (!webframe_) 1387 if (!webframe_)
1386 return NULL; 1388 return NULL;
1387 WebView* view = webframe_->view(); 1389 WebView* view = webframe_->view();
1388 if (!view) 1390 if (!view)
1389 return NULL; 1391 return NULL;
1390 return view->devToolsAgent(); 1392 return view->devToolsAgent();
1391 } 1393 }
1392 1394
1393 } // namespace webkit_glue 1395 } // namespace npapi
1396 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/webplugin_impl.h ('k') | webkit/plugins/npapi/webplugin_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698