Update to Chromium revision 149431.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@731 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2012-08-07 13:58:35 +00:00
parent b39ca211ae
commit 3b8ebef27b
27 changed files with 198 additions and 130 deletions

View File

@ -17,5 +17,5 @@
{
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
'chromium_revision': '142910',
'chromium_revision': '149431',
}

View File

@ -177,7 +177,7 @@
'pak_inputs': [
'<(grit_out_dir)/devtools_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak',
],
@ -257,7 +257,7 @@
'pak_inputs': [
'<(grit_out_dir)/devtools_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak',
],
@ -391,7 +391,7 @@
'pak_inputs': [
'<(grit_out_dir)/devtools_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak',
],
@ -454,7 +454,7 @@
'<(DEPTH)/third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore',
'<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
'<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
'<(DEPTH)/ui/ui.gyp:ui_resources_standard',
'<(DEPTH)/ui/ui.gyp:ui_resources',
'<(DEPTH)/ui/ui.gyp:ui',
'<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
'<(DEPTH)/webkit/support/webkit_support.gyp:appcache',
@ -639,7 +639,7 @@
'<(DEPTH)/third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore',
'<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
'<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
'<(DEPTH)/ui/ui.gyp:ui_resources_standard',
'<(DEPTH)/ui/ui.gyp:ui_resources',
'<(DEPTH)/ui/ui.gyp:ui',
'<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
'<(DEPTH)/webkit/support/webkit_support.gyp:appcache',

View File

