Make ActiveTabPermissionManager also grant the tabs permission for
that tab; only respected for tabs.executeScript and tabs.insertCSS.

This involved converting tabs.executeScript/insertCSS to use JSON
schema compiler.


BUG=137643
[email protected]

Review URL: https://chromiumcodereview.appspot.com/10815028

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149631 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension_function.cc b/chrome/browser/extensions/extension_function.cc
index 4e53d1b0..e28e353 100644
--- a/chrome/browser/extensions/extension_function.cc
+++ b/chrome/browser/extensions/extension_function.cc
@@ -83,6 +83,10 @@
   return NULL;
 }
 
+bool ExtensionFunction::HasPermission() {
+  return extension_->HasAPIPermission(name_);
+}
+
 void ExtensionFunction::OnQuotaExceeded() {
   error_ = QuotaLimitHeuristic::kGenericOverQuotaError;
   SendResponse(false);