Update to Chromium revision 113143.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@426 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-12-16 14:51:10 +00:00
parent 9fadd1724f
commit eff39b0f11
59 changed files with 337 additions and 230 deletions

View File

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

View File

@ -511,7 +511,7 @@
'../breakpad/breakpad.gyp:breakpad_handler',
'../third_party/angle/src/build_angle.gyp:libEGL',
'../third_party/angle/src/build_angle.gyp:libGLESv2',
'../views/views.gyp:views',
'../ui/views/views.gyp:views',
],
'sources': [
'<@(includes_win)',
@ -759,6 +759,7 @@
'libcef/response_impl.h',
'libcef/scheme_impl.cc',
'libcef/simple_clipboard_impl.cc',
'libcef/simple_clipboard_impl.h',
'libcef/stream_impl.cc',
'libcef/stream_impl.h',
'libcef/tracker.h',
@ -783,7 +784,7 @@
'../breakpad/breakpad.gyp:breakpad_handler',
'../third_party/angle/src/build_angle.gyp:libEGL',
'../third_party/angle/src/build_angle.gyp:libGLESv2',
'../views/views.gyp:views',
'../ui/views/views.gyp:views',
],
'sources': [
'<@(includes_win)',

View File

@ -15,7 +15,7 @@
#include "base/utf_string_conversions.h"
#include "third_party/sqlite/sqlite3.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "webkit/database/database_util.h"
#include "webkit/database/vfs_backend.h"

View File

@ -43,23 +43,11 @@ class WebKitClientMessageLoopImpl
} // namespace
// static
void BrowserDevToolsAgent::DispatchMessageLoop() {
MessageLoop* current = MessageLoop::current();
bool old_state = current->NestableTasksAllowed();
current->SetNestableTasksAllowed(true);
current->RunAllPending();
current->SetNestableTasksAllowed(old_state);
}
BrowserDevToolsAgent::BrowserDevToolsAgent()
: ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
dev_tools_client_(NULL) {
static int dev_tools_agent_counter;
routing_id_ = ++dev_tools_agent_counter;
if (routing_id_ == 1)
WebDevToolsAgent::setMessageLoopDispatchHandler(
&BrowserDevToolsAgent::DispatchMessageLoop);
}
BrowserDevToolsAgent::~BrowserDevToolsAgent() {
@ -75,6 +63,10 @@ void BrowserDevToolsAgent::sendMessageToInspectorFrontend(
dev_tools_client_->AsyncCall(BrowserDevToolsCallArgs(data));
}
int BrowserDevToolsAgent::hostIdentifier() {
return routing_id_;
}
void BrowserDevToolsAgent::runtimePropertyChanged(
const WebKit::WebString& name,
const WebKit::WebString& value) {
@ -101,12 +93,6 @@ void BrowserDevToolsAgent::Call(const BrowserDevToolsCallArgs &args) {
dev_tools_client_->all_messages_processed();
}
void BrowserDevToolsAgent::DelayedFrontendLoaded() {
WebDevToolsAgent *web_agent = GetWebAgent();
if (web_agent)
web_agent->frontendLoaded();
}
WebDevToolsAgent* BrowserDevToolsAgent::GetWebAgent() {
if (!web_view_)
return NULL;
@ -129,13 +115,6 @@ void BrowserDevToolsAgent::detach() {
dev_tools_client_ = NULL;
}
void BrowserDevToolsAgent::frontendLoaded() {
MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&BrowserDevToolsAgent::DelayedFrontendLoaded,
weak_factory_.GetWeakPtr()));
}
bool BrowserDevToolsAgent::evaluateInWebInspector(
long call_id,
const std::string& script) {

View File

@ -17,13 +17,12 @@ namespace WebKit {
class WebDevToolsAgent;
class WebView;
} // namespace WebKit
} // namespace WebKit
class BrowserDevToolsCallArgs;
class BrowserDevToolsClient;
class BrowserDevToolsAgent : public WebKit::WebDevToolsAgentClient {
public:
BrowserDevToolsAgent();
virtual ~BrowserDevToolsAgent();
@ -33,7 +32,7 @@ class BrowserDevToolsAgent : public WebKit::WebDevToolsAgentClient {
// WebDevToolsAgentClient implementation.
virtual void sendMessageToInspectorFrontend(
const WebKit::WebString& data);
virtual int hostIdentifier() { return routing_id_; }
virtual int hostIdentifier();
virtual void runtimePropertyChanged(const WebKit::WebString& name,
const WebKit::WebString& value);
@ -44,7 +43,6 @@ class BrowserDevToolsAgent : public WebKit::WebDevToolsAgentClient {
void attach(BrowserDevToolsClient* client);
void detach();
void frontendLoaded();
bool evaluateInWebInspector(long call_id, const std::string& script);
@ -52,8 +50,6 @@ class BrowserDevToolsAgent : public WebKit::WebDevToolsAgentClient {
private:
void Call(const BrowserDevToolsCallArgs& args);
void DelayedFrontendLoaded();
static void DispatchMessageLoop();
WebKit::WebDevToolsAgent* GetWebAgent();
base::WeakPtrFactory<BrowserDevToolsAgent> weak_factory_;

View File

@ -7,7 +7,7 @@
#include "base/basictypes.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
class BrowserDevToolsCallArgs {
public:

View File

@ -5,7 +5,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsFrontend.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
@ -45,22 +45,12 @@ BrowserDevToolsClient::~BrowserDevToolsClient() {
dev_tools_agent_->detach();
}
void BrowserDevToolsClient::sendFrontendLoaded() {
if (dev_tools_agent_)
dev_tools_agent_->frontendLoaded();
}
void BrowserDevToolsClient::sendMessageToBackend(
const WebString& data) {
if (dev_tools_agent_)
dev_tools_agent_->AsyncCall(BrowserDevToolsCallArgs(data));
}
void BrowserDevToolsClient::sendDebuggerCommandToAgent(
const WebString& command) {
WebDevToolsAgent::executeDebuggerCommand(command, 1);
}
void BrowserDevToolsClient::activateWindow() {
NOTIMPLEMENTED();
}

View File

@ -29,9 +29,7 @@ class BrowserDevToolsClient: public WebKit::WebDevToolsFrontendClient {
virtual ~BrowserDevToolsClient();
// WebDevToolsFrontendClient implementation
virtual void sendFrontendLoaded();
virtual void sendMessageToBackend(const WebKit::WebString& data);
virtual void sendDebuggerCommandToAgent(const WebKit::WebString& command);
virtual void activateWindow();
virtual void closeWindow();

View File

@ -4,6 +4,7 @@
#include "browser_devtools_scheme_handler.h"
#include "include/cef.h"
#include "browser_webkit_glue.h"
#include <string>
#include "base/file_util.h"
@ -11,7 +12,6 @@
#include "grit/devtools_resources_map.h"
#include "net/base/mime_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "webkit/glue/webkit_glue.h"
const char kChromeDevToolsScheme[] = "chrome-devtools";
const char kChromeDevToolsHost[] = "devtools";

View File

@ -25,7 +25,7 @@
#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/WebView.h"
#include "views/drag_utils.h"
#include "ui/views/drag_utils.h"
#include "webkit/glue/webdropdata.h"
using WebKit::WebDragOperationsMask;

View File

@ -19,8 +19,8 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemEntry.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
#include "webkit/fileapi/file_system_callback_dispatcher.h"
#include "webkit/fileapi/file_system_context.h"
#include "webkit/fileapi/file_system_operation.h"

View File

@ -9,7 +9,7 @@
#include "base/id_map.h"
#include "base/memory/weak_ptr.h"
#include "base/scoped_temp_dir.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSystem.h"
#include "webkit/fileapi/file_system_types.h"
#include <vector>

View File

@ -24,11 +24,11 @@
#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"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "webkit/glue/glue_serialize.h"
#include "webkit/plugins/npapi/webplugin_delegate.h"

View File

@ -10,8 +10,8 @@
#include <gtk/gtk.h>
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webpreferences.h"

View File

@ -13,8 +13,8 @@
#include "skia/ext/vector_platform_device_emf_win.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/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/base/win/hwnd_util.h"
#include "webkit/glue/webpreferences.h"

View File

@ -56,12 +56,13 @@ using base::Time;
class BrowserPersistentCookieStore::Backend
: public base::RefCountedThreadSafe<BrowserPersistentCookieStore::Backend> {
public:
explicit Backend(const FilePath& path)
Backend(const FilePath& path, bool restore_old_session_cookies)
: path_(path),
db_(NULL),
num_pending_(0),
clear_local_state_on_exit_(false),
initialized_(false) {
initialized_(false),
restore_old_session_cookies_(restore_old_session_cookies) {
}
// Creates or loads the SQLite database.
@ -155,6 +156,8 @@ class BrowserPersistentCookieStore::Backend
// Close() executed on the background thread.
void InternalBackgroundClose();
void DeleteSessionCookies();
FilePath path_;
scoped_ptr<sql::Connection> db_;
sql::MetaTable meta_table_;
@ -178,19 +181,28 @@ class BrowserPersistentCookieStore::Backend
// Indicates if DB has been initialized.
bool initialized_;
// If false, we should filter out session cookies when reading the DB.
bool restore_old_session_cookies_;
DISALLOW_COPY_AND_ASSIGN(Backend);
};
// Version number of the database. In version 4, we migrated the time epoch.
// If you open the DB with an older version on Mac or Linux, the times will
// look wonky, but the file will likely be usable. On Windows version 3 and 4
// are the same.
// Version number of the database.
//
// Version 5 adds the columns has_expires and is_persistent, so that the
// database can store session cookies as well as persistent cookies. Databases
// of version 5 are incompatible with older versions of code. If a database of
// version 5 is read by older code, session cookies will be treated as normal
// cookies.
//
// In version 4, we migrated the time epoch. If you open the DB with an older
// version on Mac or Linux, the times will look wonky, but the file will likely
// be usable. On Windows version 3 and 4 are the same.
//
// Version 3 updated the database to include the last access time, so we can
// expire them in decreasing order of use when we've reached the maximum
// number of cookies.
static const int kCurrentVersionNumber = 4;
static const int kCompatibleVersionNumber = 3;
static const int kCurrentVersionNumber = 5;
static const int kCompatibleVersionNumber = 5;
namespace {
@ -203,11 +215,12 @@ bool InitTable(sql::Connection* db) {
"name TEXT NOT NULL,"
"value TEXT NOT NULL,"
"path TEXT NOT NULL,"
// We only store persistent, so we know it expires
"expires_utc INTEGER NOT NULL,"
"secure INTEGER NOT NULL,"
"httponly INTEGER NOT NULL,"
"last_access_utc INTEGER NOT NULL)"))
"last_access_utc INTEGER NOT NULL, "
"has_expires INTEGER NOT NULL DEFAULT 1, "
"persistent INTEGER NOT NULL DEFAULT 1)"))
return false;
}
@ -376,6 +389,8 @@ void BrowserPersistentCookieStore::Backend::ChainLoadCookies(
CefThread::IO, FROM_HERE,
base::Bind(&BrowserPersistentCookieStore::Backend::NotifyOnIOThread,
this, loaded_callback, load_success));
if (!restore_old_session_cookies_)
DeleteSessionCookies();
}
}
@ -383,9 +398,19 @@ bool BrowserPersistentCookieStore::Backend::LoadCookiesForDomains(
const std::set<std::string>& domains) {
DCHECK(CefThread::CurrentlyOn(CefThread::FILE));
sql::Statement smt(db_->GetCachedStatement(SQL_FROM_HERE,
"SELECT creation_utc, host_key, name, value, path, expires_utc, secure, "
"httponly, last_access_utc FROM cookies WHERE host_key = ?"));
const char* sql;
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 = ?";
} 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";
}
sql::Statement smt(db_->GetCachedStatement(SQL_FROM_HERE, sql));
if (!smt) {
NOTREACHED() << "select statement prep failed";
db_.reset();
@ -412,8 +437,8 @@ bool BrowserPersistentCookieStore::Backend::LoadCookiesForDomains(
Time::FromInternalValue(smt.ColumnInt64(8)), // last_access_utc
smt.ColumnInt(6) != 0, // secure
smt.ColumnInt(7) != 0, // httponly
true, // has_expires
true)); // is_persistent
smt.ColumnInt(9) != 0, // has_expires
smt.ColumnInt(10) != 0)); // is_persistent
DLOG_IF(WARNING,
cc->CreationDate() > Time::Now()) << L"CreationDate too recent";
cookies.push_back(cc.release());
@ -491,6 +516,24 @@ bool BrowserPersistentCookieStore::Backend::EnsureDatabaseVersion() {
transaction.Commit();
}
if (cur_version == 4) {
sql::Transaction transaction(db_.get());
if (!transaction.Begin())
return false;
if (!db_->Execute("ALTER TABLE cookies "
"ADD COLUMN has_expires INTEGER DEFAULT 1") ||
!db_->Execute("ALTER TABLE cookies "
"ADD COLUMN persistent INTEGER DEFAULT 1")) {
LOG(WARNING) << "Unable to update cookie database to version 5.";
return false;
}
++cur_version;
meta_table_.SetVersionNumber(cur_version);
meta_table_.SetCompatibleVersionNumber(
std::min(cur_version, kCompatibleVersionNumber));
transaction.Commit();
}
// Put future migration cases here.
// When the version is too old, we just try to continue anyway, there should
@ -564,8 +607,9 @@ void BrowserPersistentCookieStore::Backend::Commit() {
sql::Statement add_smt(db_->GetCachedStatement(SQL_FROM_HERE,
"INSERT INTO cookies (creation_utc, host_key, name, value, path, "
"expires_utc, secure, httponly, last_access_utc) "
"VALUES (?,?,?,?,?,?,?,?,?)"));
"expires_utc, secure, httponly, last_access_utc, has_expires, "
"persistent) "
"VALUES (?,?,?,?,?,?,?,?,?,?,?)"));
if (!add_smt) {
NOTREACHED();
return;
@ -606,6 +650,8 @@ void BrowserPersistentCookieStore::Backend::Commit() {
add_smt.BindInt(6, po->cc().IsSecure());
add_smt.BindInt(7, po->cc().IsHttpOnly());
add_smt.BindInt64(8, po->cc().LastAccessDate().ToInternalValue());
add_smt.BindInt(9, po->cc().DoesExpire());
add_smt.BindInt(10, po->cc().IsPersistent());
if (!add_smt.Run())
NOTREACHED() << "Could not add a cookie to the DB.";
break;
@ -677,8 +723,17 @@ void BrowserPersistentCookieStore::Backend::SetClearLocalStateOnExit(
base::AutoLock locked(lock_);
clear_local_state_on_exit_ = clear_local_state;
}
BrowserPersistentCookieStore::BrowserPersistentCookieStore(const FilePath& path)
: backend_(new Backend(path)) {
void BrowserPersistentCookieStore::Backend::DeleteSessionCookies() {
DCHECK(CefThread::CurrentlyOn(CefThread::FILE));
if (!db_->Execute("DELETE FROM cookies WHERE persistent == 0"))
LOG(WARNING) << "Unable to delete session cookies.";
}
BrowserPersistentCookieStore::BrowserPersistentCookieStore(
const FilePath& path,
bool restore_old_session_cookies)
: backend_(new Backend(path, restore_old_session_cookies)) {
}
BrowserPersistentCookieStore::~BrowserPersistentCookieStore() {

View File

@ -29,7 +29,8 @@ class Task;
class BrowserPersistentCookieStore
: public net::CookieMonster::PersistentCookieStore {
public:
explicit BrowserPersistentCookieStore(const FilePath& path);
BrowserPersistentCookieStore(const FilePath& path,
bool restore_old_session_cookies);
virtual ~BrowserPersistentCookieStore();
virtual void Load(const LoadedCallback& loaded_callback) OVERRIDE;

View File

@ -29,7 +29,7 @@
#include "net/proxy/proxy_service.h"
#include "net/url_request/url_request_job_factory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKitPlatformSupport.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h"
#include "webkit/blob/blob_storage_controller.h"
#include "webkit/blob/blob_url_request_job_factory.h"
#include "webkit/fileapi/file_system_context.h"
@ -300,7 +300,7 @@ void BrowserRequestContext::SetCookieStoragePath(const FilePath& path) {
if (!path.empty()) {
if (file_util::CreateDirectory(path)) {
const FilePath& cookie_path = path.AppendASCII("Cookies");
persistent_store = new BrowserPersistentCookieStore(cookie_path);
persistent_store = new BrowserPersistentCookieStore(cookie_path, false);
} else {
NOTREACHED() << "The cookie storage directory could not be created";
}

View File

@ -1179,18 +1179,14 @@ class CookieGetter : public base::RefCountedThreadSafe<CookieGetter> {
//-----------------------------------------------------------------------------
namespace webkit_glue {
// Factory function.
ResourceLoaderBridge* ResourceLoaderBridge::Create(
// static
webkit_glue::ResourceLoaderBridge* BrowserResourceLoaderBridge::Create(
const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) {
CefRefPtr<CefBrowserImpl> browser =
_Context->GetBrowserByID(request_info.routing_id);
return new ResourceLoaderBridgeImpl(browser.get(), request_info);
}
} // namespace webkit_glue
//-----------------------------------------------------------------------------
// static

View File

@ -9,6 +9,7 @@
#include "include/cef.h"
#include "base/message_loop_proxy.h"
#include "net/url_request/url_request.h"
#include "webkit/glue/resource_loader_bridge.h"
#include <string>
class GURL;
@ -28,6 +29,10 @@ class BrowserResourceLoaderBridge {
// CefWebURLRequest API.
static CefRefPtr<CefBrowser> GetBrowserForRequest(net::URLRequest* request);
// Creates a ResourceLoaderBridge instance.
static webkit_glue::ResourceLoaderBridge* Create(
const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info);
static scoped_refptr<base::MessageLoopProxy> GetCacheThread();
// Used for intercepting URL redirects. Only one interceptor will be created

View File

@ -14,18 +14,18 @@
#include "net/socket_stream/socket_stream_job.h"
#include "net/websockets/websocket_job.h"
#include "net/url_request/url_request_context.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSocketStreamHandle.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSocketStreamHandle.h"
#include "webkit/glue/websocketstreamhandle_bridge.h"
#include "webkit/glue/websocketstreamhandle_delegate.h"
using webkit_glue::WebSocketStreamHandleBridge;
static const int kNoSocketId = 0;
const int kNoSocketId = 0;
namespace {
MessageLoop* g_io_thread;
scoped_refptr<net::URLRequestContext> g_request_context;
net::URLRequestContext* g_request_context;
class WebSocketStreamHandleBridgeImpl
: public WebSocketStreamHandleBridge,
@ -223,21 +223,20 @@ void WebSocketStreamHandleBridgeImpl::DoOnClose() {
void BrowserSocketStreamBridge::InitializeOnIOThread(
net::URLRequestContext* request_context) {
g_io_thread = MessageLoop::current();
g_request_context = request_context;
if ((g_request_context = request_context))
g_request_context->AddRef();
}
void BrowserSocketStreamBridge::Cleanup() {
g_io_thread = NULL;
if (g_request_context)
g_request_context->Release();
g_request_context = NULL;
}
namespace webkit_glue {
/* static */
WebSocketStreamHandleBridge* WebSocketStreamHandleBridge::Create(
webkit_glue::WebSocketStreamHandleBridge* BrowserSocketStreamBridge::Create(
WebKit::WebSocketStreamHandle* handle,
WebSocketStreamHandleDelegate* delegate) {
webkit_glue::WebSocketStreamHandleDelegate* delegate) {
return new WebSocketStreamHandleBridgeImpl(handle, delegate);
}
} // namespace webkit_glue

View File

@ -5,14 +5,31 @@
#ifndef _BROWSER_SOCKET_STREAM_BRIDGE_H
#define _BROWSER_SOCKET_STREAM_BRIDGE_H
#include "base/basictypes.h"
namespace net {
class URLRequestContext;
} // namespace net
namespace WebKit {
class WebSocketStreamHandle;
} // namespace WebKit
namespace webkit_glue {
class WebSocketStreamHandleDelegate;
class WebSocketStreamHandleBridge;
} // namespace webkit_glue
class BrowserSocketStreamBridge {
public:
static void InitializeOnIOThread(net::URLRequestContext* request_context);
static void Cleanup();
static webkit_glue::WebSocketStreamHandleBridge* Create(
WebKit::WebSocketStreamHandle* handle,
webkit_glue::WebSocketStreamHandleDelegate* delegate);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(BrowserSocketStreamBridge);
};
#endif // _BROWSER_SOCKET_STREAM_BRIDGE_H

View File

@ -8,7 +8,7 @@
#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/WebURL.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

@ -6,7 +6,7 @@
#define BROWSER_WEBBLOBREGISTRY_IMPL_H_
#include "base/memory/ref_counted.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebBlobRegistry.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobRegistry.h"
class GURL;

View File

@ -5,7 +5,7 @@
#include "browser_webcookiejar_impl.h"
#include "browser_resource_loader_bridge.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
using WebKit::WebString;
using WebKit::WebURL;

View File

@ -6,8 +6,8 @@
#define _BROWSER_SIMPLE_WEBCOOKIEJAR_IMPL_H
// TODO(darin): WebCookieJar.h is missing a WebString.h include!
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCookieJar.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCookieJar.h"
class BrowserWebCookieJarImpl : public WebKit::WebCookieJar {
public:

View File

@ -27,7 +27,7 @@ MSVC_POP_WARNING();
#include "base/string16.h"
#include "net/base/mime_util.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "ui/base/resource/resource_bundle.h"
#include "webkit/glue/user_agent.h"
#include "webkit/glue/webkit_glue.h"
@ -71,17 +71,6 @@ bool IsMediaPlayerAvailable() {
return true;
}
void GetPlugins(bool refresh,
std::vector<webkit::WebPluginInfo>* plugins) {
if (refresh)
webkit::npapi::PluginList::Singleton()->RefreshPlugins();
webkit::npapi::PluginList::Singleton()->GetPlugins(plugins);
}
bool IsProtocolSupportedForMedia(const GURL& url) {
return true;
}
void InitializeTextEncoding() {
WebCore::UTF8Encoding();
}

View File

@ -42,6 +42,9 @@ void CleanupResourceBundle();
FilePath GetResourcesFilePath();
#endif
string16 GetLocalizedString(int message_id);
base::StringPiece GetDataResource(int resource_id);
// Text encoding objects must be initialized on the main thread.
void InitializeTextEncoding();

View File

@ -21,8 +21,8 @@ MSVC_POP_WARNING();
#include "base/path_service.h"
#include "base/win/resource_util.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/gdi_util.h"

View File

@ -4,6 +4,9 @@
// found in the LICENSE file.
#include "browser_webkit_init.h"
#include "browser_resource_loader_bridge.h"
#include "browser_socket_stream_bridge.h"
#include "browser_webkit_glue.h"
#include "browser_webstoragenamespace_impl.h"
#include "cef_context.h"
@ -20,9 +23,11 @@
#include "v8/include/v8.h"
#include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h"
#include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
#include "webkit/plugins/npapi/plugin_list.h"
BrowserWebKitInit::BrowserWebKitInit() {
BrowserWebKitInit::BrowserWebKitInit()
: clipboard_(&clipboard_client_) {
v8::V8::SetCounterFunction(base::StatsTable::FindLocation);
WebKit::initialize(this);
@ -259,6 +264,33 @@ WebKit::WebGraphicsContext3D* BrowserWebKitInit::createGraphicsContext3D() {
}
}
void BrowserWebKitInit::GetPlugins(
bool refresh, std::vector<webkit::WebPluginInfo>* plugins) {
if (refresh)
webkit::npapi::PluginList::Singleton()->RefreshPlugins();
webkit::npapi::PluginList::Singleton()->GetPlugins(plugins);
}
string16 BrowserWebKitInit::GetLocalizedString(int message_id) {
return webkit_glue::GetLocalizedString(message_id);
}
base::StringPiece BrowserWebKitInit::GetDataResource(int resource_id) {
return webkit_glue::GetDataResource(resource_id);
}
webkit_glue::ResourceLoaderBridge* BrowserWebKitInit::CreateResourceLoader(
const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) {
return BrowserResourceLoaderBridge::Create(request_info);
}
webkit_glue::WebSocketStreamHandleBridge*
BrowserWebKitInit::CreateWebSocketBridge(
WebKit::WebSocketStreamHandle* handle,
webkit_glue::WebSocketStreamHandleDelegate* delegate) {
return BrowserSocketStreamBridge::Create(handle, delegate);
}
WebKit::WebString BrowserWebKitInit::queryLocalizedString(
WebKit::WebLocalizedString::Name name) {
switch (name) {

View File

@ -6,11 +6,14 @@
#ifndef _BROWSER_WEBKIT_INIT_H
#define _BROWSER_WEBKIT_INIT_H
#include "base/compiler_specific.h"
#include "browser_appcache_system.h"
#include "browser_database_system.h"
#include "browser_file_system.h"
#include "browser_webblobregistry_impl.h"
#include "browser_webcookiejar_impl.h"
#include "simple_clipboard_impl.h"
#include "base/scoped_temp_dir.h"
#include "webkit/glue/simple_webmimeregistry_impl.h"
@ -76,6 +79,16 @@ class BrowserWebKitInit : public webkit_glue::WebKitPlatformSupportImpl {
const WebKit::WebSerializedScriptValue& value,
const WebKit::WebString& keyPath) OVERRIDE;
virtual WebKit::WebGraphicsContext3D* createGraphicsContext3D() OVERRIDE;
virtual string16 GetLocalizedString(int message_id) OVERRIDE;
virtual base::StringPiece GetDataResource(int resource_id) OVERRIDE;
virtual void GetPlugins(bool refresh,
std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE;
virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader(
const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info)
OVERRIDE;
virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketBridge(
WebKit::WebSocketStreamHandle* handle,
webkit_glue::WebSocketStreamHandleDelegate* delegate) OVERRIDE;
virtual WebKit::WebString queryLocalizedString(
WebKit::WebLocalizedString::Name name) OVERRIDE;
virtual WebKit::WebString queryLocalizedString(
@ -89,6 +102,7 @@ class BrowserWebKitInit : public webkit_glue::WebKitPlatformSupportImpl {
private:
webkit_glue::SimpleWebMimeRegistryImpl mime_registry_;
webkit_glue::WebClipboardImpl clipboard_;
SimpleClipboardClient clipboard_client_;
webkit_glue::WebFileUtilitiesImpl file_utilities_;
ScopedTempDir appcache_dir_;
BrowserAppCacheSystem appcache_system_;

View File

@ -8,7 +8,7 @@
#include "dom_storage_namespace.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
using WebKit::WebFrame;

View File

@ -7,7 +7,7 @@
#include "base/basictypes.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
class DOMStorageArea;

View File

@ -33,8 +33,8 @@
#include "net/base/net_errors.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h"
@ -42,19 +42,19 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKitPlatformSupport.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/WebPluginParams.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.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/platform/WebVector.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h"
#include "ui/gfx/native_widget_types.h"
@ -62,6 +62,7 @@
#include "webkit/appcache/web_application_cache_host_impl.h"
#include "webkit/glue/glue_serialize.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/weburlrequest_extradata_impl.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/window_open_disposition.h"
#include "webkit/media/video_renderer_impl.h"
@ -634,10 +635,6 @@ WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer(
scoped_ptr<media::FilterCollection> collection(
new media::FilterCollection());
scoped_refptr<webkit_media::VideoRendererImpl> video_renderer(
new webkit_media::VideoRendererImpl(false));
collection->AddVideoRenderer(video_renderer);
// Add the audio renderer.
collection->AddAudioRenderer(new media::ReferenceAudioRenderer());
@ -649,7 +646,7 @@ WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer(
message_loop_factory.release(),
NULL,
new media::MediaLog()));
if (!result->Initialize(frame, false, video_renderer))
if (!result->Initialize(frame, false))
return NULL;
return result.release();
}

View File

@ -19,9 +19,9 @@
#include "build/build_config.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserParams.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSystem.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h"
#include "webkit/glue/webcursor.h"
#include "webkit/plugins/npapi/webplugin_page_delegate.h"
@ -38,7 +38,7 @@ class WebDropTarget;
#endif
#if defined(TOOLKIT_USES_GTK)
#include <gdk/gdkcursor.h>
#include <gdk/gdk.h>
#endif
class CefBrowserImpl;

View File

@ -15,11 +15,11 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragData.h"
#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/WebImage.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/WebRect.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/native_widget_types.h"
#include "ui/gfx/gtk_util.h"

View File

@ -24,11 +24,11 @@
#include "net/base/net_errors.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragData.h"
#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/WebImage.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/WebRect.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"
#include "ui/gfx/native_widget_types.h"

View File

@ -12,8 +12,8 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
using WebKit::WebDocument;
using WebKit::WebElement;

View File

@ -8,7 +8,7 @@
#include "base/logging.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
using WebKit::WebDOMEvent;
using WebKit::WebString;

View File

@ -23,7 +23,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNamedNodeMap.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSelectElement.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
using WebKit::WebAttribute;
using WebKit::WebDocument;

View File

@ -9,8 +9,8 @@
#include "base/task.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
#include "webkit/glue/webkit_glue.h"
using WebKit::WebSecurityOrigin;

View File

@ -15,7 +15,7 @@
#include "dom_storage_area.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "webkit/database/database_util.h"
#include "webkit/glue/webkit_glue.h"

View File

@ -10,7 +10,7 @@
#include "base/hash_tables.h"
#include "base/memory/scoped_ptr.h"
#include "base/string16.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
class DOMStorageArea;
class DOMStorageContext;

View File

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

View File

@ -7,8 +7,8 @@
#include "cef_thread.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
using WebKit::WebSecurityPolicy;
using WebKit::WebString;

View File

@ -9,7 +9,7 @@
#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/WebURLRequest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h"
namespace net {
class URLRequest;

View File

@ -9,8 +9,8 @@
#include "base/logging.h"
#include "base/stringprintf.h"
#include "net/http/http_response_headers.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLResponse.h"
CefResponseImpl::CefResponseImpl()
: status_code_(0)

View File

@ -33,7 +33,7 @@
#include "net/url_request/url_request_job.h"
#include "net/url_request/url_request_job_factory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include <map>

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "webkit/glue/webkit_glue.h"
#include "simple_clipboard_impl.h"
#include <string>
@ -15,62 +15,66 @@
#include "ui/base/clipboard/clipboard.h"
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/size.h"
#include "webkit/glue/scoped_clipboard_writer_glue.h"
#include "webkit/glue/webkit_glue.h"
// Clipboard glue
void ScopedClipboardWriterGlue::WriteBitmapFromPixels(
const void* pixels, const gfx::Size& size) {
ScopedClipboardWriter::WriteBitmapFromPixels(pixels, size);
}
ScopedClipboardWriterGlue::~ScopedClipboardWriterGlue() {
}
namespace webkit_glue {
namespace {
base::LazyInstance<ui::Clipboard> clipboard = LAZY_INSTANCE_INITIALIZER;
ui::Clipboard* ClipboardGetClipboard() {
} // anonymous namespace
SimpleClipboardClient::SimpleClipboardClient() {
}
SimpleClipboardClient::~SimpleClipboardClient() {
}
ui::Clipboard* SimpleClipboardClient::GetClipboard() {
return clipboard.Pointer();
}
uint64 ClipboardGetSequenceNumber(ui::Clipboard::Buffer buffer) {
return ClipboardGetClipboard()->GetSequenceNumber(buffer);
uint64 SimpleClipboardClient::GetSequenceNumber(ui::Clipboard::Buffer buffer) {
return GetClipboard()->GetSequenceNumber(buffer);
}
bool ClipboardIsFormatAvailable(const ui::Clipboard::FormatType& format,
ui::Clipboard::Buffer buffer) {
return ClipboardGetClipboard()->IsFormatAvailable(format, buffer);
bool SimpleClipboardClient::IsFormatAvailable(
const ui::Clipboard::FormatType& format,
ui::Clipboard::Buffer buffer) {
return GetClipboard()->IsFormatAvailable(format, buffer);
}
void ClipboardReadAvailableTypes(ui::Clipboard::Buffer buffer,
std::vector<string16>* types,
bool* contains_filenames) {
return ClipboardGetClipboard()->ReadAvailableTypes(buffer, types,
void SimpleClipboardClient::ReadAvailableTypes(ui::Clipboard::Buffer buffer,
std::vector<string16>* types,
bool* contains_filenames) {
return GetClipboard()->ReadAvailableTypes(buffer, types,
contains_filenames);
}
void ClipboardReadText(ui::Clipboard::Buffer buffer, string16* result) {
ClipboardGetClipboard()->ReadText(buffer, result);
void SimpleClipboardClient::ReadText(ui::Clipboard::Buffer buffer,
string16* result) {
GetClipboard()->ReadText(buffer, result);
}
void ClipboardReadAsciiText(ui::Clipboard::Buffer buffer, std::string* result) {
ClipboardGetClipboard()->ReadAsciiText(buffer, result);
void SimpleClipboardClient::ReadAsciiText(ui::Clipboard::Buffer buffer,
std::string* result) {
GetClipboard()->ReadAsciiText(buffer, result);
}
void ClipboardReadHTML(ui::Clipboard::Buffer buffer, string16* markup,
GURL* url, uint32* fragment_start,
uint32* fragment_end) {
void SimpleClipboardClient::ReadHTML(ui::Clipboard::Buffer buffer,
string16* markup,
GURL* url, uint32* fragment_start,
uint32* fragment_end) {
std::string url_str;
ClipboardGetClipboard()->ReadHTML(buffer, markup, url ? &url_str : NULL,
fragment_start, fragment_end);
GetClipboard()->ReadHTML(buffer, markup, url ? &url_str : NULL,
fragment_start, fragment_end);
if (url)
*url = GURL(url_str);
}
void ClipboardReadImage(ui::Clipboard::Buffer buffer, std::string* data) {
SkBitmap bitmap = ClipboardGetClipboard()->ReadImage(buffer);
void SimpleClipboardClient::ReadImage(ui::Clipboard::Buffer buffer,
std::string* data) {
SkBitmap bitmap = GetClipboard()->ReadImage(buffer);
if (bitmap.isNull())
return;
@ -90,4 +94,13 @@ void ClipboardReadImage(ui::Clipboard::Buffer buffer, std::string* data) {
}
}
} // namespace webkit_glue
void SimpleClipboardClient::ReadCustomData(ui::Clipboard::Buffer buffer,
const string16& type,
string16* data) {
GetClipboard()->ReadCustomData(buffer, type, data);
}
webkit_glue::ClipboardClient::WriteContext*
SimpleClipboardClient::CreateWriteContext() {
return NULL;
}

View File

@ -0,0 +1,38 @@
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SIMPLE_CLIPBOARD_IMPL_H_
#define SIMPLE_CLIPBOARD_IMPL_H_
#include "base/compiler_specific.h"
#include "webkit/glue/clipboard_client.h"
class SimpleClipboardClient : public webkit_glue::ClipboardClient {
public:
SimpleClipboardClient();
virtual ~SimpleClipboardClient();
virtual ui::Clipboard* GetClipboard() OVERRIDE;
virtual uint64 GetSequenceNumber(ui::Clipboard::Buffer buffer) OVERRIDE;
virtual bool IsFormatAvailable(const ui::Clipboard::FormatType& format,
ui::Clipboard::Buffer buffer) OVERRIDE;
virtual void ReadAvailableTypes(ui::Clipboard::Buffer buffer,
std::vector<string16>* types,
bool* contains_filenames) OVERRIDE;
virtual void ReadText(ui::Clipboard::Buffer buffer,
string16* result) OVERRIDE;
virtual void ReadAsciiText(ui::Clipboard::Buffer buffer,
std::string* result) OVERRIDE;
virtual void ReadHTML(ui::Clipboard::Buffer buffer, string16* markup,
GURL* url, uint32* fragment_start,
uint32* fragment_end) OVERRIDE;
virtual void ReadImage(ui::Clipboard::Buffer buffer,
std::string* data) OVERRIDE;
virtual void ReadCustomData(ui::Clipboard::Buffer buffer,
const string16& type,
string16* data) OVERRIDE;
virtual WriteContext* CreateWriteContext() OVERRIDE;
};
#endif // SIMPLE_CLIPBOARD_IMPL_H_

View File

@ -14,7 +14,7 @@
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragData.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/WebView.h"
#include "ui/base/clipboard/clipboard_util_win.h"

View File

@ -4,6 +4,7 @@
#include "include/cef.h"
#include "web_urlrequest_impl.h"
#include "browser_webkit_init.h"
#include "cef_thread.h"
#include "request_impl.h"
#include "response_impl.h"
@ -11,10 +12,11 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.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/WebURLRequest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.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"
#include "webkit/glue/weburlloader_impl.h"
using WebKit::WebURLError;
@ -221,7 +223,9 @@ void CefWebURLRequestImpl::Context::initialize(
{
REQUIRE_UIT();
url_loader_.reset(new webkit_glue::WebURLLoaderImpl());
url_loader_.reset(
new webkit_glue::WebURLLoaderImpl(reinterpret_cast<BrowserWebKitInit*>(
WebKit::webKitPlatformSupport())));
url_client_.reset(new CefWebURLLoaderClientImpl(this));
WebURLRequest urlRequest;

View File

@ -7,7 +7,7 @@
#include "base/bind.h"
#include "base/message_loop.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebWidget.h"
using webkit::npapi::WebPluginGeometry;

View File

@ -15,7 +15,7 @@
#include "base/time.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/gfx/native_widget_types.h"

View File

@ -18,7 +18,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
using WebKit::WebInputEventFactory;
using WebKit::WebKeyboardEvent;

View File

@ -11,11 +11,11 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/win/WebInputEventFactory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/win/WebScreenInfoFactory.h"

View File

@ -26,11 +26,6 @@ patches = [
'name': 'webcore_v8_custom',
'path': '../third_party/WebKit/Source/WebCore/bindings/v8/custom/'
},
{
# https://bugs.webkit.org/show_bug.cgi?id=73325
'name': 'webcore_subresloader',
'path': '../third_party/WebKit/Source/WebCore/loader/',
},
{
# https://bugs.webkit.org/show_bug.cgi?id=73760
'name': 'webcore_cachedresource',

View File

@ -1,15 +0,0 @@
Index: SubresourceLoader.cpp
===================================================================
--- SubresourceLoader.cpp (revision 100508)
+++ SubresourceLoader.cpp (working copy)
@@ -239,6 +239,10 @@
LOG(ResourceLoading, "Received '%s'.", m_resource->url().string().latin1().data());
RefPtr<SubresourceLoader> protect(this);
+ // If a load is canceled m_resource might be released in the call hierarchy originating
+ // from m_resource->data(). This causes the subsequent call to m_reosurce->finish() to crash
+ // unless m_resource is protected.
+ CachedResourceHandle<CachedResource> protect_res(m_resource);
m_state = Finishing;
m_resource->setLoadFinishTime(finishTime);
m_resource->data(resourceData(), true);

View File

@ -1,9 +1,9 @@
Index: V8DOMWindowCustom.cpp
===================================================================
--- V8DOMWindowCustom.cpp (revision 100508)
--- V8DOMWindowCustom.cpp (revision 101876)
+++ V8DOMWindowCustom.cpp (working copy)
@@ -291,8 +291,11 @@
static v8::Handle<v8::Value> handlePostMessageCallback(const v8::Arguments& args, bool doTransfer)
@@ -289,8 +289,11 @@
static v8::Handle<v8::Value> handlePostMessageCallback(const v8::Arguments& args, bool extendedTransfer)
{
DOMWindow* window = V8DOMWindow::toNative(args.Holder());
+ Frame* frame = V8Proxy::retrieveFrameForCallingContext();