Pass the originating browser to CefSchemeHandlerFactory::Create() (issue #362).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@305 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-10-07 10:13:04 +00:00
parent 4bacca6998
commit 7a3154c9ba
11 changed files with 76 additions and 21 deletions

View File

@ -4,6 +4,7 @@
// found in the LICENSE file.
#include "include/cef.h"
#include "browser_resource_loader_bridge.h"
#include "cef_context.h"
#include "cef_thread.h"
#include "request_impl.h"
@ -546,7 +547,10 @@ private:
// Call the handler factory to create the handler for the request.
CefRefPtr<CefRequest> requestPtr(new CefRequestImpl());
static_cast<CefRequestImpl*>(requestPtr.get())->Set(request);
CefRefPtr<CefSchemeHandler> handler = factory->Create(scheme, requestPtr);
CefRefPtr<CefBrowser> browser =
BrowserResourceLoaderBridge::GetBrowserForRequest(request);
CefRefPtr<CefSchemeHandler> handler =
factory->Create(browser, scheme, requestPtr);
if (handler.get())
job = new CefUrlRequestJob(request, handler);
}