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

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

Issue 5828003: Move the Pepper implementation from webkit/glue/plugins/pepper_* to... (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/ppapi/webplugin_impl.h ('k') | webkit/tools/test_shell/test_shell.gypi » ('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/pepper_webplugin_impl.h" 5 #include "webkit/plugins/ppapi/webplugin_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "ppapi/c/pp_var.h" 10 #include "ppapi/c/pp_var.h"
11 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" 11 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h"
12 #include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" 12 #include "third_party/WebKit/WebKit/chromium/public/WebPoint.h"
13 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" 13 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
14 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" 14 #include "third_party/WebKit/WebKit/chromium/public/WebView.h"
15 #include "webkit/glue/plugins/pepper_plugin_instance.h" 15 #include "webkit/plugins/ppapi/plugin_instance.h"
16 #include "webkit/glue/plugins/pepper_plugin_module.h" 16 #include "webkit/plugins/ppapi/plugin_module.h"
17 #include "webkit/glue/plugins/pepper_url_loader.h" 17 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h"
18 #include "webkit/glue/plugins/pepper_var.h" 18 #include "webkit/plugins/ppapi/var.h"
19 19
20 using WebKit::WebCanvas; 20 using WebKit::WebCanvas;
21 using WebKit::WebPluginContainer; 21 using WebKit::WebPluginContainer;
22 using WebKit::WebPluginParams; 22 using WebKit::WebPluginParams;
23 using WebKit::WebPoint; 23 using WebKit::WebPoint;
24 using WebKit::WebRect; 24 using WebKit::WebRect;
25 using WebKit::WebString; 25 using WebKit::WebString;
26 using WebKit::WebURL; 26 using WebKit::WebURL;
27 using WebKit::WebVector; 27 using WebKit::WebVector;
28 using WebKit::WebView; 28 using WebKit::WebView;
29 29
30 namespace pepper { 30 namespace webkit {
31 namespace ppapi {
31 32
32 struct WebPluginImpl::InitData { 33 struct WebPluginImpl::InitData {
33 scoped_refptr<PluginModule> module; 34 scoped_refptr<PluginModule> module;
34 base::WeakPtr<PluginDelegate> delegate; 35 base::WeakPtr<PluginDelegate> delegate;
35 std::vector<std::string> arg_names; 36 std::vector<std::string> arg_names;
36 std::vector<std::string> arg_values; 37 std::vector<std::string> arg_values;
37 }; 38 };
38 39
39 WebPluginImpl::WebPluginImpl( 40 WebPluginImpl::WebPluginImpl(
40 PluginModule* plugin_module, 41 PluginModule* plugin_module,
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 WebKit::WebCursorInfo& cursor_info) { 129 WebKit::WebCursorInfo& cursor_info) {
129 if (instance_->IsFullscreen()) 130 if (instance_->IsFullscreen())
130 return false; 131 return false;
131 return instance_->HandleInputEvent(event, &cursor_info); 132 return instance_->HandleInputEvent(event, &cursor_info);
132 } 133 }
133 134
134 void WebPluginImpl::didReceiveResponse( 135 void WebPluginImpl::didReceiveResponse(
135 const WebKit::WebURLResponse& response) { 136 const WebKit::WebURLResponse& response) {
136 DCHECK(!document_loader_); 137 DCHECK(!document_loader_);
137 138
138 document_loader_ = new URLLoader(instance_, true); 139 document_loader_ = new PPB_URLLoader_Impl(instance_, true);
139 document_loader_->didReceiveResponse(NULL, response); 140 document_loader_->didReceiveResponse(NULL, response);
140 141
141 if (!instance_->HandleDocumentLoad(document_loader_)) 142 if (!instance_->HandleDocumentLoad(document_loader_))
142 document_loader_ = NULL; 143 document_loader_ = NULL;
143 } 144 }
144 145
145 void WebPluginImpl::didReceiveData(const char* data, int data_length) { 146 void WebPluginImpl::didReceiveData(const char* data, int data_length) {
146 if (document_loader_) 147 if (document_loader_)
147 document_loader_->didReceiveData(NULL, data, data_length); 148 document_loader_->didReceiveData(NULL, data, data_length);
148 } 149 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 217
217 bool WebPluginImpl::printPage(int page_number, 218 bool WebPluginImpl::printPage(int page_number,
218 WebKit::WebCanvas* canvas) { 219 WebKit::WebCanvas* canvas) {
219 return instance_->PrintPage(page_number, canvas); 220 return instance_->PrintPage(page_number, canvas);
220 } 221 }
221 222
222 void WebPluginImpl::printEnd() { 223 void WebPluginImpl::printEnd() {
223 return instance_->PrintEnd(); 224 return instance_->PrintEnd();
224 } 225 }
225 226
226 } // namespace pepper 227 } // namespace ppapi
228 } // namespace webkit
229
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/webplugin_impl.h ('k') | webkit/tools/test_shell/test_shell.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698