mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
libcef: Update due to underlying chromium changes.
- Add the printing project and delete duplicated files from the CEF printing directory. - Add media-related projects and support for <video> and <image> tags. - Use WebKit::WebHTTPBody instead of net::UploadData for web requests. - Numerous changes due to continued cleanup of webkit/glue and webkit/api/public. - Use a separate BrowserWebViewDelegate instance for popup windows. libcef: - Add support for printing to file. - Use WebFrame::GetFullPageHtml() instead of webkit_glue::GetDocumentString(). - Parse extra header values in RequestProxy for passing to CefHandler::HandleBeforeResourceLoad(). - Add urlmon.lib dependency in libcef.vsprops. tools: - Add the patch application tool (patcher.py). patch: - New project for applying required patches to the Chromium source tree (issue #47). - Add webkit_glue.patch for http://codereview.chromium.org/160004 cefclient: - Add new test for submitting and handling requests. - Don't change navigation button state for popup windows. - Fix problem on Vista where the string returned by EM_GETLINE is not NULL-terminated. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@32 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include "base/ref_counted.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/time.h"
|
||||
#include "base/timer.h"
|
||||
#include "base/thread.h"
|
||||
#include "base/waitable_event.h"
|
||||
#include "net/base/cookie_monster.h"
|
||||
@@ -50,6 +51,7 @@
|
||||
#include "net/base/net_util.h"
|
||||
#include "net/base/upload_data.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/http/http_util.h"
|
||||
#include "net/proxy/proxy_service.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "webkit/glue/resource_loader_bridge.h"
|
||||
@@ -223,9 +225,19 @@ class RequestProxy : public URLRequest::Delegate,
|
||||
requestimpl->SetURL(UTF8ToWide(params->url.spec()));
|
||||
requestimpl->SetMethod(UTF8ToWide(params->method));
|
||||
|
||||
// TODO(cef): Parse the extra header values from params->headers and
|
||||
// add to the header map.
|
||||
CefRequest::HeaderMap headerMap;
|
||||
|
||||
// Parse the request header values
|
||||
std::string headerStr = "HTTP/1.1 200 OK\n";
|
||||
headerStr += params->headers;
|
||||
scoped_refptr<net::HttpResponseHeaders> headers =
|
||||
new HttpResponseHeaders(net::HttpUtil::AssembleRawHeaders(
|
||||
headerStr.c_str(), headerStr.length()));
|
||||
void* iter = NULL;
|
||||
std::string name, value;
|
||||
while(headers->EnumerateHeaderLines(&iter, &name, &value))
|
||||
headerMap.insert(std::make_pair(UTF8ToWide(name), UTF8ToWide(value)));
|
||||
|
||||
headerMap.insert(
|
||||
std::make_pair(L"Referrer", UTF8ToWide(params->referrer.spec())));
|
||||
|
||||
@@ -368,7 +380,8 @@ class RequestProxy : public URLRequest::Delegate,
|
||||
// URLRequest::Delegate implementation:
|
||||
|
||||
virtual void OnReceivedRedirect(URLRequest* request,
|
||||
const GURL& new_url) {
|
||||
const GURL& new_url,
|
||||
bool* defer_redirect) {
|
||||
DCHECK(request->status().is_success());
|
||||
OnReceivedRedirect(new_url);
|
||||
}
|
||||
|
Reference in New Issue
Block a user