Update to Chromium revision 115322.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@435 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-12-21 18:35:55 +00:00
parent ec797bafe5
commit bdb588b77a
29 changed files with 119 additions and 75 deletions

View File

@@ -20,7 +20,7 @@
#include "base/utf_string_conversions.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPBody.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPBody.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h"

View File

@@ -14,7 +14,7 @@
#include "base/memory/ref_counted.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPBody.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPBody.h"
#include "include/cef.h"

View File

@@ -13,6 +13,7 @@
#include "base/basictypes.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
@@ -82,7 +83,7 @@ class BrowserPersistentCookieStore::Backend
void DeleteCookie(const net::CookieMonster::CanonicalCookie& cc);
// Commit pending operations as soon as possible.
void Flush(Task* completion_task);
void Flush(const base::Closure& callback);
// Commit any pending operations and close the database. This must be called
// before the object is destructed.
@@ -310,7 +311,9 @@ bool BrowserPersistentCookieStore::Backend::InitializeDatabase() {
DCHECK(CefThread::CurrentlyOn(CefThread::FILE));
if (initialized_) {
return true;
// Return false if we were previously initialized but the DB has since been
// closed.
return db_.get() ? true : false;
}
const FilePath dir = path_.DirName();
@@ -333,8 +336,6 @@ bool BrowserPersistentCookieStore::Backend::InitializeDatabase() {
return false;
}
db_->Preload();
// Retrieve all the domains
sql::Statement smt(db_->GetUniqueStatement(
"SELECT DISTINCT host_key FROM cookies"));
@@ -369,7 +370,10 @@ void BrowserPersistentCookieStore::Backend::ChainLoadCookies(
bool load_success = true;
if (keys_to_load_.size() > 0) {
if (!db_.get()) {
// Close() has been called on this store.
load_success = false;
} else if (keys_to_load_.size() > 0) {
// Load cookies for the first domain key.
std::map<std::string, std::set<std::string> >::iterator
it = keys_to_load_.begin();
@@ -398,19 +402,20 @@ bool BrowserPersistentCookieStore::Backend::LoadCookiesForDomains(
const std::set<std::string>& domains) {
DCHECK(CefThread::CurrentlyOn(CefThread::FILE));
const char* sql;
sql::Statement smt;
if (restore_old_session_cookies_) {
sql =
"SELECT creation_utc, host_key, name, value, path, expires_utc, "
"secure, httponly, last_access_utc, has_expires, persistent "
"FROM cookies WHERE host_key = ?";
smt.Assign(db_->GetCachedStatement(
SQL_FROM_HERE,
"SELECT creation_utc, host_key, name, value, path, expires_utc, "
"secure, httponly, last_access_utc, has_expires, persistent "
"FROM cookies WHERE host_key = ?"));
} else {
sql =
"SELECT creation_utc, host_key, name, value, path, expires_utc, "
"secure, httponly, last_access_utc, has_expires, persistent "
"FROM cookies WHERE host_key = ? AND persistent == 1";
smt.Assign(db_->GetCachedStatement(
SQL_FROM_HERE,
"SELECT creation_utc, host_key, name, value, path, expires_utc, "
"secure, httponly, last_access_utc, has_expires, persistent "
"FROM cookies WHERE host_key = ? AND persistent = 1"));
}
sql::Statement smt(db_->GetCachedStatement(SQL_FROM_HERE, sql));
if (!smt) {
NOTREACHED() << "select statement prep failed";
db_.reset();
@@ -681,20 +686,21 @@ void BrowserPersistentCookieStore::Backend::Commit() {
transaction.Commit();
}
void BrowserPersistentCookieStore::Backend::Flush(Task* completion_task) {
void BrowserPersistentCookieStore::Backend::Flush(
const base::Closure& callback) {
DCHECK(!CefThread::CurrentlyOn(CefThread::FILE));
CefThread::PostTask(
CefThread::FILE, FROM_HERE, base::Bind(&Backend::Commit, this));
if (completion_task) {
if (!callback.is_null()) {
// We want the completion task to run immediately after Commit() returns.
// Posting it from here means there is less chance of another task getting
// onto the message queue first, than if we posted it from Commit() itself.
CefThread::PostTask(CefThread::FILE, FROM_HERE, completion_task);
CefThread::PostTask(CefThread::FILE, FROM_HERE, callback);
}
}
// Fire off a close message to the background thread. We could still have a
// pending commit timer that will be holding a reference on us, but if/when
// pending commit timer or Load operations holding references on us, but if/when
// this fires we will already have been cleaned up and it will be ignored.
void BrowserPersistentCookieStore::Backend::Close() {
if (CefThread::CurrentlyOn(CefThread::FILE)) {
@@ -779,9 +785,9 @@ void BrowserPersistentCookieStore::SetClearLocalStateOnExit(
backend_->SetClearLocalStateOnExit(clear_local_state);
}
void BrowserPersistentCookieStore::Flush(Task* completion_task) {
void BrowserPersistentCookieStore::Flush(const base::Closure& callback) {
if (backend_.get())
backend_->Flush(completion_task);
else if (completion_task)
MessageLoop::current()->PostTask(FROM_HERE, completion_task);
backend_->Flush(callback);
else if (!callback.is_null())
MessageLoop::current()->PostTask(FROM_HERE, callback);
}

View File

@@ -49,7 +49,7 @@ class BrowserPersistentCookieStore
virtual void SetClearLocalStateOnExit(bool clear_local_state) OVERRIDE;
virtual void Flush(Task* completion_task) OVERRIDE;
virtual void Flush(const base::Closure& callback) OVERRIDE;
private:
class Backend;

View File

@@ -70,8 +70,8 @@ public:
virtual int GetProxyForURL(const GURL& url,
net::ProxyInfo* results,
net::OldCompletionCallback* callback,
ProxyResolver::RequestHandle* request,
const net::CompletionCallback& callback,
RequestHandle* request,
const net::BoundNetLog& net_log) OVERRIDE
{
CefProxyInfo proxy_info;
@@ -87,8 +87,8 @@ public:
}
virtual int SetPacScript(
const scoped_refptr<net::ProxyResolverScriptData>& script_data,
net::OldCompletionCallback* callback) OVERRIDE
const scoped_refptr<net::ProxyResolverScriptData>& pac_script,
const net::CompletionCallback& callback) OVERRIDE
{
return net::OK;
}
@@ -238,11 +238,18 @@ void BrowserRequestContext::Init(
cache_path, 0, BrowserResourceLoaderBridge::GetCacheThread());
net::HttpCache* cache =
new net::HttpCache(host_resolver(), cert_verifier(),
origin_bound_cert_service(), NULL, NULL,
proxy_service(), ssl_config_service(),
http_auth_handler_factory(), NULL,
http_server_properties(), NULL, backend);
new net::HttpCache(host_resolver(),
cert_verifier(),
origin_bound_cert_service(),
NULL, // transport_security_state
proxy_service(),
"", // ssl_session_cache_shard
ssl_config_service(),
http_auth_handler_factory(),
NULL, // network_delegate
http_server_properties(),
NULL, // netlog
backend);
cache->set_mode(cache_mode);
storage_.set_http_transaction_factory(cache);

View File

@@ -376,7 +376,7 @@ class RequestProxy : public net::URLRequest::Delegate,
void NotifyCompletedRequest(const net::URLRequestStatus& status,
const std::string& security_info,
const base::Time& complete_time) {
const base::TimeTicks& complete_time) {
// Drain the content filter of all remaining data
if (content_filter_.get()) {
@@ -503,7 +503,7 @@ class RequestProxy : public net::URLRequest::Delegate,
// cancel the resource load
OnCompletedRequest(
URLRequestStatus(URLRequestStatus::CANCELED, net::ERR_ABORTED),
std::string(), base::Time());
std::string(), base::TimeTicks());
} else if (!redirectUrl.empty()) {
// redirect to the specified URL
handled = true;
@@ -559,7 +559,7 @@ class RequestProxy : public net::URLRequest::Delegate,
if (handled) {
OnCompletedRequest(
URLRequestStatus(URLRequestStatus::HANDLED_EXTERNALLY, net::OK),
std::string(), base::Time());
std::string(), base::TimeTicks());
}
}
}
@@ -728,7 +728,7 @@ class RequestProxy : public net::URLRequest::Delegate,
virtual void OnCompletedRequest(const net::URLRequestStatus& status,
const std::string& security_info,
const base::Time& complete_time) {
const base::TimeTicks& complete_time) {
if (download_to_file_)
file_stream_.Close();
@@ -836,7 +836,7 @@ class RequestProxy : public net::URLRequest::Delegate,
if(resource_stream_.get()) {
// Resource stream reads always complete successfully
OnCompletedRequest(URLRequestStatus(URLRequestStatus::SUCCESS, 0),
std::string(), base::Time());
std::string(), base::TimeTicks());
resource_stream_ = NULL;
} else if(request_.get()) {
if (upload_progress_timer_.IsRunning()) {
@@ -844,7 +844,7 @@ class RequestProxy : public net::URLRequest::Delegate,
upload_progress_timer_.Stop();
}
DCHECK(request_.get());
OnCompletedRequest(request_->status(), std::string(), base::Time());
OnCompletedRequest(request_->status(), std::string(), base::TimeTicks());
request_.reset(); // destroy on the io thread
}
}
@@ -987,7 +987,7 @@ class SyncRequestProxy : public RequestProxy {
virtual void OnCompletedRequest(const net::URLRequestStatus& status,
const std::string& security_info,
const base::Time& complete_time) {
const base::TimeTicks& complete_time) {
if (download_to_file_)
file_stream_.Close();

View File

@@ -129,7 +129,8 @@ void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web)
web.accelerated_layers_enabled = !cef.accelerated_layers_disabled;
web.accelerated_video_enabled = !cef.accelerated_video_disabled;
web.accelerated_2d_canvas_enabled = !cef.accelerated_2d_canvas_disabled;
web.accelerated_drawing_enabled = !cef.accelerated_drawing_disabled;
web.accelerated_painting_enabled = !cef.accelerated_painting_disabled;
web.accelerated_filters_enabled = !cef.accelerated_filters_disabled;
web.accelerated_plugins_enabled = !cef.accelerated_plugins_disabled;
web.memory_info_enabled = false;
web.fullscreen_enabled = cef.fullscreen_enabled;

View File

@@ -7,7 +7,7 @@
#include "base/bind.h"
#include "base/message_loop.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebBlobData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
#include "webkit/blob/blob_data.h"
#include "webkit/blob/blob_storage_controller.h"

View File

@@ -16,6 +16,7 @@
#include "browser_webstoragenamespace_impl.h"
#include "browser_zoom_map.h"
#include "cef_context.h"
#include "cef_process_ui_thread.h"
#include "dom_document_impl.h"
#include "request_impl.h"
#include "v8_impl.h"
@@ -44,7 +45,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
@@ -636,7 +637,8 @@ WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer(
new media::FilterCollection());
// Add the audio renderer.
collection->AddAudioRenderer(new media::ReferenceAudioRenderer());
collection->AddAudioRenderer(new media::ReferenceAudioRenderer(
_Context->process()->ui_thread()->audio_manager()));
scoped_ptr<webkit_media::WebMediaPlayerImpl> result(
new webkit_media::WebMediaPlayerImpl(

View File

@@ -27,7 +27,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/gfx/gdi_util.h"

View File

@@ -206,6 +206,14 @@ void CefProcessUIThread::CleanUp() {
webkit_glue::CleanupResourceBundle();
}
AudioManager* CefProcessUIThread::audio_manager() {
DCHECK(CefThread::CurrentlyOn(CefThread::UI));
if (!audio_manager_)
audio_manager_ = AudioManager::Create();
return audio_manager_;
}
void CefProcessUIThread::OnOnlineStateChanged(bool online) {
DCHECK(CefThread::CurrentlyOn(CefThread::UI));
WebKit::WebNetworkStateNotifier::setOnLine(online);

View File

@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "cef_thread.h"
#include "media/audio/audio_manager.h"
#include "net/base/network_change_notifier.h"
class BrowserWebKitInit;
@@ -37,6 +38,8 @@ class CefProcessUIThread
virtual void Init();
virtual void CleanUp();
AudioManager* audio_manager();
private:
void PlatformInit();
void PlatformCleanUp();
@@ -50,6 +53,7 @@ class CefProcessUIThread
BrowserWebKitInit* webkit_init_;
scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_;
scoped_refptr<AudioManager> audio_manager_;
DISALLOW_COPY_AND_ASSIGN(CefProcessUIThread);
};

View File

@@ -5,7 +5,7 @@
#ifndef _HTTP_HEADER_UTILS_H
#define _HTTP_HEADER_UTILS_H
#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPHeaderVisitor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPHeaderVisitor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
namespace HttpHeaderUtils {

View File

@@ -8,7 +8,7 @@
#include "include/cef.h"
#include "net/base/upload_data.h"
#include "net/http/http_request_headers.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPBody.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPBody.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h"
namespace net {

View File

@@ -8,7 +8,7 @@
#include "cef_thread.h"
#include "base/task.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
using WebKit::WebDragOperationNone;

View File

@@ -15,7 +15,7 @@
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/base/clipboard/clipboard_util_win.h"
#include "ui/base/dragdrop/os_exchange_data.h"

View File

@@ -13,7 +13,7 @@
#include "base/memory/scoped_ptr.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoaderClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLResponse.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"