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

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 195893044: Add a PPB_Find_Private function to set the tickmarks on the page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index 1577431abd23ba9c9bbb1f01eadc7d1d1218808b..e5eab7ef1c50a9ac831ed843538500455a2dd4e3 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -92,6 +92,7 @@
#include "skia/ext/platform_device.h"
#include "third_party/WebKit/public/platform/WebCursorInfo.h"
#include "third_party/WebKit/public/platform/WebGamepads.h"
+#include "third_party/WebKit/public/platform/WebRect.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/platform/WebURLError.h"
@@ -2420,6 +2421,24 @@ void PepperPluginInstanceImpl::SelectedFindResultChanged(PP_Instance instance,
}
}
+void PepperPluginInstanceImpl::SetTickmarks(PP_Instance instance,
+ const PP_Rect* tickmarks,
+ uint32_t count) {
+ if (!render_frame_ || !render_frame_->GetWebFrame())
+ return;
+
+ blink::WebVector<blink::WebRect> tickmarks_converted(
+ static_cast<size_t>(count));
+ for (uint32 i = 0; i < count; ++i) {
+ tickmarks_converted[i] = blink::WebRect(tickmarks[i].point.x,
+ tickmarks[i].point.y,
+ tickmarks[i].size.width,
+ tickmarks[i].size.height);;
+ }
+ blink::WebFrame* frame = render_frame_->GetWebFrame();
+ frame->setTickmarks(tickmarks_converted);
+}
+
PP_Bool PepperPluginInstanceImpl::IsFullscreen(PP_Instance instance) {
return PP_FromBool(view_data_.is_fullscreen);
}
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.h ('k') | mojo/examples/pepper_container_app/plugin_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698