libcef: Update due to underlying chromium changes.
- Database and AppCache changes. - New cookie policy class. - Add StdStringToWebString and WebStringToStdString to browser_webkit_glue.{h,cc} because webkit/glue/glue_util.{h,cc} have been deleted. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@71 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
606b342147
commit
a46069c097
|
@ -48,3 +48,4 @@ Date | CEF Revision | Chromium Revision
|
||||||
2009-11-02 | /trunk@63 | /trunk@30778
|
2009-11-02 | /trunk@63 | /trunk@30778
|
||||||
2009-11-04 | /trunk@64 | /trunk@31062
|
2009-11-04 | /trunk@64 | /trunk@31062
|
||||||
2010-01-11 | /trunk@65 | /trunk@35902
|
2010-01-11 | /trunk@65 | /trunk@35902
|
||||||
|
2010-02-11 | /trunk@71 | /trunk@38776
|
||||||
|
|
|
@ -280,16 +280,28 @@ BrowserAppCacheSystem::BrowserAppCacheSystem()
|
||||||
instance_ = this;
|
instance_ = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void SignalEvent(base::WaitableEvent* event) {
|
||||||
|
event->Signal();
|
||||||
|
}
|
||||||
|
|
||||||
BrowserAppCacheSystem::~BrowserAppCacheSystem() {
|
BrowserAppCacheSystem::~BrowserAppCacheSystem() {
|
||||||
DCHECK(!io_message_loop_ && !backend_impl_ && !service_);
|
DCHECK(!io_message_loop_ && !backend_impl_ && !service_);
|
||||||
frontend_proxy_->clear_appcache_system(); // in case a task is in transit
|
frontend_proxy_->clear_appcache_system(); // in case a task is in transit
|
||||||
instance_ = NULL;
|
instance_ = NULL;
|
||||||
|
|
||||||
|
if (db_thread_.IsRunning()) {
|
||||||
|
// We pump a task thru the db thread to ensure any tasks previously
|
||||||
|
// scheduled on that thread have been performed prior to return.
|
||||||
|
base::WaitableEvent event(false, false);
|
||||||
|
db_thread_.message_loop()->PostTask(FROM_HERE,
|
||||||
|
NewRunnableFunction(&SignalEvent, &event));
|
||||||
|
event.Wait();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserAppCacheSystem::InitOnUIThread(
|
void BrowserAppCacheSystem::InitOnUIThread(
|
||||||
const FilePath& cache_directory) {
|
const FilePath& cache_directory) {
|
||||||
DCHECK(!ui_message_loop_);
|
DCHECK(!ui_message_loop_);
|
||||||
DCHECK(!cache_directory.empty());
|
|
||||||
AppCacheThread::InitIDs(DB_THREAD_ID, IO_THREAD_ID);
|
AppCacheThread::InitIDs(DB_THREAD_ID, IO_THREAD_ID);
|
||||||
ui_message_loop_ = MessageLoop::current();
|
ui_message_loop_ = MessageLoop::current();
|
||||||
cache_directory_ = cache_directory;
|
cache_directory_ = cache_directory;
|
||||||
|
|
|
@ -126,7 +126,7 @@ class BrowserAppCacheSystem : public MessageLoop::DestructionObserver {
|
||||||
return io_message_loop_ && is_initailized_on_ui_thread();
|
return io_message_loop_ && is_initailized_on_ui_thread();
|
||||||
}
|
}
|
||||||
bool is_initailized_on_ui_thread() {
|
bool is_initailized_on_ui_thread() {
|
||||||
return ui_message_loop_ && !cache_directory_.empty();
|
return ui_message_loop_ ? true : false;
|
||||||
}
|
}
|
||||||
static MessageLoop* GetMessageLoop(int id) {
|
static MessageLoop* GetMessageLoop(int id) {
|
||||||
if (instance_) {
|
if (instance_) {
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
#include "third_party/sqlite/preprocessed/sqlite3.h"
|
#include "third_party/sqlite/preprocessed/sqlite3.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "base/auto_reset.h"
|
||||||
#include "base/file_util.h"
|
#include "base/file_util.h"
|
||||||
|
#include "base/message_loop.h"
|
||||||
#include "base/platform_thread.h"
|
#include "base/platform_thread.h"
|
||||||
#include "base/process_util.h"
|
#include "base/process_util.h"
|
||||||
#include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h"
|
||||||
|
@ -29,14 +31,17 @@ BrowserDatabaseSystem* BrowserDatabaseSystem::GetInstance() {
|
||||||
return instance_;
|
return instance_;
|
||||||
}
|
}
|
||||||
|
|
||||||
BrowserDatabaseSystem::BrowserDatabaseSystem() {
|
BrowserDatabaseSystem::BrowserDatabaseSystem()
|
||||||
|
: waiting_for_dbs_to_close_(false) {
|
||||||
temp_dir_.CreateUniqueTempDir();
|
temp_dir_.CreateUniqueTempDir();
|
||||||
db_tracker_ = new DatabaseTracker(temp_dir_.path());
|
db_tracker_ = new DatabaseTracker(temp_dir_.path());
|
||||||
|
db_tracker_->AddObserver(this);
|
||||||
DCHECK(!instance_);
|
DCHECK(!instance_);
|
||||||
instance_ = this;
|
instance_ = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
BrowserDatabaseSystem::~BrowserDatabaseSystem() {
|
BrowserDatabaseSystem::~BrowserDatabaseSystem() {
|
||||||
|
db_tracker_->RemoveObserver(this);
|
||||||
instance_ = NULL;
|
instance_ = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,6 +118,9 @@ void BrowserDatabaseSystem::DatabaseClosed(const string16& origin_identifier,
|
||||||
origin_identifier, database_name));
|
origin_identifier, database_name));
|
||||||
db_tracker_->DatabaseClosed(origin_identifier, database_name);
|
db_tracker_->DatabaseClosed(origin_identifier, database_name);
|
||||||
database_connections_.RemoveConnection(origin_identifier, database_name);
|
database_connections_.RemoveConnection(origin_identifier, database_name);
|
||||||
|
|
||||||
|
if (waiting_for_dbs_to_close_ && database_connections_.IsEmpty())
|
||||||
|
MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserDatabaseSystem::OnDatabaseSizeChanged(
|
void BrowserDatabaseSystem::OnDatabaseSizeChanged(
|
||||||
|
@ -144,13 +152,22 @@ void BrowserDatabaseSystem::databaseClosed(const WebKit::WebDatabase& database)
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserDatabaseSystem::ClearAllDatabases() {
|
void BrowserDatabaseSystem::ClearAllDatabases() {
|
||||||
db_tracker_->CloseDatabases(database_connections_);
|
// Wait for all databases to be closed.
|
||||||
database_connections_.RemoveAllConnections();
|
if (!database_connections_.IsEmpty()) {
|
||||||
|
AutoReset waiting_for_dbs_auto_reset(&waiting_for_dbs_to_close_, true);
|
||||||
|
MessageLoop::ScopedNestableTaskAllower nestable(MessageLoop::current());
|
||||||
|
MessageLoop::current()->Run();
|
||||||
|
}
|
||||||
|
|
||||||
db_tracker_->CloseTrackerDatabaseAndClearCaches();
|
db_tracker_->CloseTrackerDatabaseAndClearCaches();
|
||||||
file_util::Delete(db_tracker_->DatabaseDirectory(), true);
|
file_util::Delete(db_tracker_->DatabaseDirectory(), true);
|
||||||
file_names_.clear();
|
file_names_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BrowserDatabaseSystem::SetDatabaseQuota(int64 quota) {
|
||||||
|
db_tracker_->SetDefaultQuota(quota);
|
||||||
|
}
|
||||||
|
|
||||||
void BrowserDatabaseSystem::SetFullFilePathsForVfsFile(
|
void BrowserDatabaseSystem::SetFullFilePathsForVfsFile(
|
||||||
const string16& origin_identifier,
|
const string16& origin_identifier,
|
||||||
const string16& database_name) {
|
const string16& database_name) {
|
||||||
|
|
|
@ -53,6 +53,7 @@ class BrowserDatabaseSystem : public webkit_database::DatabaseTracker::Observer,
|
||||||
virtual void databaseClosed(const WebKit::WebDatabase& database);
|
virtual void databaseClosed(const WebKit::WebDatabase& database);
|
||||||
|
|
||||||
void ClearAllDatabases();
|
void ClearAllDatabases();
|
||||||
|
void SetDatabaseQuota(int64 quota);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// The calls that come from the database tracker run on the main thread.
|
// The calls that come from the database tracker run on the main thread.
|
||||||
|
@ -68,6 +69,8 @@ class BrowserDatabaseSystem : public webkit_database::DatabaseTracker::Observer,
|
||||||
|
|
||||||
static BrowserDatabaseSystem* instance_;
|
static BrowserDatabaseSystem* instance_;
|
||||||
|
|
||||||
|
bool waiting_for_dbs_to_close_;
|
||||||
|
|
||||||
ScopedTempDir temp_dir_;
|
ScopedTempDir temp_dir_;
|
||||||
|
|
||||||
scoped_refptr<webkit_database::DatabaseTracker> db_tracker_;
|
scoped_refptr<webkit_database::DatabaseTracker> db_tracker_;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
#include "context.h"
|
#include "context.h"
|
||||||
#include "browser_impl.h"
|
#include "browser_impl.h"
|
||||||
|
#include "browser_webkit_glue.h"
|
||||||
#include "request_impl.h"
|
#include "request_impl.h"
|
||||||
|
|
||||||
#include "base/string_util.h"
|
#include "base/string_util.h"
|
||||||
|
@ -16,7 +17,6 @@
|
||||||
#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h"
|
||||||
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
|
||||||
#include "webkit/glue/glue_serialize.h"
|
#include "webkit/glue/glue_serialize.h"
|
||||||
#include "webkit/glue/glue_util.h"
|
|
||||||
|
|
||||||
using WebKit::WebFrame;
|
using WebKit::WebFrame;
|
||||||
using WebKit::WebHTTPBody;
|
using WebKit::WebHTTPBody;
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "net/base/cookie_monster.h"
|
#include "net/base/cookie_monster.h"
|
||||||
#include "net/base/host_resolver.h"
|
#include "net/base/host_resolver.h"
|
||||||
#include "net/base/ssl_config_service.h"
|
#include "net/base/ssl_config_service.h"
|
||||||
|
#include "net/base/static_cookie_policy.h"
|
||||||
#include "net/ftp/ftp_network_layer.h"
|
#include "net/ftp/ftp_network_layer.h"
|
||||||
#include "net/proxy/proxy_config_service.h"
|
#include "net/proxy/proxy_config_service.h"
|
||||||
#include "net/proxy/proxy_config_service_fixed.h"
|
#include "net/proxy/proxy_config_service_fixed.h"
|
||||||
|
@ -32,7 +33,8 @@ void BrowserRequestContext::Init(
|
||||||
const FilePath& cache_path,
|
const FilePath& cache_path,
|
||||||
net::HttpCache::Mode cache_mode,
|
net::HttpCache::Mode cache_mode,
|
||||||
bool no_proxy) {
|
bool no_proxy) {
|
||||||
cookie_store_ = new net::CookieMonster();
|
cookie_store_ = new net::CookieMonster(NULL);
|
||||||
|
cookie_policy_ = new net::StaticCookiePolicy();
|
||||||
|
|
||||||
// hard-code A-L and A-C for test shells
|
// hard-code A-L and A-C for test shells
|
||||||
accept_language_ = "en-us,en";
|
accept_language_ = "en-us,en";
|
||||||
|
@ -41,17 +43,17 @@ void BrowserRequestContext::Init(
|
||||||
// Use the system proxy settings.
|
// Use the system proxy settings.
|
||||||
scoped_ptr<net::ProxyConfigService> proxy_config_service(
|
scoped_ptr<net::ProxyConfigService> proxy_config_service(
|
||||||
net::ProxyService::CreateSystemProxyConfigService(NULL, NULL));
|
net::ProxyService::CreateSystemProxyConfigService(NULL, NULL));
|
||||||
host_resolver_ = net::CreateSystemHostResolver();
|
host_resolver_ = net::CreateSystemHostResolver(NULL);
|
||||||
proxy_service_ = net::ProxyService::Create(proxy_config_service.release(),
|
proxy_service_ = net::ProxyService::Create(proxy_config_service.release(),
|
||||||
false, NULL, NULL, NULL);
|
false, NULL, NULL, NULL);
|
||||||
ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService();
|
ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService();
|
||||||
|
|
||||||
net::HttpCache *cache;
|
net::HttpCache *cache;
|
||||||
if (cache_path.empty()) {
|
if (cache_path.empty()) {
|
||||||
cache = new net::HttpCache(host_resolver_, proxy_service_,
|
cache = new net::HttpCache(NULL, host_resolver_, proxy_service_,
|
||||||
ssl_config_service_, 0);
|
ssl_config_service_, 0);
|
||||||
} else {
|
} else {
|
||||||
cache = new net::HttpCache(host_resolver_, proxy_service_,
|
cache = new net::HttpCache(NULL, host_resolver_, proxy_service_,
|
||||||
ssl_config_service_, cache_path, 0);
|
ssl_config_service_, cache_path, 0);
|
||||||
}
|
}
|
||||||
cache->set_mode(cache_mode);
|
cache->set_mode(cache_mode);
|
||||||
|
@ -63,6 +65,7 @@ void BrowserRequestContext::Init(
|
||||||
BrowserRequestContext::~BrowserRequestContext() {
|
BrowserRequestContext::~BrowserRequestContext() {
|
||||||
delete ftp_transaction_factory_;
|
delete ftp_transaction_factory_;
|
||||||
delete http_transaction_factory_;
|
delete http_transaction_factory_;
|
||||||
|
delete static_cast<net::StaticCookiePolicy*>(cookie_policy_);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& BrowserRequestContext::GetUserAgent(
|
const std::string& BrowserRequestContext::GetUserAgent(
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#include "net/base/load_flags.h"
|
#include "net/base/load_flags.h"
|
||||||
#include "net/base/net_errors.h"
|
#include "net/base/net_errors.h"
|
||||||
#include "net/base/net_util.h"
|
#include "net/base/net_util.h"
|
||||||
|
#include "net/base/static_cookie_policy.h"
|
||||||
#include "net/base/upload_data.h"
|
#include "net/base/upload_data.h"
|
||||||
#include "net/http/http_response_headers.h"
|
#include "net/http/http_response_headers.h"
|
||||||
#include "net/http/http_util.h"
|
#include "net/http/http_util.h"
|
||||||
|
@ -61,8 +62,8 @@
|
||||||
#include "webkit/glue/resource_loader_bridge.h"
|
#include "webkit/glue/resource_loader_bridge.h"
|
||||||
|
|
||||||
using webkit_glue::ResourceLoaderBridge;
|
using webkit_glue::ResourceLoaderBridge;
|
||||||
using net::CookiePolicy;
|
|
||||||
using net::HttpResponseHeaders;
|
using net::HttpResponseHeaders;
|
||||||
|
using net::StaticCookiePolicy;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -762,7 +763,7 @@ bool FindProxyForUrl(const GURL& url, std::string* proxy_list) {
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void BrowserResourceLoaderBridge::Init(URLRequestContext* context) {
|
void BrowserResourceLoaderBridge::Init(BrowserRequestContext* context) {
|
||||||
// Make sure to stop any existing IO thread since it may be using the
|
// Make sure to stop any existing IO thread since it may be using the
|
||||||
// current request context.
|
// current request context.
|
||||||
Shutdown();
|
Shutdown();
|
||||||
|
@ -836,7 +837,9 @@ bool BrowserResourceLoaderBridge::EnsureIOThread() {
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void BrowserResourceLoaderBridge::SetAcceptAllCookies(bool accept_all_cookies) {
|
void BrowserResourceLoaderBridge::SetAcceptAllCookies(bool accept_all_cookies) {
|
||||||
CookiePolicy::Type policy_type = accept_all_cookies ?
|
StaticCookiePolicy::Type policy_type = accept_all_cookies ?
|
||||||
CookiePolicy::ALLOW_ALL_COOKIES : CookiePolicy::BLOCK_THIRD_PARTY_COOKIES;
|
StaticCookiePolicy::ALLOW_ALL_COOKIES :
|
||||||
request_context->cookie_policy()->set_type(policy_type);
|
StaticCookiePolicy::BLOCK_THIRD_PARTY_COOKIES;
|
||||||
|
static_cast<StaticCookiePolicy*>(request_context->cookie_policy())->
|
||||||
|
set_type(policy_type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class GURL;
|
class GURL;
|
||||||
class URLRequestContext;
|
class BrowserRequestContext;
|
||||||
|
|
||||||
class BrowserResourceLoaderBridge {
|
class BrowserResourceLoaderBridge {
|
||||||
public:
|
public:
|
||||||
|
@ -23,7 +23,7 @@ class BrowserResourceLoaderBridge {
|
||||||
// NOTE: If this function is not called, then a default request context will
|
// NOTE: If this function is not called, then a default request context will
|
||||||
// be initialized lazily.
|
// be initialized lazily.
|
||||||
//
|
//
|
||||||
static void Init(URLRequestContext* context);
|
static void Init(BrowserRequestContext* context);
|
||||||
|
|
||||||
// Call this function to shutdown the simple resource loader bridge.
|
// Call this function to shutdown the simple resource loader bridge.
|
||||||
static void Shutdown();
|
static void Shutdown();
|
||||||
|
|
|
@ -20,10 +20,11 @@ MSVC_POP_WARNING();
|
||||||
#include "base/resource_util.h"
|
#include "base/resource_util.h"
|
||||||
#include "base/scoped_ptr.h"
|
#include "base/scoped_ptr.h"
|
||||||
#include "base/string16.h"
|
#include "base/string16.h"
|
||||||
|
#include "base/string_util.h"
|
||||||
#include "base/win_util.h"
|
#include "base/win_util.h"
|
||||||
#include "net/base/mime_util.h"
|
#include "net/base/mime_util.h"
|
||||||
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
|
||||||
#include "webkit/glue/glue_util.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
|
||||||
#include "webkit/glue/webkit_glue.h"
|
#include "webkit/glue/webkit_glue.h"
|
||||||
|
|
||||||
// Generated by GRIT
|
// Generated by GRIT
|
||||||
|
@ -204,4 +205,15 @@ void ClearCache()
|
||||||
WebCore::cache()->setDisabled(false);
|
WebCore::cache()->setDisabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WebKit::WebString StdStringToWebString(const std::string& str) {
|
||||||
|
return WebKit::WebString::fromUTF8(str.data(), str.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string WebStringToStdString(const WebKit::WebString& str) {
|
||||||
|
std::string ret;
|
||||||
|
if (!str.isNull())
|
||||||
|
UTF16ToUTF8(str.data(), str.length(), &ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace webkit_glue
|
} // namespace webkit_glue
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
namespace WebKit {
|
namespace WebKit {
|
||||||
class WebFrame;
|
class WebFrame;
|
||||||
|
class WebString;
|
||||||
class WebView;
|
class WebView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,4 +39,8 @@ v8::Handle<v8::Context> GetV8Context(WebKit::WebFrame* frame);
|
||||||
// Clear all cached data.
|
// Clear all cached data.
|
||||||
void ClearCache();
|
void ClearCache();
|
||||||
|
|
||||||
|
WebKit::WebString StdStringToWebString(const std::string& str);
|
||||||
|
|
||||||
|
std::string WebStringToStdString(const WebKit::WebString& str);
|
||||||
|
|
||||||
} // namespace webkit_glue
|
} // namespace webkit_glue
|
||||||
|
|
|
@ -61,8 +61,13 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
|
||||||
// Construct and initialize an appcache system for this scope.
|
// Construct and initialize an appcache system for this scope.
|
||||||
// A new empty temp directory is created to house any cached
|
// A new empty temp directory is created to house any cached
|
||||||
// content during the run. Upon exit that directory is deleted.
|
// content during the run. Upon exit that directory is deleted.
|
||||||
if (appcache_dir_.CreateUniqueTempDir())
|
// If we can't create a tempdir, we'll use in-memory storage.
|
||||||
BrowserAppCacheSystem::InitializeOnUIThread(appcache_dir_.path());
|
if (!appcache_dir_.CreateUniqueTempDir()) {
|
||||||
|
LOG(WARNING) << "Failed to create a temp dir for the appcache, "
|
||||||
|
"using in-memory storage.";
|
||||||
|
DCHECK(appcache_dir_.path().empty());
|
||||||
|
}
|
||||||
|
BrowserAppCacheSystem::InitializeOnUIThread(appcache_dir_.path());
|
||||||
|
|
||||||
WebKit::WebDatabase::setObserver(&database_system_);
|
WebKit::WebDatabase::setObserver(&database_system_);
|
||||||
}
|
}
|
||||||
|
@ -177,24 +182,11 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
|
||||||
quota);
|
quota);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual WebKit::WebStorageNamespace* createSessionStorageNamespace() {
|
|
||||||
return WebKit::WebStorageNamespace::createSessionStorageNamespace();
|
|
||||||
}
|
|
||||||
|
|
||||||
void dispatchStorageEvent(const WebKit::WebString& key,
|
void dispatchStorageEvent(const WebKit::WebString& key,
|
||||||
const WebKit::WebString& old_value, const WebKit::WebString& new_value,
|
const WebKit::WebString& old_value, const WebKit::WebString& new_value,
|
||||||
const WebKit::WebString& origin, const WebKit::WebURL& url,
|
const WebKit::WebString& origin, const WebKit::WebURL& url,
|
||||||
bool is_local_storage) {
|
bool is_local_storage) {
|
||||||
// TODO(jorlow): Implement
|
// The event is dispatched by the proxy.
|
||||||
if (!is_local_storage)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!dom_storage_event_dispatcher_.get()) {
|
|
||||||
dom_storage_event_dispatcher_.reset(
|
|
||||||
WebKit::WebStorageEventDispatcher::create());
|
|
||||||
}
|
|
||||||
dom_storage_event_dispatcher_->dispatchStorageEvent(
|
|
||||||
key, old_value, new_value, origin, url, is_local_storage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual WebKit::WebApplicationCacheHost* createApplicationCacheHost(
|
virtual WebKit::WebApplicationCacheHost* createApplicationCacheHost(
|
||||||
|
@ -212,7 +204,6 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
|
||||||
ScopedTempDir appcache_dir_;
|
ScopedTempDir appcache_dir_;
|
||||||
BrowserAppCacheSystem appcache_system_;
|
BrowserAppCacheSystem appcache_system_;
|
||||||
BrowserDatabaseSystem database_system_;
|
BrowserDatabaseSystem database_system_;
|
||||||
scoped_ptr<WebKit::WebStorageEventDispatcher> dom_storage_event_dispatcher_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _BROWSER_WEBKIT_INIT_H
|
#endif // _BROWSER_WEBKIT_INIT_H
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h"
|
||||||
#include "third_party/WebKit/WebKit/chromium/public/WebRange.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebRange.h"
|
||||||
#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
|
||||||
|
#include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h"
|
||||||
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
|
||||||
#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
|
||||||
#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h"
|
||||||
|
@ -44,9 +45,8 @@
|
||||||
#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h"
|
||||||
#include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
|
||||||
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
|
||||||
#include "webkit/appcache/appcache_interfaces.h"
|
#include "webkit/appcache/web_application_cache_host_impl.h"
|
||||||
#include "webkit/glue/glue_serialize.h"
|
#include "webkit/glue/glue_serialize.h"
|
||||||
#include "webkit/glue/glue_util.h"
|
|
||||||
#include "webkit/glue/media/buffered_data_source.h"
|
#include "webkit/glue/media/buffered_data_source.h"
|
||||||
#include "webkit/glue/media/media_resource_loader_bridge_factory.h"
|
#include "webkit/glue/media/media_resource_loader_bridge_factory.h"
|
||||||
#include "webkit/glue/media/simple_data_source.h"
|
#include "webkit/glue/media/simple_data_source.h"
|
||||||
|
@ -66,6 +66,7 @@
|
||||||
#include "browser_drop_delegate.h"
|
#include "browser_drop_delegate.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
using appcache::WebApplicationCacheHostImpl;
|
||||||
using WebKit::WebConsoleMessage;
|
using WebKit::WebConsoleMessage;
|
||||||
using WebKit::WebContextMenuData;
|
using WebKit::WebContextMenuData;
|
||||||
using WebKit::WebData;
|
using WebKit::WebData;
|
||||||
|
@ -90,6 +91,7 @@ using WebKit::WebRect;
|
||||||
using WebKit::WebScreenInfo;
|
using WebKit::WebScreenInfo;
|
||||||
using WebKit::WebSecurityOrigin;
|
using WebKit::WebSecurityOrigin;
|
||||||
using WebKit::WebSize;
|
using WebKit::WebSize;
|
||||||
|
using WebKit::WebStorageNamespace;
|
||||||
using WebKit::WebString;
|
using WebKit::WebString;
|
||||||
using WebKit::WebTextAffinity;
|
using WebKit::WebTextAffinity;
|
||||||
using WebKit::WebTextDirection;
|
using WebKit::WebTextDirection;
|
||||||
|
@ -139,6 +141,10 @@ WebWidget* BrowserWebViewDelegate::createPopupMenu(
|
||||||
return browser_->UIT_CreatePopupWidget();
|
return browser_->UIT_CreatePopupWidget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WebStorageNamespace* BrowserWebViewDelegate::createSessionStorageNamespace() {
|
||||||
|
return WebKit::WebStorageNamespace::createSessionStorageNamespace();
|
||||||
|
}
|
||||||
|
|
||||||
void BrowserWebViewDelegate::didAddMessageToConsole(
|
void BrowserWebViewDelegate::didAddMessageToConsole(
|
||||||
const WebConsoleMessage& message, const WebString& source_name,
|
const WebConsoleMessage& message, const WebString& source_name,
|
||||||
unsigned source_line) {
|
unsigned source_line) {
|
||||||
|
@ -452,6 +458,9 @@ WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer(
|
||||||
scoped_refptr<media::FilterFactoryCollection> factory =
|
scoped_refptr<media::FilterFactoryCollection> factory =
|
||||||
new media::FilterFactoryCollection();
|
new media::FilterFactoryCollection();
|
||||||
|
|
||||||
|
WebApplicationCacheHostImpl* appcache_host =
|
||||||
|
WebApplicationCacheHostImpl::FromFrame(frame);
|
||||||
|
|
||||||
// TODO(hclam): this is the same piece of code as in RenderView, maybe they
|
// TODO(hclam): this is the same piece of code as in RenderView, maybe they
|
||||||
// should be grouped together.
|
// should be grouped together.
|
||||||
webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory =
|
webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory =
|
||||||
|
@ -460,7 +469,7 @@ WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer(
|
||||||
"null", // frame origin
|
"null", // frame origin
|
||||||
"null", // main_frame_origin
|
"null", // main_frame_origin
|
||||||
base::GetCurrentProcId(),
|
base::GetCurrentProcId(),
|
||||||
appcache::kNoHostId,
|
appcache_host ? appcache_host->host_id() : appcache::kNoHostId,
|
||||||
0);
|
0);
|
||||||
// A simple data source that keeps all data in memory.
|
// A simple data source that keeps all data in memory.
|
||||||
media::FilterFactory* simple_data_source_factory =
|
media::FilterFactory* simple_data_source_factory =
|
||||||
|
|
|
@ -49,6 +49,7 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
|
||||||
virtual WebKit::WebWidget* createPopupMenu(bool activatable);
|
virtual WebKit::WebWidget* createPopupMenu(bool activatable);
|
||||||
virtual WebKit::WebWidget* createPopupMenu(
|
virtual WebKit::WebWidget* createPopupMenu(
|
||||||
const WebKit::WebPopupMenuInfo& info);
|
const WebKit::WebPopupMenuInfo& info);
|
||||||
|
virtual WebKit::WebStorageNamespace* createSessionStorageNamespace();
|
||||||
virtual void didAddMessageToConsole(
|
virtual void didAddMessageToConsole(
|
||||||
const WebKit::WebConsoleMessage& message,
|
const WebKit::WebConsoleMessage& message,
|
||||||
const WebKit::WebString& source_name, unsigned source_line);
|
const WebKit::WebString& source_name, unsigned source_line);
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// can be found in the LICENSE file.
|
// can be found in the LICENSE file.
|
||||||
|
|
||||||
#include "request_impl.h"
|
#include "request_impl.h"
|
||||||
|
#include "browser_webkit_glue.h"
|
||||||
|
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "base/string_util.h"
|
#include "base/string_util.h"
|
||||||
|
@ -10,7 +11,6 @@
|
||||||
#include "net/http/http_util.h"
|
#include "net/http/http_util.h"
|
||||||
#include "net/url_request/url_request.h"
|
#include "net/url_request/url_request.h"
|
||||||
#include "third_party/WebKit/WebKit/chromium/public/WebHTTPHeaderVisitor.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebHTTPHeaderVisitor.h"
|
||||||
#include "webkit/glue/glue_util.h"
|
|
||||||
|
|
||||||
using net::HttpResponseHeaders;
|
using net::HttpResponseHeaders;
|
||||||
|
|
||||||
|
|
|
@ -15,12 +15,10 @@
|
||||||
|
|
||||||
// Clipboard glue
|
// Clipboard glue
|
||||||
|
|
||||||
#if defined(OS_WIN)
|
|
||||||
void ScopedClipboardWriterGlue::WriteBitmapFromPixels(
|
void ScopedClipboardWriterGlue::WriteBitmapFromPixels(
|
||||||
const void* pixels, const gfx::Size& size) {
|
const void* pixels, const gfx::Size& size) {
|
||||||
ScopedClipboardWriter::WriteBitmapFromPixels(pixels, size);
|
ScopedClipboardWriter::WriteBitmapFromPixels(pixels, size);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
ScopedClipboardWriterGlue::~ScopedClipboardWriterGlue() {
|
ScopedClipboardWriterGlue::~ScopedClipboardWriterGlue() {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue