Add the ability to restrict V8 extension loading by frame using a new CefPermissionHandler::OnBeforeScriptExtensionLoad() callback (issue #471).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@457 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-01-05 19:34:20 +00:00
parent ad65bb8532
commit b8ba27a671
23 changed files with 572 additions and 22 deletions

View File

@@ -26,6 +26,7 @@ class ClientHandler : public CefClient,
public CefPrintHandler,
public CefV8ContextHandler,
public CefDragHandler,
public CefPermissionHandler,
public DownloadListener
{
public:
@@ -51,6 +52,8 @@ public:
{ return this; }
virtual CefRefPtr<CefDragHandler> GetDragHandler() OVERRIDE
{ return this; }
virtual CefRefPtr<CefPermissionHandler> GetPermissionHandler() OVERRIDE
{ return this; }
// CefLifeSpanHandler methods
virtual bool OnBeforePopup(CefRefPtr<CefBrowser> parentBrowser,
@@ -144,6 +147,11 @@ public:
CefRefPtr<CefDragData> dragData,
DragOperationsMask mask) OVERRIDE;
// CefPermissionHandler methods.
virtual bool OnBeforeScriptExtensionLoad(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
const CefString& extensionName) OVERRIDE;
// DownloadListener methods
virtual void NotifyDownloadComplete(const CefString& fileName) OVERRIDE;
virtual void NotifyDownloadError(const CefString& fileName) OVERRIDE;