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

Unified Diff: webkit/glue/plugins/pepper_plugin_instance.cc

Issue 2800028: Simplfy Pepepr2 bolierplate code. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Updated. Created 10 years, 6 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/glue/plugins/pepper_plugin_instance.cc
diff --git a/webkit/glue/plugins/pepper_plugin_instance.cc b/webkit/glue/plugins/pepper_plugin_instance.cc
index d86fffc32fa5cc7aa31ee3f732ab8f9e09f4c83f..97ec0938ebca77ef2622657c32dba7b5f8a31200 100644
--- a/webkit/glue/plugins/pepper_plugin_instance.cc
+++ b/webkit/glue/plugins/pepper_plugin_instance.cc
@@ -23,7 +23,6 @@
#include "webkit/glue/plugins/pepper_device_context_2d.h"
#include "webkit/glue/plugins/pepper_plugin_delegate.h"
#include "webkit/glue/plugins/pepper_plugin_module.h"
-#include "webkit/glue/plugins/pepper_resource_tracker.h"
#include "webkit/glue/plugins/pepper_var.h"
using WebKit::WebFrame;
@@ -214,12 +213,9 @@ bool PluginInstance::BindGraphicsDeviceContext(PP_Resource device_id) {
return true;
}
- scoped_refptr<Resource> device_resource =
- ResourceTracker::Get()->GetResource(device_id);
- if (!device_resource.get())
- return false;
+ scoped_refptr<DeviceContext2D> device_2d =
+ Resource::GetAs<DeviceContext2D>(device_id);
- DeviceContext2D* device_2d = device_resource->AsDeviceContext2D();
if (device_2d) {
if (!device_2d->BindToInstance(this))
return false; // Can't bind to more than one instance.

Powered by Google App Engine
This is Rietveld 408576698