- Update to Chromium revision 136953.

- Add chrome-devtools scheme handler implementation.
- Change the CefBrowser::GetDevToolsURL() method to allow retrieval of both http and chrome-devtools URLs.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@630 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-05-18 15:04:56 +00:00
parent fb2d3f9490
commit 761187a673
35 changed files with 448 additions and 165 deletions

View File

@@ -10,6 +10,7 @@
#include "libcef/browser/browser_context.h"
#include "libcef/browser/browser_host_impl.h"
#include "libcef/browser/context.h"
#include "libcef/browser/devtools_scheme_handler.h"
#include "libcef/browser/resource_request_job.h"
#include "libcef/browser/thread_util.h"
#include "libcef/browser/url_request_context_getter.h"
@@ -44,6 +45,10 @@ using net::URLRequestStatus;
namespace {
bool IsInternalScheme(const std::string& scheme) {
return (scheme == kChromeDevToolsScheme);
}
bool IsStandardScheme(const std::string& scheme) {
url_parse::Component scheme_comp(0, scheme.length());
return url_util::IsStandard(scheme.c_str(), scheme_comp);
@@ -226,12 +231,14 @@ class CefUrlRequestManager {
if (factory) {
CefRefPtr<CefBrowserHostImpl> browser =
CefBrowserHostImpl::GetBrowserForRequest(request);
if (browser.get()) {
if (browser.get() || IsInternalScheme(request->url().scheme())) {
// Populate the request data.
CefRefPtr<CefRequestImpl> requestPtr(new CefRequestImpl());
requestPtr->Set(request);
CefRefPtr<CefFrame> frame = browser->GetFrameForRequest(request);
CefRefPtr<CefFrame> frame;
if (browser.get())
frame = browser->GetFrameForRequest(request);
// Call the handler factory to create the handler for the request.
CefRefPtr<CefResourceHandler> handler =
@@ -303,6 +310,9 @@ bool CefClearSchemeHandlerFactories() {
if (CEF_CURRENTLY_ON(CEF_IOT)) {
CefUrlRequestManager::GetInstance()->ClearFactories();
// Re-register the DevTools scheme handler.
RegisterDevToolsSchemeHandler();
} else {
CEF_POST_TASK(CEF_IOT,
base::Bind(base::IgnoreResult(&CefClearSchemeHandlerFactories)));