Enforce extension permissions in C++ (instead of Javascript).

BUG=38920
TEST=ExtensionApiTest.Incognito

Review URL: http://codereview.chromium.org/1148009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42441 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc
index 6448cf5..ab97f2a3 100644
--- a/chrome/renderer/render_thread.cc
+++ b/chrome/renderer/render_thread.cc
@@ -865,8 +865,9 @@
 }
 
 void RenderThread::OnExtensionMessageInvoke(const std::string& function_name,
-                                            const ListValue& args) {
-  RendererExtensionBindings::Invoke(function_name, args, NULL);
+                                            const ListValue& args,
+                                            bool requires_incognito_access) {
+  RendererExtensionBindings::Invoke(function_name, args, NULL, requires_incognito_access);
 
   // Reset the idle handler each time there's any activity like event or message
   // dispatch, for which Invoke is the chokepoint.