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

Unified Diff: ppapi/proxy/ppb_flash_proxy.cc

Issue 9369003: Pepper: Add a function to PPB_Flash to check if a rect is topmost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add stubs for InvokePrinting() and UpdateActivity() Created 8 years, 10 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_flash_proxy.h ('k') | webkit/plugins/ppapi/plugin_module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_flash_proxy.cc
diff --git a/ppapi/proxy/ppb_flash_proxy.cc b/ppapi/proxy/ppb_flash_proxy.cc
index bcd692b1ab5ce427368a144e36e9afc425fc876c..d2e5cb6edc300ef941b53f1c123647abff2b78c0 100644
--- a/ppapi/proxy/ppb_flash_proxy.cc
+++ b/ppapi/proxy/ppb_flash_proxy.cc
@@ -198,6 +198,30 @@ void PreLoadFontWin(const void* logfontw) {
PluginGlobals::Get()->plugin_proxy_delegate()->PreCacheFont(logfontw);
}
+PP_Bool IsRectTopmost(PP_Instance instance, const PP_Rect* rect) {
+ PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
+ if (!dispatcher)
+ return PP_FALSE;
+ PP_Bool result = PP_FALSE;
+ dispatcher->Send(new PpapiHostMsg_PPBFlash_IsRectTopmost(
+ API_ID_PPB_FLASH, instance, *rect, &result));
+ return result;
+}
+
+int32_t InvokePrinting(PP_Instance instance) {
+ PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
+ if (!dispatcher)
+ return PP_ERROR_BADARGUMENT;
+
+ // TODO(viettrungluu): Implement me.
+
+ return PP_ERROR_NOTSUPPORTED;
+}
+
+void UpdateActivity(PP_Instance instance) {
+ // TODO(viettrungluu): Implement me.
+}
+
const PPB_Flash_11 flash_interface_11 = {
&SetInstanceAlwaysOnTop,
&DrawGlyphs11,
@@ -209,7 +233,7 @@ const PPB_Flash_11 flash_interface_11 = {
&GetCommandLineArgs
};
-const PPB_Flash flash_interface_12 = {
+const PPB_Flash_12_0 flash_interface_12_0 = {
&SetInstanceAlwaysOnTop,
&DrawGlyphs,
&GetProxyForURL,
@@ -221,6 +245,21 @@ const PPB_Flash flash_interface_12 = {
&PreLoadFontWin
};
+const PPB_Flash_12_1 flash_interface_12_1 = {
+ &SetInstanceAlwaysOnTop,
+ &DrawGlyphs,
+ &GetProxyForURL,
+ &Navigate,
+ &RunMessageLoop,
+ &QuitMessageLoop,
+ &GetLocalTimeZoneOffset,
+ &GetCommandLineArgs,
+ &PreLoadFontWin,
+ &IsRectTopmost,
+ &InvokePrinting,
+ &UpdateActivity
+};
+
} // namespace
PPB_Flash_Proxy::PPB_Flash_Proxy(Dispatcher* dispatcher)
@@ -240,8 +279,13 @@ const PPB_Flash_11* PPB_Flash_Proxy::GetInterface11() {
}
// static
-const PPB_Flash* PPB_Flash_Proxy::GetInterface12_0() {
- return &flash_interface_12;
+const PPB_Flash_12_0* PPB_Flash_Proxy::GetInterface12_0() {
+ return &flash_interface_12_0;
+}
+
+// static
+const PPB_Flash_12_1* PPB_Flash_Proxy::GetInterface12_1() {
+ return &flash_interface_12_1;
}
bool PPB_Flash_Proxy::OnMessageReceived(const IPC::Message& msg) {
@@ -265,6 +309,8 @@ bool PPB_Flash_Proxy::OnMessageReceived(const IPC::Message& msg) {
OnMsgQuitMessageLoop)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlash_GetLocalTimeZoneOffset,
OnMsgGetLocalTimeZoneOffset)
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlash_IsRectTopmost,
+ OnMsgIsRectTopmost)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
// TODO(brettw) handle bad messages!
@@ -358,5 +404,11 @@ void PPB_Flash_Proxy::OnMsgGetLocalTimeZoneOffset(PP_Instance instance,
*result = ppb_flash_impl_->GetLocalTimeZoneOffset(instance, t);
}
+void PPB_Flash_Proxy::OnMsgIsRectTopmost(PP_Instance instance,
+ PP_Rect rect,
+ PP_Bool* result) {
+ *result = ppb_flash_impl_->IsRectTopmost(instance, &rect);
+}
+
} // namespace proxy
} // namespace ppapi
« no previous file with comments | « ppapi/proxy/ppb_flash_proxy.h ('k') | webkit/plugins/ppapi/plugin_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698