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

Unified Diff: webkit/plugins/ppapi/ppb_flash_impl.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 | « webkit/plugins/ppapi/ppb_flash_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_flash_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_flash_impl.cc b/webkit/plugins/ppapi/ppb_flash_impl.cc
index 2dc7842b5280b7fab56715ee66f2351c8c7a6611..4042019f4456ee95df9f81163a179a16010b201b 100644
--- a/webkit/plugins/ppapi/ppb_flash_impl.cc
+++ b/webkit/plugins/ppapi/ppb_flash_impl.cc
@@ -23,6 +23,7 @@
#include "third_party/skia/include/core/SkPoint.h"
#include "third_party/skia/include/core/SkTemplates.h"
#include "third_party/skia/include/core/SkTypeface.h"
+#include "ui/gfx/rect.h"
#include "webkit/plugins/ppapi/common.h"
#include "webkit/plugins/ppapi/host_globals.h"
#include "webkit/plugins/ppapi/plugin_delegate.h"
@@ -242,6 +243,29 @@ void PreLoadFontWin(const void* logfontw) {
// Not implemented in-process.
}
+PP_Bool IsRectTopmost(PP_Instance pp_instance, const PP_Rect* rect) {
+ PluginInstance* instance = HostGlobals::Get()->GetInstance(pp_instance);
+ if (!instance)
+ return PP_FALSE;
+ return PP_FromBool(instance->IsRectTopmost(
+ gfx::Rect(rect->point.x, rect->point.y,
+ rect->size.width, rect->size.height)));
+}
+
+int32_t InvokePrinting(PP_Instance pp_instance) {
+ PluginInstance* instance = HostGlobals::Get()->GetInstance(pp_instance);
+ if (!instance)
+ return PP_ERROR_BADARGUMENT;
+
+ // TODO(viettrungluu): Implement me.
+
+ return PP_ERROR_NOTSUPPORTED;
+}
+
+void UpdateActivity(PP_Instance pp_instance) {
+ // TODO(viettrungluu): Implement me.
+}
+
const PPB_Flash_11 ppb_flash_11 = {
&SetInstanceAlwaysOnTop,
&DrawGlyphs11,
@@ -253,7 +277,7 @@ const PPB_Flash_11 ppb_flash_11 = {
&GetCommandLineArgs
};
-const PPB_Flash ppb_flash_12 = {
+const PPB_Flash_12_0 ppb_flash_12_0 = {
&SetInstanceAlwaysOnTop,
&DrawGlyphs,
&GetProxyForURL,
@@ -265,6 +289,21 @@ const PPB_Flash ppb_flash_12 = {
&PreLoadFontWin
};
+const PPB_Flash_12_1 ppb_flash_12_1 = {
+ &SetInstanceAlwaysOnTop,
+ &DrawGlyphs,
+ &GetProxyForURL,
+ &Navigate,
+ &RunMessageLoop,
+ &QuitMessageLoop,
+ &GetLocalTimeZoneOffset,
+ &GetCommandLineArgs,
+ &PreLoadFontWin,
+ &IsRectTopmost,
+ &InvokePrinting,
+ &UpdateActivity
+};
+
} // namespace
// static
@@ -274,7 +313,12 @@ const PPB_Flash_11* PPB_Flash_Impl::GetInterface11() {
// static
const PPB_Flash_12_0* PPB_Flash_Impl::GetInterface12_0() {
- return &ppb_flash_12;
+ return &ppb_flash_12_0;
+}
+
+// static
+const PPB_Flash_12_1* PPB_Flash_Impl::GetInterface12_1() {
+ return &ppb_flash_12_1;
}
} // namespace ppapi
« no previous file with comments | « webkit/plugins/ppapi/ppb_flash_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698