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

Unified Diff: webkit/plugins/ppapi/ppb_flash_menu_impl.cc

Issue 7669055: Remove webkit::ppapi::Resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix self-assignment Created 9 years, 4 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: webkit/plugins/ppapi/ppb_flash_menu_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_flash_menu_impl.cc b/webkit/plugins/ppapi/ppb_flash_menu_impl.cc
index 80faa25854df49acd68896b1191a53f4e95597b6..dbf80a3fce9271a73583635bce82b76c4f47028b 100644
--- a/webkit/plugins/ppapi/ppb_flash_menu_impl.cc
+++ b/webkit/plugins/ppapi/ppb_flash_menu_impl.cc
@@ -12,6 +12,7 @@
#include "webkit/plugins/ppapi/plugin_delegate.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
+#include "webkit/plugins/ppapi/resource_helper.h"
using ::ppapi::thunk::PPB_Flash_Menu_API;
@@ -94,7 +95,7 @@ bool ConvertMenuData(const PP_Flash_Menu* in_menu,
} // namespace
-PPB_Flash_Menu_Impl::PPB_Flash_Menu_Impl(PluginInstance* instance)
+PPB_Flash_Menu_Impl::PPB_Flash_Menu_Impl(PP_Instance instance)
: Resource(instance) {
}
@@ -102,7 +103,7 @@ PPB_Flash_Menu_Impl::~PPB_Flash_Menu_Impl() {
}
// static
-PP_Resource PPB_Flash_Menu_Impl::Create(PluginInstance* instance,
+PP_Resource PPB_Flash_Menu_Impl::Create(PP_Instance instance,
const PP_Flash_Menu* menu_data) {
scoped_refptr<PPB_Flash_Menu_Impl> menu(new PPB_Flash_Menu_Impl(instance));
if (!menu->Init(menu_data))
@@ -141,12 +142,14 @@ int32_t PPB_Flash_Menu_Impl::Show(const PP_Point* location,
if (callback_.get() && !callback_->completed())
return PP_ERROR_INPROGRESS;
- int32_t rv = instance()->delegate()->ShowContextMenu(
- instance(), this, gfx::Point(location->x, location->y));
+ PluginInstance* instance = ResourceHelper::GetPluginInstance(this);
+
+ int32_t rv = instance->delegate()->ShowContextMenu(
+ instance, this, gfx::Point(location->x, location->y));
if (rv == PP_OK_COMPLETIONPENDING) {
// Record callback and output buffers.
callback_ = new TrackedCompletionCallback(
- instance()->module()->GetCallbackTracker(), pp_resource(), callback);
+ instance->module()->GetCallbackTracker(), pp_resource(), callback);
selected_id_out_ = selected_id_out;
} else {
// This should never be completed synchronously successfully.

Powered by Google App Engine
This is Rietveld 408576698