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

Unified Diff: remoting/client/plugin/chromoting_plugin.cc

Issue 2843018: Add in support for internal pepper plugins into the PepperPluginRegistry and pepper::PluginModule. (Closed) Base URL: git://codf21.jail.google.com/chromium.git
Patch Set: Add new entrypoint to match ToT ppapi 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
« no previous file with comments | « remoting/client/plugin/chromoting_plugin.h ('k') | remoting/client/plugin/pepper_entrypoints.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/chromoting_plugin.cc
diff --git a/remoting/client/plugin/chromoting_plugin.cc b/remoting/client/plugin/chromoting_plugin.cc
index 88b19cbde2baf187137564fde04a3b2dc5bcf391..c5b5b030edb60b75befa224218a6f4f56b83dc43 100644
--- a/remoting/client/plugin/chromoting_plugin.cc
+++ b/remoting/client/plugin/chromoting_plugin.cc
@@ -24,13 +24,15 @@ using std::vector;
namespace remoting {
-const char* ChromotingPlugin::kMimeType =
- "pepper-application/x-chromoting-plugin::Chromoting";
-
-ChromotingPlugin::ChromotingPlugin(PP_Instance instance)
- : pp::Instance(instance),
- width_(0),
- height_(0) {
+const char* ChromotingPlugin::kMimeType = "pepper-application/x-chromoting";
+
+ChromotingPlugin::ChromotingPlugin(PP_Instance pp_instance,
+ const PPB_Instance* ppb_instance_funcs)
+ : width_(0),
+ height_(0),
+ drawing_context_(NULL),
+ pp_instance_(pp_instance),
+ ppb_instance_funcs_(ppb_instance_funcs) {
}
ChromotingPlugin::~ChromotingPlugin() {
@@ -115,8 +117,13 @@ void ChromotingPlugin::ViewChanged(const PP_Rect& position,
width_ = position.size.width;
height_ = position.size.height;
+ /*
+ * TODO(ajwong): Reenable this code once we fingure out how we want to
+ * abstract away the C-api for DeviceContext2D.
device_context_ = pp::DeviceContext2D(width_, height_, false);
- if (!BindGraphicsDeviceContext(device_context_)) {
+ if (!ppb_instance_funcs_->BindGraphicsDeviceContext(
+ pp_instance_,
+ device_context_.pp_resource())) {
LOG(ERROR) << "Couldn't bind the device context.";
return;
}
@@ -133,6 +140,7 @@ void ChromotingPlugin::ViewChanged(const PP_Rect& position,
} else {
LOG(ERROR) << "Unable to allocate image.";
}
+ */
//client_->SetViewport(0, 0, width_, height_);
//client_->Repaint();
« no previous file with comments | « remoting/client/plugin/chromoting_plugin.h ('k') | remoting/client/plugin/pepper_entrypoints.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698