mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 173683.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@982 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -17,5 +17,5 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
|
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
|
||||||
'chromium_revision': '170167',
|
'chromium_revision': '173683',
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2008-2011 Marshall A. Greenblatt. Portions Copyright (c)
|
// Copyright (c) 2008-2013 Marshall A. Greenblatt. Portions Copyright (c)
|
||||||
// 2006-2009 Google Inc. All rights reserved.
|
// 2006-2009 Google Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
@@ -759,7 +759,7 @@
|
|||||||
'<(DEPTH)/content/browser/geolocation/device_data_provider.cc',
|
'<(DEPTH)/content/browser/geolocation/device_data_provider.cc',
|
||||||
'<(DEPTH)/content/browser/geolocation/empty_device_data_provider.cc',
|
'<(DEPTH)/content/browser/geolocation/empty_device_data_provider.cc',
|
||||||
'<(DEPTH)/content/browser/geolocation/geolocation_provider.cc',
|
'<(DEPTH)/content/browser/geolocation/geolocation_provider.cc',
|
||||||
'<(DEPTH)/content/browser/geolocation/location_arbitrator.cc',
|
'<(DEPTH)/content/browser/geolocation/location_arbitrator_impl.cc',
|
||||||
'<(DEPTH)/content/browser/geolocation/location_provider.cc',
|
'<(DEPTH)/content/browser/geolocation/location_provider.cc',
|
||||||
'<(DEPTH)/content/browser/geolocation/network_location_provider.cc',
|
'<(DEPTH)/content/browser/geolocation/network_location_provider.cc',
|
||||||
'<(DEPTH)/content/browser/geolocation/network_location_request.cc',
|
'<(DEPTH)/content/browser/geolocation/network_location_request.cc',
|
||||||
|
@@ -453,10 +453,11 @@ class RequestProxy : public net::URLRequest::Delegate,
|
|||||||
|
|
||||||
bool handled = false;
|
bool handled = false;
|
||||||
|
|
||||||
scoped_refptr<net::UploadData> upload_data;
|
scoped_ptr<net::UploadDataStream> upload_data_stream;
|
||||||
if (params->request_body) {
|
if (params->request_body) {
|
||||||
upload_data = params->request_body->ResolveElementsAndCreateUploadData(
|
upload_data_stream.reset(
|
||||||
_Context->request_context()->blob_storage_controller());
|
params->request_body->ResolveElementsAndCreateUploadDataStream(
|
||||||
|
_Context->request_context()->blob_storage_controller()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (browser_.get()) {
|
if (browser_.get()) {
|
||||||
@@ -482,10 +483,10 @@ class RequestProxy : public net::URLRequest::Delegate,
|
|||||||
requestimpl->SetHeaderMap(headerMap);
|
requestimpl->SetHeaderMap(headerMap);
|
||||||
|
|
||||||
// Transfer post data, if any
|
// Transfer post data, if any
|
||||||
if (upload_data.get()) {
|
if (upload_data_stream) {
|
||||||
CefRefPtr<CefPostData> postdata(new CefPostDataImpl());
|
CefRefPtr<CefPostData> postdata(new CefPostDataImpl());
|
||||||
static_cast<CefPostDataImpl*>(postdata.get())->Set(
|
static_cast<CefPostDataImpl*>(postdata.get())->Set(
|
||||||
*upload_data.get());
|
*upload_data_stream.get());
|
||||||
requestimpl->SetPostData(postdata);
|
requestimpl->SetPostData(postdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -526,8 +527,10 @@ class RequestProxy : public net::URLRequest::Delegate,
|
|||||||
// Observe post data from request.
|
// Observe post data from request.
|
||||||
CefRefPtr<CefPostData> postData = request->GetPostData();
|
CefRefPtr<CefPostData> postData = request->GetPostData();
|
||||||
if (postData.get()) {
|
if (postData.get()) {
|
||||||
upload_data = new net::UploadData();
|
upload_data_stream.reset(
|
||||||
static_cast<CefPostDataImpl*>(postData.get())->Get(*upload_data);
|
static_cast<CefPostDataImpl*>(postData.get())->Get());
|
||||||
|
} else {
|
||||||
|
upload_data_stream.reset(NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -600,8 +603,8 @@ class RequestProxy : public net::URLRequest::Delegate,
|
|||||||
headers.AddHeadersFromString(params->headers);
|
headers.AddHeadersFromString(params->headers);
|
||||||
request_->SetExtraRequestHeaders(headers);
|
request_->SetExtraRequestHeaders(headers);
|
||||||
request_->set_load_flags(params->load_flags);
|
request_->set_load_flags(params->load_flags);
|
||||||
if (upload_data)
|
if (upload_data_stream)
|
||||||
request_->set_upload(upload_data);
|
request_->set_upload(upload_data_stream.Pass());
|
||||||
request_->SetUserData(kCefUserData,
|
request_->SetUserData(kCefUserData,
|
||||||
new ExtraRequestInfo(browser_.get(), params->request_type));
|
new ExtraRequestInfo(browser_.get(), params->request_type));
|
||||||
BrowserAppCacheSystem::SetExtraRequestInfo(
|
BrowserAppCacheSystem::SetExtraRequestInfo(
|
||||||
@@ -1067,7 +1070,8 @@ class ResourceLoaderBridgeImpl : public ResourceLoaderBridge,
|
|||||||
if (proxy_) {
|
if (proxy_) {
|
||||||
proxy_->DropPeer();
|
proxy_->DropPeer();
|
||||||
// Let the proxy die on the IO thread
|
// Let the proxy die on the IO thread
|
||||||
CefThread::ReleaseSoon(CefThread::IO, FROM_HERE, proxy_.release());
|
proxy_->AddRef();
|
||||||
|
CefThread::ReleaseSoon(CefThread::IO, FROM_HERE, proxy_.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -24,6 +24,52 @@ using WebKit::WebString;
|
|||||||
using WebKit::WebURL;
|
using WebKit::WebURL;
|
||||||
using WebKit::WebURLRequest;
|
using WebKit::WebURLRequest;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
// A subclass of net::UploadBytesElementReader that keeps the associated
|
||||||
|
// UploadElement alive until the request completes.
|
||||||
|
class BytesElementReader : public net::UploadBytesElementReader {
|
||||||
|
public:
|
||||||
|
explicit BytesElementReader(scoped_ptr<net::UploadElement> element)
|
||||||
|
: net::UploadBytesElementReader(element->bytes(),
|
||||||
|
element->bytes_length()),
|
||||||
|
element_(element.Pass()) {
|
||||||
|
DCHECK_EQ(net::UploadElement::TYPE_BYTES, element_->type());
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual ~BytesElementReader() {}
|
||||||
|
|
||||||
|
private:
|
||||||
|
scoped_ptr<net::UploadElement> element_;
|
||||||
|
|
||||||
|
DISALLOW_COPY_AND_ASSIGN(BytesElementReader);
|
||||||
|
};
|
||||||
|
|
||||||
|
// A subclass of net::UploadFileElementReader that keeps the associated
|
||||||
|
// UploadElement alive until the request completes.
|
||||||
|
class FileElementReader : public net::UploadFileElementReader {
|
||||||
|
public:
|
||||||
|
explicit FileElementReader(scoped_ptr<net::UploadElement> element)
|
||||||
|
: net::UploadFileElementReader(
|
||||||
|
element->file_path(),
|
||||||
|
element->file_range_offset(),
|
||||||
|
element->file_range_length(),
|
||||||
|
element->expected_file_modification_time()),
|
||||||
|
element_(element.Pass()) {
|
||||||
|
DCHECK_EQ(net::UploadElement::TYPE_FILE, element_->type());
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual ~FileElementReader() {}
|
||||||
|
|
||||||
|
private:
|
||||||
|
scoped_ptr<net::UploadElement> element_;
|
||||||
|
|
||||||
|
DISALLOW_COPY_AND_ASSIGN(FileElementReader);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
|
||||||
CefRefPtr<CefRequest> CefRequest::CreateRequest() {
|
CefRefPtr<CefRequest> CefRequest::CreateRequest() {
|
||||||
CefRefPtr<CefRequest> request(new CefRequestImpl());
|
CefRefPtr<CefRequest> request(new CefRequestImpl());
|
||||||
return request;
|
return request;
|
||||||
@@ -340,6 +386,19 @@ void CefPostDataImpl::Get(net::UploadData& data) {
|
|||||||
data.swap_elements(&data_elements);
|
data.swap_elements(&data_elements);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
net::UploadDataStream* CefPostDataImpl::Get() {
|
||||||
|
AutoLock lock_scope(this);
|
||||||
|
|
||||||
|
ScopedVector<net::UploadElementReader> element_readers;
|
||||||
|
ElementVector::const_iterator it = elements_.begin();
|
||||||
|
for (; it != elements_.end(); ++it) {
|
||||||
|
element_readers.push_back(
|
||||||
|
static_cast<CefPostDataElementImpl*>(it->get())->Get());
|
||||||
|
}
|
||||||
|
|
||||||
|
return new net::UploadDataStream(&element_readers, 0);
|
||||||
|
}
|
||||||
|
|
||||||
void CefPostDataImpl::Set(const WebKit::WebHTTPBody& data) {
|
void CefPostDataImpl::Set(const WebKit::WebHTTPBody& data) {
|
||||||
AutoLock lock_scope(this);
|
AutoLock lock_scope(this);
|
||||||
|
|
||||||
@@ -504,6 +563,25 @@ void CefPostDataElementImpl::Get(net::UploadElement& element) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
net::UploadElementReader* CefPostDataElementImpl::Get() {
|
||||||
|
AutoLock lock_scope(this);
|
||||||
|
|
||||||
|
if (type_ == PDE_TYPE_BYTES) {
|
||||||
|
net::UploadElement* element = new net::UploadElement();
|
||||||
|
element->SetToBytes(static_cast<char*>(data_.bytes.bytes),
|
||||||
|
data_.bytes.size);
|
||||||
|
return new BytesElementReader(make_scoped_ptr(element));
|
||||||
|
} else if (type_ == PDE_TYPE_FILE) {
|
||||||
|
net::UploadElement* element = new net::UploadElement();
|
||||||
|
FilePath path = FilePath(CefString(&data_.filename));
|
||||||
|
element->SetToFilePath(path);
|
||||||
|
return new FileElementReader(make_scoped_ptr(element));
|
||||||
|
} else {
|
||||||
|
NOTREACHED();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CefPostDataElementImpl::Set(const WebKit::WebHTTPBody::Element& element) {
|
void CefPostDataElementImpl::Set(const WebKit::WebHTTPBody::Element& element) {
|
||||||
AutoLock lock_scope(this);
|
AutoLock lock_scope(this);
|
||||||
|
|
||||||
|
@@ -85,6 +85,7 @@ class CefPostDataImpl : public CefPostData {
|
|||||||
void Set(const net::UploadData& data);
|
void Set(const net::UploadData& data);
|
||||||
void Set(const net::UploadDataStream& data_stream);
|
void Set(const net::UploadDataStream& data_stream);
|
||||||
void Get(net::UploadData& data);
|
void Get(net::UploadData& data);
|
||||||
|
net::UploadDataStream* Get();
|
||||||
void Set(const WebKit::WebHTTPBody& data);
|
void Set(const WebKit::WebHTTPBody& data);
|
||||||
void Get(WebKit::WebHTTPBody& data);
|
void Get(WebKit::WebHTTPBody& data);
|
||||||
|
|
||||||
@@ -114,6 +115,7 @@ class CefPostDataElementImpl : public CefPostDataElement {
|
|||||||
void Set(const net::UploadElement& element);
|
void Set(const net::UploadElement& element);
|
||||||
void Set(const net::UploadElementReader& element_reader);
|
void Set(const net::UploadElementReader& element_reader);
|
||||||
void Get(net::UploadElement& element);
|
void Get(net::UploadElement& element);
|
||||||
|
net::UploadElementReader* Get();
|
||||||
void Set(const WebKit::WebHTTPBody::Element& element);
|
void Set(const WebKit::WebHTTPBody::Element& element);
|
||||||
void Get(WebKit::WebHTTPBody::Element& element);
|
void Get(WebKit::WebHTTPBody::Element& element);
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
Index: page/FrameView.cpp
|
Index: page/FrameView.cpp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- page/FrameView.cpp (revision 134630)
|
--- page/FrameView.cpp (revision 137939)
|
||||||
+++ page/FrameView.cpp (working copy)
|
+++ page/FrameView.cpp (working copy)
|
||||||
@@ -206,10 +206,12 @@
|
@@ -209,10 +209,12 @@
|
||||||
if (!page)
|
if (!page)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ Index: page/FrameView.cpp
|
|||||||
PassRefPtr<FrameView> FrameView::create(Frame* frame)
|
PassRefPtr<FrameView> FrameView::create(Frame* frame)
|
||||||
Index: platform/mac/NSScrollerImpDetails.mm
|
Index: platform/mac/NSScrollerImpDetails.mm
|
||||||
===================================================================
|
===================================================================
|
||||||
--- platform/mac/NSScrollerImpDetails.mm (revision 134630)
|
--- platform/mac/NSScrollerImpDetails.mm (revision 137939)
|
||||||
+++ platform/mac/NSScrollerImpDetails.mm (working copy)
|
+++ platform/mac/NSScrollerImpDetails.mm (working copy)
|
||||||
@@ -34,6 +34,7 @@
|
@@ -34,6 +34,7 @@
|
||||||
#if PLATFORM(CHROMIUM)
|
#if PLATFORM(CHROMIUM)
|
||||||
|
@@ -103,6 +103,11 @@ class TestSchemeHandler : public TestHandler {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!test_results_->redirect_url.empty() &&
|
||||||
|
newUrl == test_results_->redirect_url) {
|
||||||
|
EXPECT_TRUE(isRedirect);
|
||||||
|
}
|
||||||
|
|
||||||
if (isRedirect) {
|
if (isRedirect) {
|
||||||
test_results_->got_redirect.yes();
|
test_results_->got_redirect.yes();
|
||||||
EXPECT_EQ(newUrl, test_results_->redirect_url);
|
EXPECT_EQ(newUrl, test_results_->redirect_url);
|
||||||
|
Reference in New Issue
Block a user