@ -99,7 +99,7 @@ BrowserDomStorageSystem::NamespaceImpl::~NamespaceImpl() {
namespace_id_ == kInvalidNamespaceId || !Context()) {
return;
}
Context()->DeleteSessionNamespace(namespace_id_);
Context()->DeleteSessionNamespace(namespace_id_, false);
}
WebStorageArea* BrowserDomStorageSystem::NamespaceImpl::createStorageArea(

View File

@ -23,6 +23,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
#include "webkit/blob/blob_storage_controller.h"
#include "webkit/fileapi/file_system_url.h"
#include "webkit/fileapi/file_system_util.h"
#include "webkit/fileapi/mock_file_system_options.h"
#include "webkit/glue/webkit_glue.h"
@ -43,6 +44,7 @@ using WebKit::WebVector;
using webkit_blob::BlobData;
using webkit_blob::BlobStorageController;
using fileapi::FileSystemURL;
using fileapi::FileSystemContext;
using fileapi::FileSystemOperationInterface;
@ -129,58 +131,112 @@ void BrowserFileSystem::OpenFileSystem(
void BrowserFileSystem::move(
const WebURL& src_path,
const WebURL& dest_path, WebFileSystemCallbacks* callbacks) {
GetNewOperation(src_path)->Move(GURL(src_path), GURL(dest_path),
FinishHandler(callbacks));
FileSystemURL src_url(src_path);
FileSystemURL dest_url(dest_path);
if (!HasFilePermission(src_url, FILE_PERMISSION_WRITE) ||
!HasFilePermission(dest_url, FILE_PERMISSION_CREATE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
}
GetNewOperation(src_url)->Move(src_url, dest_url,
FinishHandler(callbacks));
}
void BrowserFileSystem::copy(
const WebURL& src_path, const WebURL& dest_path,
WebFileSystemCallbacks* callbacks) {
GetNewOperation(src_path)->Copy(GURL(src_path), GURL(dest_path),
FinishHandler(callbacks));
FileSystemURL src_url(src_path);
FileSystemURL dest_url(dest_path);
if (!HasFilePermission(src_url, FILE_PERMISSION_READ) ||
!HasFilePermission(dest_url, FILE_PERMISSION_CREATE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
}
GetNewOperation(src_url)->Copy(src_url, dest_url,
FinishHandler(callbacks));
}
void BrowserFileSystem::remove(
const WebURL& path, WebFileSystemCallbacks* callbacks) {
GetNewOperation(path)->Remove(path, false /* recursive */,
FinishHandler(callbacks));
FileSystemURL url(path);
if (!HasFilePermission(url, FILE_PERMISSION_WRITE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
}
GetNewOperation(url)->Remove(url, false /* recursive */,
FinishHandler(callbacks));
}
void BrowserFileSystem::removeRecursively(
const WebURL& path, WebFileSystemCallbacks* callbacks) {
GetNewOperation(path)->Remove(path, true /* recursive */,
FinishHandler(callbacks));
FileSystemURL url(path);
if (!HasFilePermission(url, FILE_PERMISSION_WRITE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
}
GetNewOperation(url)->Remove(url, true /* recursive */,
FinishHandler(callbacks));
}
void BrowserFileSystem::readMetadata(
const WebURL& path, WebFileSystemCallbacks* callbacks) {
GetNewOperation(path)->GetMetadata(path, GetMetadataHandler(callbacks));
FileSystemURL url(path);
if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
}
GetNewOperation(url)->GetMetadata(url, GetMetadataHandler(callbacks));
}
void BrowserFileSystem::createFile(
const WebURL& path, bool exclusive, WebFileSystemCallbacks* callbacks) {
GetNewOperation(path)->CreateFile(path, exclusive, FinishHandler(callbacks));
FileSystemURL url(path);
if (!HasFilePermission(url, FILE_PERMISSION_CREATE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
}
GetNewOperation(url)->CreateFile(url, exclusive, FinishHandler(callbacks));
}
void BrowserFileSystem::createDirectory(
const WebURL& path, bool exclusive, WebFileSystemCallbacks* callbacks) {
GetNewOperation(path)->CreateDirectory(path, exclusive, false,
FinishHandler(callbacks));
FileSystemURL url(path);
if (!HasFilePermission(url, FILE_PERMISSION_CREATE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
}
GetNewOperation(url)->CreateDirectory(url, exclusive, false,
FinishHandler(callbacks));
}
void BrowserFileSystem::fileExists(
const WebURL& path, WebFileSystemCallbacks* callbacks) {
GetNewOperation(path)->FileExists(path, FinishHandler(callbacks));
FileSystemURL url(path);
if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
}
GetNewOperation(url)->FileExists(url, FinishHandler(callbacks));
}
void BrowserFileSystem::directoryExists(
const WebURL& path, WebFileSystemCallbacks* callbacks) {
GetNewOperation(path)->DirectoryExists(path, FinishHandler(callbacks));
FileSystemURL url(path);
if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
}
GetNewOperation(url)->DirectoryExists(url, FinishHandler(callbacks));
}
void BrowserFileSystem::readDirectory(
const WebURL& path, WebFileSystemCallbacks* callbacks) {
GetNewOperation(path)->ReadDirectory(path, ReadDirectoryHandler(callbacks));
FileSystemURL url(path);
if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
}
GetNewOperation(url)->ReadDirectory(url, ReadDirectoryHandler(callbacks));
}
WebFileWriter* BrowserFileSystem::createFileWriter(
@ -192,8 +248,13 @@ void BrowserFileSystem::createSnapshotFileAndReadMetadata(
const WebURL& blobURL,
const WebURL& path,
WebFileSystemCallbacks* callbacks) {
GetNewOperation(path)->CreateSnapshotFile(
path, SnapshotFileHandler(blobURL, callbacks));
FileSystemURL url(path);
if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
}
GetNewOperation(url)->CreateSnapshotFile(
url, SnapshotFileHandler(blobURL, callbacks));
}
// static
@ -209,9 +270,16 @@ void BrowserFileSystem::CleanupOnIOThread() {
g_blob_storage_controller = NULL;
}
bool BrowserFileSystem::HasFilePermission(
const fileapi::FileSystemURL& url, FilePermission permission) {
// Disallow writing on isolated file system, otherwise return ok.
return (url.type() != fileapi::kFileSystemTypeIsolated ||
permission == FILE_PERMISSION_READ);
}
FileSystemOperationInterface* BrowserFileSystem::GetNewOperation(
const WebURL& url) {
return file_system_context_->CreateFileSystemOperation(GURL(url));
const fileapi::FileSystemURL& url) {
return file_system_context_->CreateFileSystemOperation(url);
}
FileSystemOperationInterface::StatusCallback

View File

@ -25,6 +25,7 @@ class WebURL;
namespace fileapi {
class FileSystemContext;
class FileSystemURL;
}
namespace webkit_blob {
@ -97,9 +98,17 @@ class BrowserFileSystem
static void CleanupOnIOThread();
private:
enum FilePermission {
FILE_PERMISSION_READ,
FILE_PERMISSION_WRITE,
FILE_PERMISSION_CREATE,
};
// Helpers.
bool HasFilePermission(const fileapi::FileSystemURL& url,
FilePermission permission);
fileapi::FileSystemOperationInterface* GetNewOperation(
const WebKit::WebURL& path);
const fileapi::FileSystemURL& url);
// Callback Handlers
fileapi::FileSystemOperationInterface::StatusCallback FinishHandler(

View File

@ -6,13 +6,17 @@
#include "libcef/cef_thread.h"
#include "base/bind.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/message_loop_proxy.h"
#include "net/url_request/url_request_context.h"
#include "webkit/fileapi/file_system_context.h"
#include "webkit/fileapi/file_system_operation_interface.h"
#include "webkit/fileapi/file_system_types.h"
#include "webkit/fileapi/file_system_url.h"
#include "webkit/glue/webkit_glue.h"
using fileapi::FileSystemURL;
using fileapi::FileSystemContext;
using fileapi::FileSystemOperationInterface;
using fileapi::WebFileWriterBase;
@ -37,30 +41,34 @@ class BrowserFileWriter::IOThreadProxy
main_thread_ = base::MessageLoopProxy::current();
}
void Truncate(const GURL& path, int64 offset) {
void Truncate(const FileSystemURL& url, int64 offset) {
if (!io_thread_->BelongsToCurrentThread()) {
io_thread_->PostTask(
FROM_HERE,
base::Bind(&IOThreadProxy::Truncate, this, path, offset));
base::Bind(&IOThreadProxy::Truncate, this, url, offset));
return;
}
if (FailIfNotWritable(url))
return;
DCHECK(!operation_);
operation_ = GetNewOperation(path);
operation_->Truncate(path, offset,
operation_ = GetNewOperation(url);
operation_->Truncate(url, offset,
base::Bind(&IOThreadProxy::DidFinish, this));
}
void Write(const GURL& path, const GURL& blob_url, int64 offset) {
void Write(const FileSystemURL& url, const GURL& blob_url, int64 offset) {
if (!io_thread_->BelongsToCurrentThread()) {
io_thread_->PostTask(
FROM_HERE,
base::Bind(&IOThreadProxy::Write, this, path, blob_url, offset));
base::Bind(&IOThreadProxy::Write, this, url, blob_url, offset));
return;
}
if (FailIfNotWritable(url))
return;
DCHECK(request_context_);
DCHECK(!operation_);
operation_ = GetNewOperation(path);
operation_->Write(request_context_, path, blob_url, offset,
operation_ = GetNewOperation(url);
operation_->Write(request_context_, url, blob_url, offset,
base::Bind(&IOThreadProxy::DidWrite, this));
}
@ -82,8 +90,18 @@ class BrowserFileWriter::IOThreadProxy
friend class base::RefCountedThreadSafe<IOThreadProxy>;
virtual ~IOThreadProxy() {}
FileSystemOperationInterface* GetNewOperation(const GURL& path) {
return file_system_context_->CreateFileSystemOperation(path);
FileSystemOperationInterface* GetNewOperation( const FileSystemURL& url) {
return file_system_context_->CreateFileSystemOperation(url);
}
// Returns true if it is not writable.
bool FailIfNotWritable(const FileSystemURL& url) {
if (url.type() == fileapi::kFileSystemTypeIsolated) {
// Write is not allowed in isolate file system in BrowserFileWriter.
DidFailOnMainThread(base::PLATFORM_FILE_ERROR_SECURITY);
return true;
}
return false;
}
void DidSucceedOnMainThread() {
@ -169,12 +187,14 @@ BrowserFileWriter::~BrowserFileWriter() {
}
void BrowserFileWriter::DoTruncate(const GURL& path, int64 offset) {
io_thread_proxy_->Truncate(path, offset);
FileSystemURL url(path);
io_thread_proxy_->Truncate(url, offset);
}
void BrowserFileWriter::DoWrite(
const GURL& path, const GURL& blob_url, int64 offset) {
io_thread_proxy_->Write(path, blob_url, offset);
FileSystemURL url(path);
io_thread_proxy_->Write(url, blob_url, offset);
}
void BrowserFileWriter::DoCancel() {

View File

@ -115,3 +115,8 @@ int BrowserNetworkDelegate::OnBeforeSocketStreamConnect(
const net::CompletionCallback& callback) {
return net::OK;
}
void BrowserNetworkDelegate::OnCacheWaitStateChange(
const net::URLRequest& request,
CacheWaitState state) {
}

View File

@ -56,6 +56,8 @@ class BrowserNetworkDelegate : public net::NetworkDelegate {
virtual int OnBeforeSocketStreamConnect(
net::SocketStream* stream,
const net::CompletionCallback& callback) OVERRIDE;
virtual void OnCacheWaitStateChange(const net::URLRequest& request,
CacheWaitState state) OVERRIDE;
bool accept_all_cookies_;
};

View File

@ -580,7 +580,10 @@ class RequestProxy : public net::URLRequest::Delegate,
ResolveBlobReferencesInUploadData(params->upload.get());
}
request_.reset(new net::URLRequest(params->url, this));
net::URLRequestContext* context = browser_.get() ?
browser_->request_context_proxy() : _Context->request_context();
request_.reset(new net::URLRequest(params->url, this, context));
request_->set_priority(params->priority);
request_->set_method(params->method);
request_->set_first_party_for_cookies(params->first_party_for_cookies);
@ -592,8 +595,6 @@ class RequestProxy : public net::URLRequest::Delegate,
request_->SetExtraRequestHeaders(headers);
request_->set_load_flags(params->load_flags);
request_->set_upload(params->upload.get());
request_->set_context(browser_.get() ? browser_->request_context_proxy() :
_Context->request_context());
request_->SetUserData(kCefUserData,
new ExtraRequestInfo(browser_.get(), params->request_type));
BrowserAppCacheSystem::SetExtraRequestInfo(
@ -874,7 +875,7 @@ class RequestProxy : public net::URLRequest::Delegate,
// GetContentLengthSync() may perform file IO, but it's ok here, as file
// IO is not prohibited in IOThread defined in the file.
uint64 size = request_->get_upload()->GetContentLengthSync();
uint64 size = request_->get_upload_mutable()->GetContentLengthSync();
uint64 position = request_->GetUploadProgress();
if (position == last_upload_position_)
return; // no progress made since last time

View File

@ -150,13 +150,10 @@ WebKit::WebGraphicsContext3D* CreateGraphicsContext3D(
#endif
if (use_command_buffer) {
WebKit::WebGraphicsContext3D* view_context = NULL;
if (!renderDirectlyToWebView)
view_context = web_view->graphicsContext3D();
scoped_ptr<webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl>
context(
new webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl());
if (!context->Initialize(attributes, view_context))
if (!context->Initialize(attributes, NULL))
return NULL;
return context.release();
} else {

View File

@ -706,6 +706,7 @@ WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer(
base::WeakPtr<webkit_media::WebMediaPlayerDelegate>(),
collection.release(),
NULL,
NULL,
message_loop_factory.release(),
NULL,
new media::MediaLog());

View File

@ -422,7 +422,7 @@ void CefContext::InitializeResourceBundle() {
if (file_util::PathExists(pak_file)) {
resource_bundle_delegate_->set_allow_pack_file_load(true);
ResourceBundle::GetSharedInstance().AddDataPack(
ResourceBundle::GetSharedInstance().AddDataPackFromPath(
pak_file, ui::SCALE_FACTOR_NONE);
resource_bundle_delegate_->set_allow_pack_file_load(false);
} else {

View File

@ -22,8 +22,9 @@ class CefMessageLoopForUI : public MessageLoopForUI {
#if defined(OS_MACOSX)
virtual ~CefMessageLoopForUI() {
// On Mac the MessageLoop::AutoRunState scope in Run() never exits so clear
// the state_ variable to avoid an assertion in the MessageLoop destructor.
state_ = NULL;
// the run_loop_ variable to avoid an assertion in the MessageLoop
// destructor.
run_loop_ = NULL;
}
#endif
@ -43,11 +44,7 @@ class CefMessageLoopForUI : public MessageLoopForUI {
// Do a single interation of the UI message loop.
void DoMessageLoopIteration() {
#if defined(OS_MACOSX)
Run();
#else
RunWithDispatcher(NULL);
#endif
}
// Run the UI message loop.

View File

@ -31,12 +31,6 @@ class CefThreadMessageLoopProxy : public MessageLoopProxy {
}
// TaskRunner implementation.
virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
const base::Closure& task,
int64 delay_ms) OVERRIDE {
return CefThread::PostDelayedTask(id_, from_here, task, delay_ms);
}
virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
const base::Closure& task,
base::TimeDelta delay) OVERRIDE {
@ -44,14 +38,6 @@ class CefThreadMessageLoopProxy : public MessageLoopProxy {
}
// SequencedTaskRunner implementation.
virtual bool PostNonNestableDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& task,
int64 delay_ms) OVERRIDE {
return CefThread::PostNonNestableDelayedTask(id_, from_here, task,
delay_ms);
}
virtual bool PostNonNestableDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& task,
@ -153,15 +139,7 @@ bool CefThread::CurrentlyOn(ID identifier) {
bool CefThread::PostTask(ID identifier,
const tracked_objects::Location& from_here,
const base::Closure& task) {
return PostTaskHelper(identifier, from_here, task, 0, true);
}
// static
bool CefThread::PostDelayedTask(ID identifier,
const tracked_objects::Location& from_here,
const base::Closure& task,
int64 delay_ms) {
return PostTaskHelper(identifier, from_here, task, delay_ms, true);
return PostTaskHelper(identifier, from_here, task, base::TimeDelta(), true);
}
// static
@ -169,8 +147,7 @@ bool CefThread::PostDelayedTask(ID identifier,
const tracked_objects::Location& from_here,
const base::Closure& task,
base::TimeDelta delay) {
return PostTaskHelper(identifier, from_here, task, delay.InMilliseconds(),
true);
return PostTaskHelper(identifier, from_here, task, delay, true);
}
// static
@ -178,16 +155,7 @@ bool CefThread::PostNonNestableTask(
ID identifier,
const tracked_objects::Location& from_here,
const base::Closure& task) {
return PostTaskHelper(identifier, from_here, task, 0, false);
}
// static
bool CefThread::PostNonNestableDelayedTask(
ID identifier,
const tracked_objects::Location& from_here,
const base::Closure& task,
int64 delay_ms) {
return PostTaskHelper(identifier, from_here, task, delay_ms, false);
return PostTaskHelper(identifier, from_here, task, base::TimeDelta(), false);
}
// static
@ -196,8 +164,7 @@ bool CefThread::PostNonNestableDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& task,
base::TimeDelta delay) {
return PostTaskHelper(identifier, from_here, task, delay.InMilliseconds(),
false);
return PostTaskHelper(identifier, from_here, task, delay, false);
}
// static
@ -227,7 +194,7 @@ bool CefThread::PostTaskHelper(
ID identifier,
const tracked_objects::Location& from_here,
const base::Closure& task,
int64 delay_ms,
base::TimeDelta delay,
bool nestable) {
DCHECK(identifier >= 0 && identifier < ID_COUNT);
// Optimization: to avoid unnecessary locks, we listed the ID enumeration in
@ -248,9 +215,9 @@ bool CefThread::PostTaskHelper(
cef_threads_[identifier]->message_loop() : NULL;
if (message_loop) {
if (nestable) {
message_loop->PostDelayedTask(from_here, task, delay_ms);
message_loop->PostDelayedTask(from_here, task, delay);
} else {
message_loop->PostNonNestableDelayedTask(from_here, task, delay_ms);
message_loop->PostNonNestableDelayedTask(from_here, task, delay);
}
}

View File

@ -78,10 +78,6 @@ class CefThread : public base::Thread {
static bool PostTask(ID identifier,
const tracked_objects::Location& from_here,
const base::Closure& task);
static bool PostDelayedTask(ID identifier,
const tracked_objects::Location& from_here,
const base::Closure& task,
int64 delay_ms);
static bool PostDelayedTask(ID identifier,
const tracked_objects::Location& from_here,
const base::Closure& task,
@ -89,11 +85,6 @@ class CefThread : public base::Thread {
static bool PostNonNestableTask(ID identifier,
const tracked_objects::Location& from_here,
const base::Closure& task);
static bool PostNonNestableDelayedTask(
ID identifier,
const tracked_objects::Location& from_here,
const base::Closure& task,
int64 delay_ms);
static bool PostNonNestableDelayedTask(
ID identifier,
const tracked_objects::Location& from_here,
@ -179,7 +170,7 @@ class CefThread : public base::Thread {
ID identifier,
const tracked_objects::Location& from_here,
const base::Closure& task,
int64 delay_ms,
base::TimeDelta delay,
bool nestable);
// The identifier of this thread. Only one thread can exist with a given

View File

@ -33,7 +33,7 @@ class VisitCookiesCallback : public base::RefCounted<VisitCookiesCallback> {
net::CookieList::const_iterator it = list.begin();
for (; it != list.end(); ++it, ++count) {
CefCookie cookie;
const net::CookieMonster::CanonicalCookie& cc = *(it);
const net::CanonicalCookie& cc = *(it);
CefString(&cookie.name).FromString(cc.Name());
CefString(&cookie.value).FromString(cc.Value());
@ -43,7 +43,7 @@ class VisitCookiesCallback : public base::RefCounted<VisitCookiesCallback> {
cookie.httponly = cc.IsHttpOnly();
cef_time_from_basetime(cc.CreationDate(), cookie.creation);
cef_time_from_basetime(cc.LastAccessDate(), cookie.last_access);
cookie.has_expires = cc.DoesExpire();
cookie.has_expires = cc.IsPersistent();
if (cookie.has_expires)
cef_time_from_basetime(cc.ExpiryDate(), cookie.expires);

View File

@ -103,7 +103,7 @@ void CefRequestImpl::Set(net::URLRequest* request) {
GetHeaderMap(headers, headermap_);
// Transfer post data, if any
net::UploadData* data = request->get_upload();
const net::UploadData* data = request->get_upload();
if (data) {
postdata_ = CefPostData::CreatePostData();
static_cast<CefPostDataImpl*>(postdata_.get())->Set(*data);
@ -291,12 +291,12 @@ void CefPostDataImpl::RemoveElements() {
elements_.clear();
}
void CefPostDataImpl::Set(net::UploadData& data) {
void CefPostDataImpl::Set(const net::UploadData& data) {
AutoLock lock_scope(this);
CefRefPtr<CefPostDataElement> postelem;
std::vector<net::UploadData::Element>* elements = data.elements();
const std::vector<net::UploadData::Element>* elements = data.elements();
std::vector<net::UploadData::Element>::const_iterator it = elements->begin();
for (; it != elements->end(); ++it) {
postelem = CefPostDataElement::CreatePostDataElement();

View File

@ -76,7 +76,7 @@ class CefPostDataImpl : public CefPostData {
virtual bool AddElement(CefRefPtr<CefPostDataElement> element) OVERRIDE;
virtual void RemoveElements();
void Set(net::UploadData& data);
void Set(const net::UploadData& data);
void Get(net::UploadData& data);
void Set(const WebKit::WebHTTPBody& data);
void Get(WebKit::WebHTTPBody& data);

View File

@ -107,7 +107,7 @@ class CefUrlRequestJob : public net::URLRequestJob {
public:
CefUrlRequestJob(net::URLRequest* request,
CefRefPtr<CefSchemeHandler> handler)
: net::URLRequestJob(request),
: net::URLRequestJob(request, request->context()->network_delegate()),
handler_(handler),
remaining_bytes_(0),
response_cookies_save_index_(0),

View File

@ -44,5 +44,6 @@ bool CefPostDelayedTask(CefThreadId threadId, CefRefPtr<CefTask> task,
return false;
return CefThread::PostDelayedTask(static_cast<CefThread::ID>(id), FROM_HERE,
base::Bind(&CefTask::Execute, task, threadId), delay_ms);
base::Bind(&CefTask::Execute, task, threadId),
base::TimeDelta::FromMilliseconds(delay_ms));
}

View File

@ -571,7 +571,7 @@ bool CefV8ContextImpl::IsSame(CefRefPtr<CefV8Context> that) {
bool CefV8ContextImpl::Eval(const CefString& code,
CefRefPtr<CefV8Value>& retval,
CefRefPtr<CefV8Exception>& exception) {
CEF_REQUIRE_UI_THREAD(NULL);
CEF_REQUIRE_UI_THREAD(false);
if (code.empty()) {
NOTREACHED() << "invalid input parameter";
@ -969,8 +969,8 @@ CefRefPtr<CefV8Exception> CefV8ValueImpl::GetException() {
}
bool CefV8ValueImpl::ClearException() {
CEF_REQUIRE_UI_THREAD(NULL);
CEF_V8_REQUIRE_OBJECT_RETURN(NULL);
CEF_REQUIRE_UI_THREAD(false);
CEF_V8_REQUIRE_OBJECT_RETURN(false);
last_exception_ = NULL;
return true;

View File

@ -126,7 +126,8 @@ bool WebDropTarget::OnDragMove(GtkWidget* widget, GdkDragContext* context,
} else if (data_requests_ == 0) {
operation = webview->dragTargetDragOver(WebPoint(x, y),
WebPoint(widget_x, widget_y),
_mask(context));
_mask(context),
0);
gdk_drag_status(context,
(GdkDragAction)DragDropTypes::DragOperationToGdkDragAction(operation),
time);
@ -162,7 +163,8 @@ bool WebDropTarget::OnDragDrop(GtkWidget* widget, GdkDragContext* context,
if (browser_->UIT_GetWebView()) {
browser_->UIT_GetWebView()->dragTargetDrop(
WebPoint(x, y),
WebPoint(widget_x, widget_y));
WebPoint(widget_x, widget_y),
0);
}
browser_->set_is_dropping(false);
context_ = NULL;
@ -260,7 +262,8 @@ void WebDropTarget::OnDragDataReceived(GtkWidget* widget,
operation = webview->dragTargetDragEnter(drop_data_->ToDragData(),
WebPoint(x, y),
WebPoint(widget_x, widget_y),
_mask(context));
_mask(context),
0);
gdk_drag_status(context,
(GdkDragAction)DragDropTypes::DragOperationToGdkDragAction(operation),
time);

View File

@ -119,7 +119,8 @@ using WebKit::WebView;
webview->dragTargetDragEnter(drop_data.ToDragData(),
WebPoint(viewPoint.x, viewPoint.y),
WebPoint(screenPoint.x, screenPoint.y),
static_cast<WebDragOperationsMask>(mask));
static_cast<WebDragOperationsMask>(mask),
0);
return static_cast<NSDragOperation>(op);
}
@ -164,7 +165,8 @@ using WebKit::WebView;
WebDragOperation op =
webview->dragTargetDragOver(WebPoint(viewPoint.x, viewPoint.y),
WebPoint(screenPoint.x, screenPoint.y),
static_cast<WebDragOperationsMask>(mask));
static_cast<WebDragOperationsMask>(mask),
0);
return static_cast<NSDragOperation>(op);
}
@ -198,7 +200,8 @@ using WebKit::WebView;
view_.browser->set_is_dropping(true);
webview->dragTargetDrop(gfx::Point(viewPoint.x, viewPoint.y),
gfx::Point(screenPoint.x, screenPoint.y));
gfx::Point(screenPoint.x, screenPoint.y),
0);
view_.browser->set_is_dropping(false);
return YES;

View File

@ -110,7 +110,8 @@ DWORD WebDropTarget::OnDragEnter(IDataObject* data_object,
drop_data.ToDragData(),
WebPoint(client_pt.x, client_pt.y),
WebPoint(cursor_position.x, cursor_position.y),
mask);
mask,
0);
} else {
operation = WebDragOperationNone;
}
@ -136,7 +137,8 @@ DWORD WebDropTarget::OnDragOver(IDataObject* data_object,
operation = browser_->UIT_GetWebView()->dragTargetDragOver(
WebPoint(client_pt.x, client_pt.y),
WebPoint(cursor_position.x, cursor_position.y),
web_drag_utils_win::WinDragOpMaskToWebDragOpMask(effects));
web_drag_utils_win::WinDragOpMaskToWebDragOpMask(effects),
0);
} else {
operation = WebDragOperationNone;
}
@ -171,7 +173,8 @@ DWORD WebDropTarget::OnDrop(IDataObject* data_object,
if (browser_->UIT_GetWebView()) {
browser_->UIT_GetWebView()->dragTargetDrop(
WebPoint(client_pt.x, client_pt.y),
WebPoint(cursor_position.x, cursor_position.y));
WebPoint(cursor_position.x, cursor_position.y),
0);
}
browser_->set_is_dropping(false);

View File

@ -33,7 +33,7 @@ void WebWidgetHost::ScheduleComposite() {
// Maintain the desired rate.
MessageLoop::current()->PostDelayedTask(FROM_HERE,
base::Bind(&WebWidgetHost::Invalidate, weak_factory_.GetWeakPtr()),
kDesiredRate - actualRate);
base::TimeDelta::FromMilliseconds(kDesiredRate - actualRate));
}
}

View File

@ -283,7 +283,7 @@ void WebWidgetHost::DidInvalidateRect(const gfx::Rect& damaged_rect) {
CefThread::PostDelayedTask(CefThread::UI, FROM_HERE,
base::Bind(&WebWidgetHost::UpdateInputMethod,
weak_factory_.GetWeakPtr()),
100);
base::TimeDelta::FromMilliseconds(100));
}
}

View File

@ -1,8 +1,8 @@
Index: message_loop.cc
===================================================================
--- message_loop.cc (revision 140240)
--- message_loop.cc (revision 149431)
+++ message_loop.cc (working copy)
@@ -369,9 +369,13 @@
@@ -364,9 +364,13 @@
}
void MessageLoop::AssertIdle() const {
@ -19,9 +19,9 @@ Index: message_loop.cc
bool MessageLoop::is_running() const {
Index: message_loop.h
===================================================================
--- message_loop.h (revision 140240)
--- message_loop.h (revision 149431)
+++ message_loop.h (working copy)
@@ -347,6 +347,9 @@
@@ -367,6 +367,9 @@
// Asserts that the MessageLoop is "idle".
void AssertIdle() const;