| 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 "content/renderer/pepper/pepper_webplugin_impl.h" | 5 #include "content/renderer/pepper/pepper_webplugin_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 instance_->document_loader(); | 240 instance_->document_loader(); |
| 241 if (document_loader) | 241 if (document_loader) |
| 242 document_loader->didFail(error); | 242 document_loader->didFail(error); |
| 243 } | 243 } |
| 244 | 244 |
| 245 bool PepperWebPluginImpl::hasSelection() const { | 245 bool PepperWebPluginImpl::hasSelection() const { |
| 246 return !selectionAsText().isEmpty(); | 246 return !selectionAsText().isEmpty(); |
| 247 } | 247 } |
| 248 | 248 |
| 249 WebString PepperWebPluginImpl::selectionAsText() const { | 249 WebString PepperWebPluginImpl::selectionAsText() const { |
| 250 return instance_->GetSelectedText(false); | 250 return WebString::fromUTF16(instance_->GetSelectedText(false)); |
| 251 } | 251 } |
| 252 | 252 |
| 253 WebString PepperWebPluginImpl::selectionAsMarkup() const { | 253 WebString PepperWebPluginImpl::selectionAsMarkup() const { |
| 254 return instance_->GetSelectedText(true); | 254 return WebString::fromUTF16(instance_->GetSelectedText(true)); |
| 255 } | 255 } |
| 256 | 256 |
| 257 WebURL PepperWebPluginImpl::linkAtPosition(const WebPoint& position) const { | 257 WebURL PepperWebPluginImpl::linkAtPosition(const WebPoint& position) const { |
| 258 return GURL(instance_->GetLinkAtPosition(position)); | 258 return GURL(instance_->GetLinkAtPosition(position)); |
| 259 } | 259 } |
| 260 | 260 |
| 261 bool PepperWebPluginImpl::startFind(const blink::WebString& search_text, | 261 bool PepperWebPluginImpl::startFind(const blink::WebString& search_text, |
| 262 bool case_sensitive, | 262 bool case_sensitive, |
| 263 int identifier) { | 263 int identifier) { |
| 264 return instance_->StartFind(search_text, case_sensitive, identifier); | 264 return instance_->StartFind(search_text.utf8(), case_sensitive, identifier); |
| 265 } | 265 } |
| 266 | 266 |
| 267 void PepperWebPluginImpl::selectFindResult(bool forward, int identifier) { | 267 void PepperWebPluginImpl::selectFindResult(bool forward, int identifier) { |
| 268 instance_->SelectFindResult(forward, identifier); | 268 instance_->SelectFindResult(forward, identifier); |
| 269 } | 269 } |
| 270 | 270 |
| 271 void PepperWebPluginImpl::stopFind() { instance_->StopFind(); } | 271 void PepperWebPluginImpl::stopFind() { instance_->StopFind(); } |
| 272 | 272 |
| 273 bool PepperWebPluginImpl::supportsPaginatedPrint() { | 273 bool PepperWebPluginImpl::supportsPaginatedPrint() { |
| 274 return instance_->SupportsPrintInterface(); | 274 return instance_->SupportsPrintInterface(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 295 | 295 |
| 296 bool PepperWebPluginImpl::canRotateView() { return instance_->CanRotateView(); } | 296 bool PepperWebPluginImpl::canRotateView() { return instance_->CanRotateView(); } |
| 297 | 297 |
| 298 void PepperWebPluginImpl::rotateView(RotationType type) { | 298 void PepperWebPluginImpl::rotateView(RotationType type) { |
| 299 instance_->RotateView(type); | 299 instance_->RotateView(type); |
| 300 } | 300 } |
| 301 | 301 |
| 302 bool PepperWebPluginImpl::isPlaceholder() { return false; } | 302 bool PepperWebPluginImpl::isPlaceholder() { return false; } |
| 303 | 303 |
| 304 } // namespace content | 304 } // namespace content |
| OLD | NEW |