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

Unified Diff: ppapi/proxy/ppb_instance_proxy.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
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/thunk/ppb_find_private_thunk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_instance_proxy.cc
diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc
index 3dda61b4e2a007a737d07ed8664d67fee67c0ac4..257d0d233240bbc515ec6e1b3281bc8121f204b8 100644
--- a/ppapi/proxy/ppb_instance_proxy.cc
+++ b/ppapi/proxy/ppb_instance_proxy.cc
@@ -133,6 +133,8 @@ bool PPB_Instance_Proxy::OnMessageReceived(const IPC::Message& msg) {
OnHostMsgNumberOfFindResultsChanged)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SelectFindResultChanged,
OnHostMsgSelectFindResultChanged)
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SetTickmarks,
+ OnHostMsgSetTickmarks)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PostMessage,
OnHostMsgPostMessage)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SetFullscreen,
@@ -335,6 +337,14 @@ void PPB_Instance_Proxy::SelectedFindResultChanged(PP_Instance instance,
API_ID_PPB_INSTANCE, instance, index));
}
+void PPB_Instance_Proxy::SetTickmarks(PP_Instance instance,
+ const PP_Rect* tickmarks,
+ uint32_t count) {
+ dispatcher()->Send(new PpapiHostMsg_PPBInstance_SetTickmarks(
+ API_ID_PPB_INSTANCE, instance,
+ std::vector<PP_Rect>(tickmarks, tickmarks + count)));
+}
+
PP_Bool PPB_Instance_Proxy::IsFullscreen(PP_Instance instance) {
InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())->
GetInstanceData(instance);
@@ -944,6 +954,21 @@ void PPB_Instance_Proxy::OnHostMsgSelectFindResultChanged(
enter.functions()->SelectedFindResultChanged(instance, index);
}
+void PPB_Instance_Proxy::OnHostMsgSetTickmarks(
+ PP_Instance instance,
+ const std::vector<PP_Rect>& tickmarks) {
+ if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE))
+ return;
+ if (tickmarks.empty())
+ return;
+ EnterInstanceNoLock enter(instance);
+ if (enter.succeeded()) {
+ enter.functions()->SetTickmarks(instance,
+ &tickmarks[0],
+ static_cast<uint32_t>(tickmarks.size()));
+ }
+}
+
void PPB_Instance_Proxy::OnHostMsgSetFullscreen(PP_Instance instance,
PP_Bool fullscreen,
PP_Bool* result) {
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/thunk/ppb_find_private_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698