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

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
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..5dd215ed0945ecbb537accc5acc355023403fdd7 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 struct PP_Rect* tickmarks,
yzshen1 2014/03/19 17:38:05 nit: no need to have 'struct'.
raymes 2014/03/20 01:53:56 Done.
+ uint32_t count) {
+ dispatcher()->Send(new PpapiHostMsg_PPBInstance_SetTickmarks(
+ API_ID_PPB_INSTANCE, instance,
+ std::vector<PP_Rect>(tickmarks, tickmarks + count)));
yzshen1 2014/03/19 17:38:05 wrong indent.
raymes 2014/03/20 01:53:56 Done.
+}
+
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.size() == 0)
yzshen1 2014/03/19 17:38:05 .empty()
raymes 2014/03/20 01:53:56 Done.
+ return;
+ EnterInstanceNoLock enter(instance);
+ if (enter.succeeded()) {
+ enter.functions()->SetTickmarks(instance,
+ &tickmarks[0],
+ tickmarks.size());
yzshen1 2014/03/19 17:38:05 I think you need static_cast.
raymes 2014/03/20 01:53:56 Done.
+ }
+}
+
void PPB_Instance_Proxy::OnHostMsgSetFullscreen(PP_Instance instance,
PP_Bool fullscreen,
PP_Bool* result) {

Powered by Google App Engine
This is Rietveld 408576698