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 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" | 5 #include "webkit/plugins/ppapi/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 "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 WebKit::WebCursorInfo& cursor_info) { | 147 WebKit::WebCursorInfo& cursor_info) { |
148 if (instance_->IsFullscreenOrPending()) | 148 if (instance_->IsFullscreenOrPending()) |
149 return false; | 149 return false; |
150 return instance_->HandleInputEvent(event, &cursor_info); | 150 return instance_->HandleInputEvent(event, &cursor_info); |
151 } | 151 } |
152 | 152 |
153 void WebPluginImpl::didReceiveResponse( | 153 void WebPluginImpl::didReceiveResponse( |
154 const WebKit::WebURLResponse& response) { | 154 const WebKit::WebURLResponse& response) { |
155 DCHECK(!document_loader_); | 155 DCHECK(!document_loader_); |
156 | 156 |
157 document_loader_ = new PPB_URLLoader_Impl(instance_, true); | 157 document_loader_ = new PPB_URLLoader_Impl(instance_->pp_instance(), true); |
158 document_loader_->didReceiveResponse(NULL, response); | 158 document_loader_->didReceiveResponse(NULL, response); |
159 | 159 |
160 if (!instance_->HandleDocumentLoad(document_loader_)) | 160 if (!instance_->HandleDocumentLoad(document_loader_)) |
161 document_loader_ = NULL; | 161 document_loader_ = NULL; |
162 } | 162 } |
163 | 163 |
164 void WebPluginImpl::didReceiveData(const char* data, int data_length) { | 164 void WebPluginImpl::didReceiveData(const char* data, int data_length) { |
165 if (document_loader_) | 165 if (document_loader_) |
166 document_loader_->didReceiveData(NULL, data, data_length, data_length); | 166 document_loader_->didReceiveData(NULL, data, data_length, data_length); |
167 } | 167 } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 WebKit::WebCanvas* canvas) { | 237 WebKit::WebCanvas* canvas) { |
238 return instance_->PrintPage(page_number, canvas); | 238 return instance_->PrintPage(page_number, canvas); |
239 } | 239 } |
240 | 240 |
241 void WebPluginImpl::printEnd() { | 241 void WebPluginImpl::printEnd() { |
242 return instance_->PrintEnd(); | 242 return instance_->PrintEnd(); |
243 } | 243 } |
244 | 244 |
245 } // namespace ppapi | 245 } // namespace ppapi |
246 } // namespace webkit | 246 } // namespace webkit |
OLD | NEW |