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

Unified Diff: components/nacl/renderer/nacl_helper.cc

Issue 290553004: PPAPI: Refactor MessageChannel to prep for sync postMessae (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move NaCl hook to components/nacl/renderer Created 6 years, 7 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: components/nacl/renderer/nacl_helper.cc
diff --git a/components/nacl/renderer/nacl_helper.cc b/components/nacl/renderer/nacl_helper.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d3d11bc92a9b562c0a44ca8ef37b0b56ed6827b9
--- /dev/null
+++ b/components/nacl/renderer/nacl_helper.cc
@@ -0,0 +1,18 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/nacl/renderer/nacl_helper.h"
+
+#include "content/public/renderer/renderer_ppapi_host.h"
+
+NaClHelper::NaClHelper(content::RenderFrame* render_frame)
+ : RenderFrameObserver(render_frame) {}
+
+NaClHelper::~NaClHelper() {}
+
+void NaClHelper::DidCreatePepperPlugin(content::RendererPpapiHost* host) {
+ // The Native Client plugin is a host for external plugins.
+ if (host->GetPluginName() == "Native Client")
+ host->SetToExternalPluginHost();
+}

Powered by Google App Engine
This is Rietveld 408576698