mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 194165.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1232 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -17,5 +17,5 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
|
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
|
||||||
'chromium_revision': '190564',
|
'chromium_revision': '194165',
|
||||||
}
|
}
|
||||||
|
@@ -735,10 +735,8 @@
|
|||||||
'libcef/xml_reader_impl.h',
|
'libcef/xml_reader_impl.h',
|
||||||
'libcef/zip_reader_impl.cc',
|
'libcef/zip_reader_impl.cc',
|
||||||
'libcef/zip_reader_impl.h',
|
'libcef/zip_reader_impl.h',
|
||||||
'<(DEPTH)/chrome/browser/net/clear_on_exit_policy.cc',
|
'<(DEPTH)/content/browser/net/sqlite_persistent_cookie_store.cc',
|
||||||
'<(DEPTH)/chrome/browser/net/clear_on_exit_policy.h',
|
'<(DEPTH)/content/browser/net/sqlite_persistent_cookie_store.h',
|
||||||
'<(DEPTH)/chrome/browser/net/sqlite_persistent_cookie_store.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/net/sqlite_persistent_cookie_store.h',
|
|
||||||
# DevTools resource IDs generated by grit
|
# DevTools resource IDs generated by grit
|
||||||
'<(grit_out_dir)/grit/devtools_resources_map.cc',
|
'<(grit_out_dir)/grit/devtools_resources_map.cc',
|
||||||
# Geolocation implementation
|
# Geolocation implementation
|
||||||
|
@@ -481,11 +481,6 @@ typedef struct _cef_browser_settings_t {
|
|||||||
///
|
///
|
||||||
bool accelerated_plugins_disabled;
|
bool accelerated_plugins_disabled;
|
||||||
|
|
||||||
///
|
|
||||||
// Set to true (1) to disable developer tools (WebKit inspector).
|
|
||||||
///
|
|
||||||
bool developer_tools_disabled;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
// Set to true (1) to enable fullscreen mode.
|
// Set to true (1) to enable fullscreen mode.
|
||||||
///
|
///
|
||||||
@@ -1085,9 +1080,7 @@ enum cef_dom_event_category_t {
|
|||||||
DOM_EVENT_CATEGORY_POPSTATE = 0x2000,
|
DOM_EVENT_CATEGORY_POPSTATE = 0x2000,
|
||||||
DOM_EVENT_CATEGORY_PROGRESS = 0x4000,
|
DOM_EVENT_CATEGORY_PROGRESS = 0x4000,
|
||||||
DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = 0x8000,
|
DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = 0x8000,
|
||||||
DOM_EVENT_CATEGORY_WEBKIT_ANIMATION = 0x10000,
|
DOM_EVENT_CATEGORY_BEFORE_LOAD = 0x10000,
|
||||||
DOM_EVENT_CATEGORY_WEBKIT_TRANSITION = 0x20000,
|
|
||||||
DOM_EVENT_CATEGORY_BEFORE_LOAD = 0x40000,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@@ -405,7 +405,6 @@ struct CefBrowserSettingsTraits {
|
|||||||
src->accelerated_2d_canvas_disabled;
|
src->accelerated_2d_canvas_disabled;
|
||||||
target->accelerated_filters_disabled = src->accelerated_filters_disabled;
|
target->accelerated_filters_disabled = src->accelerated_filters_disabled;
|
||||||
target->accelerated_plugins_disabled = src->accelerated_plugins_disabled;
|
target->accelerated_plugins_disabled = src->accelerated_plugins_disabled;
|
||||||
target->developer_tools_disabled = src->developer_tools_disabled;
|
|
||||||
target->fullscreen_enabled = src->fullscreen_enabled;
|
target->fullscreen_enabled = src->fullscreen_enabled;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -393,7 +393,7 @@ BrowserAppCacheSystem::~BrowserAppCacheSystem() {
|
|||||||
void BrowserAppCacheSystem::InitOnUIThread(
|
void BrowserAppCacheSystem::InitOnUIThread(
|
||||||
const base::FilePath& cache_directory) {
|
const base::FilePath& cache_directory) {
|
||||||
DCHECK(!ui_message_loop_);
|
DCHECK(!ui_message_loop_);
|
||||||
ui_message_loop_ = MessageLoop::current();
|
ui_message_loop_ = base::MessageLoop::current();
|
||||||
cache_directory_ = cache_directory;
|
cache_directory_ = cache_directory;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -403,7 +403,7 @@ void BrowserAppCacheSystem::InitOnIOThread(
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
DCHECK(!io_message_loop_);
|
DCHECK(!io_message_loop_);
|
||||||
io_message_loop_ = MessageLoop::current();
|
io_message_loop_ = base::MessageLoop::current();
|
||||||
|
|
||||||
if (!db_thread_.IsRunning())
|
if (!db_thread_.IsRunning())
|
||||||
db_thread_.Start();
|
db_thread_.Start();
|
||||||
|
@@ -99,10 +99,14 @@ class BrowserAppCacheSystem {
|
|||||||
GURL* manifest_url);
|
GURL* manifest_url);
|
||||||
|
|
||||||
// Helpers
|
// Helpers
|
||||||
MessageLoop* io_message_loop() { return io_message_loop_; }
|
base::MessageLoop* io_message_loop() { return io_message_loop_; }
|
||||||
MessageLoop* ui_message_loop() { return ui_message_loop_; }
|
base::MessageLoop* ui_message_loop() { return ui_message_loop_; }
|
||||||
bool is_io_thread() { return MessageLoop::current() == io_message_loop_; }
|
bool is_io_thread() {
|
||||||
bool is_ui_thread() { return MessageLoop::current() == ui_message_loop_; }
|
return base::MessageLoop::current() == io_message_loop_;
|
||||||
|
}
|
||||||
|
bool is_ui_thread() {
|
||||||
|
return base::MessageLoop::current() == ui_message_loop_;
|
||||||
|
}
|
||||||
bool is_initialized() {
|
bool is_initialized() {
|
||||||
return io_message_loop_ && is_initailized_on_ui_thread();
|
return io_message_loop_ && is_initailized_on_ui_thread();
|
||||||
}
|
}
|
||||||
@@ -111,8 +115,8 @@ class BrowserAppCacheSystem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
base::FilePath cache_directory_;
|
base::FilePath cache_directory_;
|
||||||
MessageLoop* io_message_loop_;
|
base::MessageLoop* io_message_loop_;
|
||||||
MessageLoop* ui_message_loop_;
|
base::MessageLoop* ui_message_loop_;
|
||||||
scoped_refptr<BrowserBackendProxy> backend_proxy_;
|
scoped_refptr<BrowserBackendProxy> backend_proxy_;
|
||||||
scoped_refptr<BrowserFrontendProxy> frontend_proxy_;
|
scoped_refptr<BrowserFrontendProxy> frontend_proxy_;
|
||||||
appcache::AppCacheFrontendImpl frontend_impl_;
|
appcache::AppCacheFrontendImpl frontend_impl_;
|
||||||
|
@@ -24,7 +24,8 @@ namespace {
|
|||||||
class WebKitClientMessageLoopImpl
|
class WebKitClientMessageLoopImpl
|
||||||
: public WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop {
|
: public WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop {
|
||||||
public:
|
public:
|
||||||
WebKitClientMessageLoopImpl() : message_loop_(MessageLoop::current()) { }
|
WebKitClientMessageLoopImpl()
|
||||||
|
: message_loop_(base::MessageLoop::current()) { }
|
||||||
virtual ~WebKitClientMessageLoopImpl() {
|
virtual ~WebKitClientMessageLoopImpl() {
|
||||||
message_loop_ = NULL;
|
message_loop_ = NULL;
|
||||||
}
|
}
|
||||||
@@ -38,7 +39,7 @@ class WebKitClientMessageLoopImpl
|
|||||||
message_loop_->QuitNow();
|
message_loop_->QuitNow();
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
MessageLoop* message_loop_;
|
base::MessageLoop* message_loop_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
@@ -79,7 +80,7 @@ WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop*
|
|||||||
}
|
}
|
||||||
|
|
||||||
void BrowserDevToolsAgent::AsyncCall(const BrowserDevToolsCallArgs &args) {
|
void BrowserDevToolsAgent::AsyncCall(const BrowserDevToolsCallArgs &args) {
|
||||||
MessageLoop::current()->PostTask(
|
base::MessageLoop::current()->PostTask(
|
||||||
FROM_HERE,
|
FROM_HERE,
|
||||||
base::Bind(&BrowserDevToolsAgent::Call, weak_factory_.GetWeakPtr(),
|
base::Bind(&BrowserDevToolsAgent::Call, weak_factory_.GetWeakPtr(),
|
||||||
args));
|
args));
|
||||||
|
@@ -68,7 +68,7 @@ void BrowserDevToolsClient::undockWindow() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void BrowserDevToolsClient::AsyncCall(const BrowserDevToolsCallArgs &args) {
|
void BrowserDevToolsClient::AsyncCall(const BrowserDevToolsCallArgs &args) {
|
||||||
MessageLoop::current()->PostTask(
|
base::MessageLoop::current()->PostTask(
|
||||||
FROM_HERE,
|
FROM_HERE,
|
||||||
base::Bind(&BrowserDevToolsClient::Call, weak_factory_.GetWeakPtr(),
|
base::Bind(&BrowserDevToolsClient::Call, weak_factory_.GetWeakPtr(),
|
||||||
args));
|
args));
|
||||||
|
@@ -140,7 +140,7 @@ void BrowserDragDelegate::StartDragging(const WebDropData& drop_data,
|
|||||||
DCHECK(!drag_drop_thread_.get());
|
DCHECK(!drag_drop_thread_.get());
|
||||||
drag_drop_thread_.reset(new DragDropThread(this));
|
drag_drop_thread_.reset(new DragDropThread(this));
|
||||||
base::Thread::Options options;
|
base::Thread::Options options;
|
||||||
options.message_loop_type = MessageLoop::TYPE_UI;
|
options.message_loop_type = base::MessageLoop::TYPE_UI;
|
||||||
if (drag_drop_thread_->StartWithOptions(options)) {
|
if (drag_drop_thread_->StartWithOptions(options)) {
|
||||||
drag_drop_thread_->message_loop()->PostTask(
|
drag_drop_thread_->message_loop()->PostTask(
|
||||||
FROM_HERE,
|
FROM_HERE,
|
||||||
@@ -304,7 +304,8 @@ void BrowserDragDelegate::DoDragging(const WebDropData& drop_data,
|
|||||||
// updates while in the system DoDragDrop loop.
|
// updates while in the system DoDragDrop loop.
|
||||||
DWORD effect;
|
DWORD effect;
|
||||||
{
|
{
|
||||||
MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
|
base::MessageLoop::ScopedNestableTaskAllower allow(
|
||||||
|
base::MessageLoop::current());
|
||||||
DoDragDrop(ui::OSExchangeDataProviderWin::GetIDataObject(data),
|
DoDragDrop(ui::OSExchangeDataProviderWin::GetIDataObject(data),
|
||||||
drag_source_,
|
drag_source_,
|
||||||
web_drag_utils_win::WebDragOpMaskToWinDragOpMask(ops),
|
web_drag_utils_win::WebDragOpMaskToWinDragOpMask(ops),
|
||||||
|
@@ -55,7 +55,7 @@ using fileapi::FileSystemTaskRunners;
|
|||||||
using fileapi::FileSystemURL;
|
using fileapi::FileSystemURL;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
MessageLoop* g_io_thread;
|
base::MessageLoop* g_io_thread;
|
||||||
webkit_blob::BlobStorageController* g_blob_storage_controller;
|
webkit_blob::BlobStorageController* g_blob_storage_controller;
|
||||||
|
|
||||||
void RegisterBlob(const GURL& blob_url, const base::FilePath& file_path) {
|
void RegisterBlob(const GURL& blob_url, const base::FilePath& file_path) {
|
||||||
@@ -281,7 +281,7 @@ void BrowserFileSystem::createSnapshotFileAndReadMetadata(
|
|||||||
// static
|
// static
|
||||||
void BrowserFileSystem::InitializeOnIOThread(
|
void BrowserFileSystem::InitializeOnIOThread(
|
||||||
webkit_blob::BlobStorageController* blob_storage_controller) {
|
webkit_blob::BlobStorageController* blob_storage_controller) {
|
||||||
g_io_thread = MessageLoop::current();
|
g_io_thread = base::MessageLoop::current();
|
||||||
g_blob_storage_controller = blob_storage_controller;
|
g_blob_storage_controller = blob_storage_controller;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -748,7 +748,7 @@ void CefBrowserImpl::UIT_DestroyBrowser() {
|
|||||||
if (is_modal_) {
|
if (is_modal_) {
|
||||||
// Exit our own internal modal message loop now.
|
// Exit our own internal modal message loop now.
|
||||||
if (internal_modal_message_loop_is_active_) {
|
if (internal_modal_message_loop_is_active_) {
|
||||||
MessageLoop* message_loop = MessageLoop::current();
|
base::MessageLoop* message_loop = base::MessageLoop::current();
|
||||||
message_loop->QuitNow();
|
message_loop->QuitNow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -196,8 +196,7 @@ bool CefBrowserImpl::UIT_CreateBrowser(const CefString& url) {
|
|||||||
paint_delegate_.reset(new PaintDelegate(this));
|
paint_delegate_.reset(new PaintDelegate(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!settings_.developer_tools_disabled)
|
dev_tools_agent_.reset(new BrowserDevToolsAgent());
|
||||||
dev_tools_agent_.reset(new BrowserDevToolsAgent());
|
|
||||||
|
|
||||||
// Add a reference that will be released in UIT_DestroyBrowser().
|
// Add a reference that will be released in UIT_DestroyBrowser().
|
||||||
AddRef();
|
AddRef();
|
||||||
@@ -217,8 +216,7 @@ bool CefBrowserImpl::UIT_CreateBrowser(const CefString& url) {
|
|||||||
if (window_info_.m_bTransparentPainting)
|
if (window_info_.m_bTransparentPainting)
|
||||||
webviewhost_->webview()->setIsTransparent(true);
|
webviewhost_->webview()->setIsTransparent(true);
|
||||||
|
|
||||||
if (!settings_.developer_tools_disabled)
|
dev_tools_agent_->SetWebView(webviewhost_->webview());
|
||||||
dev_tools_agent_->SetWebView(webviewhost_->webview());
|
|
||||||
|
|
||||||
webviewhost_->SetFrameRate(settings_.animation_frame_rate);
|
webviewhost_->SetFrameRate(settings_.animation_frame_rate);
|
||||||
|
|
||||||
@@ -533,8 +531,8 @@ void CefBrowserImpl::UIT_PrintPages(WebKit::WebFrame* frame) {
|
|||||||
page_count = frame->printBegin(printParams);
|
page_count = frame->printBegin(printParams);
|
||||||
|
|
||||||
if (page_count) {
|
if (page_count) {
|
||||||
bool old_state = MessageLoop::current()->NestableTasksAllowed();
|
base::MessageLoop::ScopedNestableTaskAllower allow(
|
||||||
MessageLoop::current()->SetNestableTasksAllowed(false);
|
base::MessageLoop::current());
|
||||||
|
|
||||||
if (print_context_.NewDocument(title_) == printing::PrintingContext::OK) {
|
if (print_context_.NewDocument(title_) == printing::PrintingContext::OK) {
|
||||||
if (settings.ranges.size() > 0) {
|
if (settings.ranges.size() > 0) {
|
||||||
@@ -549,8 +547,6 @@ void CefBrowserImpl::UIT_PrintPages(WebKit::WebFrame* frame) {
|
|||||||
}
|
}
|
||||||
print_context_.DocumentDone();
|
print_context_.DocumentDone();
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageLoop::current()->SetNestableTasksAllowed(old_state);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
frame->printEnd();
|
frame->printEnd();
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
#include "base/thread_task_runner_handle.h"
|
#include "base/thread_task_runner_handle.h"
|
||||||
#include "base/threading/worker_pool.h"
|
#include "base/threading/worker_pool.h"
|
||||||
#include "build/build_config.h"
|
#include "build/build_config.h"
|
||||||
#include "chrome/browser/net/sqlite_persistent_cookie_store.h"
|
#include "content/browser/net/sqlite_persistent_cookie_store.h"
|
||||||
#include "net/base/cert_verifier.h"
|
#include "net/cert/cert_verifier.h"
|
||||||
#include "net/cookies/cookie_monster.h"
|
#include "net/cookies/cookie_monster.h"
|
||||||
#include "net/dns/host_resolver.h"
|
#include "net/dns/host_resolver.h"
|
||||||
#include "net/ftp/ftp_network_layer.h"
|
#include "net/ftp/ftp_network_layer.h"
|
||||||
@@ -304,7 +304,7 @@ void BrowserRequestContext::SetCookieStoragePath(const base::FilePath& path) {
|
|||||||
|
|
||||||
base::FilePath new_path = path;
|
base::FilePath new_path = path;
|
||||||
|
|
||||||
scoped_refptr<SQLitePersistentCookieStore> persistent_store;
|
scoped_refptr<content::SQLitePersistentCookieStore> persistent_store;
|
||||||
if (!new_path.empty()) {
|
if (!new_path.empty()) {
|
||||||
if (!file_util::PathExists(new_path) &&
|
if (!file_util::PathExists(new_path) &&
|
||||||
!file_util::CreateDirectory(new_path)) {
|
!file_util::CreateDirectory(new_path)) {
|
||||||
@@ -314,7 +314,7 @@ void BrowserRequestContext::SetCookieStoragePath(const base::FilePath& path) {
|
|||||||
base::FilePath cookie_path =
|
base::FilePath cookie_path =
|
||||||
new_path.Append(FILE_PATH_LITERAL("Cookies"));
|
new_path.Append(FILE_PATH_LITERAL("Cookies"));
|
||||||
persistent_store =
|
persistent_store =
|
||||||
new SQLitePersistentCookieStore(
|
new content::SQLitePersistentCookieStore(
|
||||||
cookie_path,
|
cookie_path,
|
||||||
CefThread::GetMessageLoopProxyForThread(CefThread::IO),
|
CefThread::GetMessageLoopProxyForThread(CefThread::IO),
|
||||||
CefThread::GetMessageLoopProxyForThread(CefThread::FILE),
|
CefThread::GetMessageLoopProxyForThread(CefThread::FILE),
|
||||||
|
@@ -214,13 +214,13 @@ class RequestProxy : public net::URLRequest::Delegate,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DropPeer() {
|
void DropPeer() {
|
||||||
DCHECK(MessageLoop::current() == owner_loop_);
|
DCHECK(base::MessageLoop::current() == owner_loop_);
|
||||||
peer_ = NULL;
|
peer_ = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start(ResourceLoaderBridge::Peer* peer, RequestParams* params) {
|
void Start(ResourceLoaderBridge::Peer* peer, RequestParams* params) {
|
||||||
peer_ = peer;
|
peer_ = peer;
|
||||||
owner_loop_ = MessageLoop::current();
|
owner_loop_ = base::MessageLoop::current();
|
||||||
|
|
||||||
InitializeParams(params);
|
InitializeParams(params);
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@ class RequestProxy : public net::URLRequest::Delegate,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Cancel() {
|
void Cancel() {
|
||||||
DCHECK(MessageLoop::current() == owner_loop_);
|
DCHECK(base::MessageLoop::current() == owner_loop_);
|
||||||
|
|
||||||
if (download_handler_.get()) {
|
if (download_handler_.get()) {
|
||||||
// WebKit will try to cancel the download but we won't allow it.
|
// WebKit will try to cancel the download but we won't allow it.
|
||||||
@@ -243,7 +243,7 @@ class RequestProxy : public net::URLRequest::Delegate,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SetDefersLoading(bool defer) {
|
void SetDefersLoading(bool defer) {
|
||||||
DCHECK(MessageLoop::current() == owner_loop_);
|
DCHECK(base::MessageLoop::current() == owner_loop_);
|
||||||
|
|
||||||
CefThread::PostTask(CefThread::IO, FROM_HERE, base::Bind(
|
CefThread::PostTask(CefThread::IO, FROM_HERE, base::Bind(
|
||||||
&RequestProxy::AsyncSetDefersLoading, this, defer));
|
&RequestProxy::AsyncSetDefersLoading, this, defer));
|
||||||
@@ -268,7 +268,7 @@ class RequestProxy : public net::URLRequest::Delegate,
|
|||||||
|
|
||||||
void NotifyReceivedRedirect(const GURL& new_url,
|
void NotifyReceivedRedirect(const GURL& new_url,
|
||||||
const ResourceResponseInfo& info) {
|
const ResourceResponseInfo& info) {
|
||||||
DCHECK(MessageLoop::current() == owner_loop_);
|
DCHECK(base::MessageLoop::current() == owner_loop_);
|
||||||
|
|
||||||
bool has_new_first_party_for_cookies = false;
|
bool has_new_first_party_for_cookies = false;
|
||||||
GURL new_first_party_for_cookies;
|
GURL new_first_party_for_cookies;
|
||||||
@@ -285,7 +285,7 @@ class RequestProxy : public net::URLRequest::Delegate,
|
|||||||
|
|
||||||
void NotifyReceivedResponse(const ResourceResponseInfo& info,
|
void NotifyReceivedResponse(const ResourceResponseInfo& info,
|
||||||
const GURL& url, bool allow_download) {
|
const GURL& url, bool allow_download) {
|
||||||
DCHECK(MessageLoop::current() == owner_loop_);
|
DCHECK(base::MessageLoop::current() == owner_loop_);
|
||||||
|
|
||||||
if (browser_.get() && info.headers.get()) {
|
if (browser_.get() && info.headers.get()) {
|
||||||
CefRefPtr<CefClient> client = browser_->GetClient();
|
CefRefPtr<CefClient> client = browser_->GetClient();
|
||||||
@@ -337,7 +337,7 @@ class RequestProxy : public net::URLRequest::Delegate,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void NotifyReceivedData(int bytes_read) {
|
void NotifyReceivedData(int bytes_read) {
|
||||||
DCHECK(MessageLoop::current() == owner_loop_);
|
DCHECK(base::MessageLoop::current() == owner_loop_);
|
||||||
|
|
||||||
if (!peer_)
|
if (!peer_)
|
||||||
return;
|
return;
|
||||||
@@ -382,7 +382,7 @@ class RequestProxy : public net::URLRequest::Delegate,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void NotifyDownloadedData(int bytes_read) {
|
void NotifyDownloadedData(int bytes_read) {
|
||||||
DCHECK(MessageLoop::current() == owner_loop_);
|
DCHECK(base::MessageLoop::current() == owner_loop_);
|
||||||
|
|
||||||
if (!peer_)
|
if (!peer_)
|
||||||
return;
|
return;
|
||||||
@@ -397,7 +397,7 @@ class RequestProxy : public net::URLRequest::Delegate,
|
|||||||
void NotifyCompletedRequest(int error_code,
|
void NotifyCompletedRequest(int error_code,
|
||||||
const std::string& security_info,
|
const std::string& security_info,
|
||||||
const base::TimeTicks& complete_time) {
|
const base::TimeTicks& complete_time) {
|
||||||
DCHECK(MessageLoop::current() == owner_loop_);
|
DCHECK(base::MessageLoop::current() == owner_loop_);
|
||||||
|
|
||||||
// Drain the content filter of all remaining data
|
// Drain the content filter of all remaining data
|
||||||
if (content_filter_.get()) {
|
if (content_filter_.get()) {
|
||||||
@@ -438,7 +438,7 @@ class RequestProxy : public net::URLRequest::Delegate,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void NotifyUploadProgress(uint64 position, uint64 size) {
|
void NotifyUploadProgress(uint64 position, uint64 size) {
|
||||||
DCHECK(MessageLoop::current() == owner_loop_);
|
DCHECK(base::MessageLoop::current() == owner_loop_);
|
||||||
|
|
||||||
if (peer_)
|
if (peer_)
|
||||||
peer_->OnUploadProgress(position, size);
|
peer_->OnUploadProgress(position, size);
|
||||||
@@ -598,7 +598,7 @@ class RequestProxy : public net::URLRequest::Delegate,
|
|||||||
request_->SetPriority(params->priority);
|
request_->SetPriority(params->priority);
|
||||||
request_->set_method(params->method);
|
request_->set_method(params->method);
|
||||||
request_->set_first_party_for_cookies(params->first_party_for_cookies);
|
request_->set_first_party_for_cookies(params->first_party_for_cookies);
|
||||||
request_->set_referrer(params->referrer.spec());
|
request_->SetReferrer(params->referrer.spec());
|
||||||
webkit_glue::ConfigureURLRequestForReferrerPolicy(
|
webkit_glue::ConfigureURLRequestForReferrerPolicy(
|
||||||
request_.get(), params->referrer_policy);
|
request_.get(), params->referrer_policy);
|
||||||
net::HttpRequestHeaders headers;
|
net::HttpRequestHeaders headers;
|
||||||
@@ -947,7 +947,7 @@ class RequestProxy : public net::URLRequest::Delegate,
|
|||||||
|
|
||||||
CefRefPtr<CefBrowserImpl> browser_;
|
CefRefPtr<CefBrowserImpl> browser_;
|
||||||
|
|
||||||
MessageLoop* owner_loop_;
|
base::MessageLoop* owner_loop_;
|
||||||
|
|
||||||
// This is our peer in WebKit (implemented as ResourceHandleInternal). We do
|
// This is our peer in WebKit (implemented as ResourceHandleInternal). We do
|
||||||
// not manage its lifetime, and we may only access it from the owner's
|
// not manage its lifetime, and we may only access it from the owner's
|
||||||
|
@@ -109,7 +109,6 @@ void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web) {
|
|||||||
web.loads_images_automatically = !cef.image_load_disabled;
|
web.loads_images_automatically = !cef.image_load_disabled;
|
||||||
web.plugins_enabled = !cef.plugins_disabled;
|
web.plugins_enabled = !cef.plugins_disabled;
|
||||||
web.dom_paste_enabled = !cef.dom_paste_disabled;
|
web.dom_paste_enabled = !cef.dom_paste_disabled;
|
||||||
web.developer_extras_enabled = !cef.developer_tools_disabled;
|
|
||||||
web.inspector_settings.clear();
|
web.inspector_settings.clear();
|
||||||
web.site_specific_quirks_enabled = !cef.site_specific_quirks_disabled;
|
web.site_specific_quirks_enabled = !cef.site_specific_quirks_disabled;
|
||||||
web.shrinks_standalone_images_to_fit = cef.shrink_standalone_images_to_fit;
|
web.shrinks_standalone_images_to_fit = cef.shrink_standalone_images_to_fit;
|
||||||
|
@@ -24,7 +24,7 @@ const int kNoSocketId = 0;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
MessageLoop* g_io_thread;
|
base::MessageLoop* g_io_thread;
|
||||||
net::URLRequestContext* g_request_context;
|
net::URLRequestContext* g_request_context;
|
||||||
|
|
||||||
class WebSocketStreamHandleBridgeImpl
|
class WebSocketStreamHandleBridgeImpl
|
||||||
@@ -64,7 +64,7 @@ class WebSocketStreamHandleBridgeImpl
|
|||||||
void DoOnClose();
|
void DoOnClose();
|
||||||
|
|
||||||
int socket_id_;
|
int socket_id_;
|
||||||
MessageLoop* message_loop_;
|
base::MessageLoop* message_loop_;
|
||||||
WebKit::WebSocketStreamHandle* handle_;
|
WebKit::WebSocketStreamHandle* handle_;
|
||||||
webkit_glue::WebSocketStreamHandleDelegate* delegate_;
|
webkit_glue::WebSocketStreamHandleDelegate* delegate_;
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ WebSocketStreamHandleBridgeImpl::WebSocketStreamHandleBridgeImpl(
|
|||||||
WebKit::WebSocketStreamHandle* handle,
|
WebKit::WebSocketStreamHandle* handle,
|
||||||
webkit_glue::WebSocketStreamHandleDelegate* delegate)
|
webkit_glue::WebSocketStreamHandleDelegate* delegate)
|
||||||
: socket_id_(kNoSocketId),
|
: socket_id_(kNoSocketId),
|
||||||
message_loop_(MessageLoop::current()),
|
message_loop_(base::MessageLoop::current()),
|
||||||
handle_(handle),
|
handle_(handle),
|
||||||
delegate_(delegate),
|
delegate_(delegate),
|
||||||
num_pending_tasks_(0) {
|
num_pending_tasks_(0) {
|
||||||
@@ -155,7 +155,7 @@ void WebSocketStreamHandleBridgeImpl::OnClose(net::SocketStream* socket) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WebSocketStreamHandleBridgeImpl::DoConnect(const GURL& url) {
|
void WebSocketStreamHandleBridgeImpl::DoConnect(const GURL& url) {
|
||||||
DCHECK(MessageLoop::current() == g_io_thread);
|
DCHECK(base::MessageLoop::current() == g_io_thread);
|
||||||
socket_ = net::SocketStreamJob::CreateSocketStreamJob(
|
socket_ = net::SocketStreamJob::CreateSocketStreamJob(
|
||||||
url, this, g_request_context->transport_security_state(),
|
url, this, g_request_context->transport_security_state(),
|
||||||
g_request_context->ssl_config_service());
|
g_request_context->ssl_config_service());
|
||||||
@@ -164,7 +164,7 @@ void WebSocketStreamHandleBridgeImpl::DoConnect(const GURL& url) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WebSocketStreamHandleBridgeImpl::DoSend(std::vector<char>* data) {
|
void WebSocketStreamHandleBridgeImpl::DoSend(std::vector<char>* data) {
|
||||||
DCHECK(MessageLoop::current() == g_io_thread);
|
DCHECK(base::MessageLoop::current() == g_io_thread);
|
||||||
scoped_ptr<std::vector<char> > scoped_data(data);
|
scoped_ptr<std::vector<char> > scoped_data(data);
|
||||||
if (!socket_)
|
if (!socket_)
|
||||||
return;
|
return;
|
||||||
@@ -173,7 +173,7 @@ void WebSocketStreamHandleBridgeImpl::DoSend(std::vector<char>* data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WebSocketStreamHandleBridgeImpl::DoClose() {
|
void WebSocketStreamHandleBridgeImpl::DoClose() {
|
||||||
DCHECK(MessageLoop::current() == g_io_thread);
|
DCHECK(base::MessageLoop::current() == g_io_thread);
|
||||||
if (!socket_)
|
if (!socket_)
|
||||||
return;
|
return;
|
||||||
socket_->Close();
|
socket_->Close();
|
||||||
@@ -181,14 +181,14 @@ void WebSocketStreamHandleBridgeImpl::DoClose() {
|
|||||||
|
|
||||||
void WebSocketStreamHandleBridgeImpl::DoOnConnected(
|
void WebSocketStreamHandleBridgeImpl::DoOnConnected(
|
||||||
int max_pending_send_allowed) {
|
int max_pending_send_allowed) {
|
||||||
DCHECK(MessageLoop::current() == message_loop_);
|
DCHECK(base::MessageLoop::current() == message_loop_);
|
||||||
base::subtle::NoBarrier_AtomicIncrement(&num_pending_tasks_, -1);
|
base::subtle::NoBarrier_AtomicIncrement(&num_pending_tasks_, -1);
|
||||||
if (delegate_)
|
if (delegate_)
|
||||||
delegate_->DidOpenStream(handle_, max_pending_send_allowed);
|
delegate_->DidOpenStream(handle_, max_pending_send_allowed);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebSocketStreamHandleBridgeImpl::DoOnSentData(int amount_sent) {
|
void WebSocketStreamHandleBridgeImpl::DoOnSentData(int amount_sent) {
|
||||||
DCHECK(MessageLoop::current() == message_loop_);
|
DCHECK(base::MessageLoop::current() == message_loop_);
|
||||||
base::subtle::NoBarrier_AtomicIncrement(&num_pending_tasks_, -1);
|
base::subtle::NoBarrier_AtomicIncrement(&num_pending_tasks_, -1);
|
||||||
if (delegate_)
|
if (delegate_)
|
||||||
delegate_->DidSendData(handle_, amount_sent);
|
delegate_->DidSendData(handle_, amount_sent);
|
||||||
@@ -196,7 +196,7 @@ void WebSocketStreamHandleBridgeImpl::DoOnSentData(int amount_sent) {
|
|||||||
|
|
||||||
void WebSocketStreamHandleBridgeImpl::DoOnReceivedData(
|
void WebSocketStreamHandleBridgeImpl::DoOnReceivedData(
|
||||||
std::vector<char>* data) {
|
std::vector<char>* data) {
|
||||||
DCHECK(MessageLoop::current() == message_loop_);
|
DCHECK(base::MessageLoop::current() == message_loop_);
|
||||||
base::subtle::NoBarrier_AtomicIncrement(&num_pending_tasks_, -1);
|
base::subtle::NoBarrier_AtomicIncrement(&num_pending_tasks_, -1);
|
||||||
scoped_ptr<std::vector<char> > scoped_data(data);
|
scoped_ptr<std::vector<char> > scoped_data(data);
|
||||||
if (delegate_)
|
if (delegate_)
|
||||||
@@ -204,7 +204,7 @@ void WebSocketStreamHandleBridgeImpl::DoOnReceivedData(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WebSocketStreamHandleBridgeImpl::DoOnClose() {
|
void WebSocketStreamHandleBridgeImpl::DoOnClose() {
|
||||||
DCHECK(MessageLoop::current() == message_loop_);
|
DCHECK(base::MessageLoop::current() == message_loop_);
|
||||||
base::subtle::NoBarrier_AtomicIncrement(&num_pending_tasks_, -1);
|
base::subtle::NoBarrier_AtomicIncrement(&num_pending_tasks_, -1);
|
||||||
// Don't handle OnClose if there are pending tasks.
|
// Don't handle OnClose if there are pending tasks.
|
||||||
DCHECK_EQ(num_pending_tasks_, 0);
|
DCHECK_EQ(num_pending_tasks_, 0);
|
||||||
@@ -222,7 +222,7 @@ void WebSocketStreamHandleBridgeImpl::DoOnClose() {
|
|||||||
/* static */
|
/* static */
|
||||||
void BrowserSocketStreamBridge::InitializeOnIOThread(
|
void BrowserSocketStreamBridge::InitializeOnIOThread(
|
||||||
net::URLRequestContext* request_context) {
|
net::URLRequestContext* request_context) {
|
||||||
g_io_thread = MessageLoop::current();
|
g_io_thread = base::MessageLoop::current();
|
||||||
g_request_context = request_context;
|
g_request_context = request_context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -65,4 +65,20 @@ bool BrowserThread::CurrentlyOn(ID identifier) {
|
|||||||
return CefThread::CurrentlyOn(static_cast<CefThread::ID>(cef_id));
|
return CefThread::CurrentlyOn(static_cast<CefThread::ID>(cef_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
scoped_refptr<base::MessageLoopProxy>
|
||||||
|
BrowserThread::GetMessageLoopProxyForThread(ID identifier) {
|
||||||
|
int cef_id = GetCefId(identifier);
|
||||||
|
if (cef_id < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return CefThread::GetMessageLoopProxyForThread(
|
||||||
|
static_cast<CefThread::ID>(cef_id));
|
||||||
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
base::SequencedWorkerPool* BrowserThread::GetBlockingPool() {
|
||||||
|
return CefThread::GetBlockingPool();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace content
|
} // namespace content
|
||||||
|
@@ -19,7 +19,7 @@ using webkit_blob::BlobData;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
MessageLoop* g_io_thread;
|
base::MessageLoop* g_io_thread;
|
||||||
webkit_blob::BlobStorageController* g_blob_storage_controller;
|
webkit_blob::BlobStorageController* g_blob_storage_controller;
|
||||||
|
|
||||||
// Creates a new BlobData from WebBlobData.
|
// Creates a new BlobData from WebBlobData.
|
||||||
@@ -67,7 +67,7 @@ BlobData* NewBlobData(const WebBlobData& data) {
|
|||||||
/* static */
|
/* static */
|
||||||
void BrowserWebBlobRegistryImpl::InitializeOnIOThread(
|
void BrowserWebBlobRegistryImpl::InitializeOnIOThread(
|
||||||
webkit_blob::BlobStorageController* blob_storage_controller) {
|
webkit_blob::BlobStorageController* blob_storage_controller) {
|
||||||
g_io_thread = MessageLoop::current();
|
g_io_thread = base::MessageLoop::current();
|
||||||
g_blob_storage_controller = blob_storage_controller;
|
g_blob_storage_controller = blob_storage_controller;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
#include "third_party/WebKit/Source/WebCore/config.h"
|
#include "third_party/WebKit/Source/WebCore/config.h"
|
||||||
MSVC_PUSH_WARNING_LEVEL(0);
|
MSVC_PUSH_WARNING_LEVEL(0);
|
||||||
#include "ApplicationCacheStorage.h" // NOLINT(build/include)
|
|
||||||
#include "CrossOriginPreflightResultCache.h" // NOLINT(build/include)
|
#include "CrossOriginPreflightResultCache.h" // NOLINT(build/include)
|
||||||
#include "DocumentLoader.h" // NOLINT(build/include)
|
#include "DocumentLoader.h" // NOLINT(build/include)
|
||||||
#include "MemoryCache.h" // NOLINT(build/include)
|
#include "MemoryCache.h" // NOLINT(build/include)
|
||||||
@@ -149,12 +148,7 @@ WebKit::WebGraphicsContext3D* CreateGraphicsContext3D(
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (use_command_buffer) {
|
if (use_command_buffer) {
|
||||||
scoped_ptr<webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl>
|
return new webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl(attributes);
|
||||||
context(
|
|
||||||
new webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl());
|
|
||||||
if (!context->Initialize(attributes, NULL))
|
|
||||||
return NULL;
|
|
||||||
return context.release();
|
|
||||||
} else {
|
} else {
|
||||||
return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView(
|
return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView(
|
||||||
attributes, renderDirectlyToWebView);
|
attributes, renderDirectlyToWebView);
|
||||||
|
@@ -39,7 +39,6 @@ BrowserWebKitInit::BrowserWebKitInit()
|
|||||||
|
|
||||||
WebKit::initialize(this);
|
WebKit::initialize(this);
|
||||||
WebKit::setLayoutTestMode(false);
|
WebKit::setLayoutTestMode(false);
|
||||||
WebKit::WebRuntimeFeatures::enableSockets(true);
|
|
||||||
WebKit::WebRuntimeFeatures::enableApplicationCache(true);
|
WebKit::WebRuntimeFeatures::enableApplicationCache(true);
|
||||||
WebKit::WebRuntimeFeatures::enableDatabase(true);
|
WebKit::WebRuntimeFeatures::enableDatabase(true);
|
||||||
WebKit::WebRuntimeFeatures::enableIndexedDatabase(true);
|
WebKit::WebRuntimeFeatures::enableIndexedDatabase(true);
|
||||||
|
@@ -273,7 +273,8 @@ void BrowserWebViewDelegate::showContextMenu(WebKit::WebFrame* frame,
|
|||||||
int type_flags = 0;
|
int type_flags = 0;
|
||||||
|
|
||||||
// Make sure events can be pumped while the menu is up.
|
// Make sure events can be pumped while the menu is up.
|
||||||
MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
|
base::MessageLoop::ScopedNestableTaskAllower allow(
|
||||||
|
base::MessageLoop::current());
|
||||||
|
|
||||||
// Give the client a chance to handle the menu.
|
// Give the client a chance to handle the menu.
|
||||||
if (OnBeforeMenu(data, mouse_pt.x, mouse_pt.y, edit_flags, type_flags))
|
if (OnBeforeMenu(data, mouse_pt.x, mouse_pt.y, edit_flags, type_flags))
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "base/file_util.h"
|
#include "base/file_util.h"
|
||||||
#include "base/mac/mac_util.h"
|
#include "base/mac/mac_util.h"
|
||||||
#include "base/sys_string_conversions.h"
|
#include "base/strings/sys_string_conversions.h"
|
||||||
#include "base/utf_string_conversions.h"
|
#include "base/utf_string_conversions.h"
|
||||||
#include "base/threading/thread_restrictions.h"
|
#include "base/threading/thread_restrictions.h"
|
||||||
#include "skia/ext/skia_utils_mac.h"
|
#include "skia/ext/skia_utils_mac.h"
|
||||||
@@ -182,7 +182,8 @@ void BrowserWebViewDelegate::showContextMenu(
|
|||||||
NSMenu* menu = nil;
|
NSMenu* menu = nil;
|
||||||
|
|
||||||
// Make sure events can be pumped while the menu is up.
|
// Make sure events can be pumped while the menu is up.
|
||||||
MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
|
base::MessageLoop::ScopedNestableTaskAllower allow
|
||||||
|
base::MessageLoop::current());
|
||||||
|
|
||||||
// Give the client a chance to handle the menu.
|
// Give the client a chance to handle the menu.
|
||||||
if (OnBeforeMenu(data, mouse_pt.x, mouse_pt.y, edit_flags, type_flags))
|
if (OnBeforeMenu(data, mouse_pt.x, mouse_pt.y, edit_flags, type_flags))
|
||||||
@@ -409,7 +410,8 @@ void BrowserWebViewDelegate::startDragging(
|
|||||||
|
|
||||||
// The drag invokes a nested event loop, arrange to continue
|
// The drag invokes a nested event loop, arrange to continue
|
||||||
// processing events.
|
// processing events.
|
||||||
MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
|
base::MessageLoop::ScopedNestableTaskAllower allow(
|
||||||
|
base::MessageLoop::current());
|
||||||
|
|
||||||
NSImage* ns_image = nil;
|
NSImage* ns_image = nil;
|
||||||
if (!image.isNull()) {
|
if (!image.isNull()) {
|
||||||
|
@@ -551,7 +551,7 @@ void BrowserWebViewDelegate::runModal() {
|
|||||||
browser_->set_internal_modal_message_loop_is_active(true);
|
browser_->set_internal_modal_message_loop_is_active(true);
|
||||||
|
|
||||||
// Start a new message loop here and return when this window closes.
|
// Start a new message loop here and return when this window closes.
|
||||||
MessageLoop* message_loop = MessageLoop::current();
|
base::MessageLoop* message_loop = base::MessageLoop::current();
|
||||||
bool old_state = message_loop->NestableTasksAllowed();
|
bool old_state = message_loop->NestableTasksAllowed();
|
||||||
message_loop->SetNestableTasksAllowed(true);
|
message_loop->SetNestableTasksAllowed(true);
|
||||||
message_loop->Run();
|
message_loop->Run();
|
||||||
@@ -677,7 +677,8 @@ void BrowserWebViewDelegate::showContextMenu(
|
|||||||
std::list<std::wstring> label_list;
|
std::list<std::wstring> label_list;
|
||||||
|
|
||||||
// Make sure events can be pumped while the menu is up.
|
// Make sure events can be pumped while the menu is up.
|
||||||
MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
|
base::MessageLoop::ScopedNestableTaskAllower allow(
|
||||||
|
base::MessageLoop::current());
|
||||||
|
|
||||||
// Give the client a chance to handle the menu.
|
// Give the client a chance to handle the menu.
|
||||||
if (OnBeforeMenu(data, mouse_pt.x, mouse_pt.y, edit_flags, type_flags))
|
if (OnBeforeMenu(data, mouse_pt.x, mouse_pt.y, edit_flags, type_flags))
|
||||||
@@ -737,14 +738,14 @@ void BrowserWebViewDelegate::showContextMenu(
|
|||||||
if (!menu)
|
if (!menu)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MessageLoop::current()->set_os_modal_loop(true);
|
base::MessageLoop::current()->set_os_modal_loop(true);
|
||||||
|
|
||||||
// Show the context menu
|
// Show the context menu
|
||||||
int selected_id = TrackPopupMenu(menu,
|
int selected_id = TrackPopupMenu(menu,
|
||||||
TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD | TPM_RECURSE,
|
TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD | TPM_RECURSE,
|
||||||
screenX, screenY, 0, browser_->UIT_GetMainWndHandle(), NULL);
|
screenX, screenY, 0, browser_->UIT_GetMainWndHandle(), NULL);
|
||||||
|
|
||||||
MessageLoop::current()->set_os_modal_loop(false);
|
base::MessageLoop::current()->set_os_modal_loop(false);
|
||||||
|
|
||||||
if (selected_id != 0) {
|
if (selected_id != 0) {
|
||||||
// An action was chosen
|
// An action was chosen
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
#import "base/memory/scoped_ptr.h"
|
#import "base/memory/scoped_ptr.h"
|
||||||
#import "base/string_util.h"
|
#import "base/string_util.h"
|
||||||
#import "base/sys_string_conversions.h"
|
#import "base/strings/sys_string_conversions.h"
|
||||||
#import "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFactory.h"
|
#import "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFactory.h"
|
||||||
#import "third_party/WebKit/Source/WebKit/chromium/public/mac/WebSubstringUtil.h"
|
#import "third_party/WebKit/Source/WebKit/chromium/public/mac/WebSubstringUtil.h"
|
||||||
#import "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
#import "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||||
|
@@ -36,11 +36,11 @@ namespace {
|
|||||||
|
|
||||||
// Used in multi-threaded message loop mode to observe shutdown of the UI
|
// Used in multi-threaded message loop mode to observe shutdown of the UI
|
||||||
// thread.
|
// thread.
|
||||||
class DestructionObserver : public MessageLoop::DestructionObserver {
|
class DestructionObserver : public base::MessageLoop::DestructionObserver {
|
||||||
public:
|
public:
|
||||||
explicit DestructionObserver(base::WaitableEvent *event) : event_(event) {}
|
explicit DestructionObserver(base::WaitableEvent *event) : event_(event) {}
|
||||||
virtual void WillDestroyCurrentMessageLoop() {
|
virtual void WillDestroyCurrentMessageLoop() {
|
||||||
MessageLoop::current()->RemoveDestructionObserver(this);
|
base::MessageLoop::current()->RemoveDestructionObserver(this);
|
||||||
event_->Signal();
|
event_->Signal();
|
||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
@@ -225,7 +225,7 @@ void CefSetOSModalLoop(bool osModalLoop) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (CefThread::CurrentlyOn(CefThread::UI)) {
|
if (CefThread::CurrentlyOn(CefThread::UI)) {
|
||||||
MessageLoop::current()->set_os_modal_loop(osModalLoop);
|
base::MessageLoop::current()->set_os_modal_loop(osModalLoop);
|
||||||
} else {
|
} else {
|
||||||
CefThread::PostTask(CefThread::UI, FROM_HERE,
|
CefThread::PostTask(CefThread::UI, FROM_HERE,
|
||||||
base::Bind(CefSetOSModalLoop, osModalLoop));
|
base::Bind(CefSetOSModalLoop, osModalLoop));
|
||||||
@@ -589,7 +589,7 @@ void CefContext::UIT_FinishShutdown(
|
|||||||
if (uithread_shutdown_event) {
|
if (uithread_shutdown_event) {
|
||||||
// The destruction observer will signal the UI thread shutdown event when
|
// The destruction observer will signal the UI thread shutdown event when
|
||||||
// the UI thread has been destroyed.
|
// the UI thread has been destroyed.
|
||||||
MessageLoop::current()->AddDestructionObserver(
|
base::MessageLoop::current()->AddDestructionObserver(
|
||||||
new DestructionObserver(uithread_shutdown_event));
|
new DestructionObserver(uithread_shutdown_event));
|
||||||
|
|
||||||
// Signal the browser shutdown event now.
|
// Signal the browser shutdown event now.
|
||||||
|
@@ -13,8 +13,8 @@
|
|||||||
#include "base/threading/thread.h"
|
#include "base/threading/thread.h"
|
||||||
|
|
||||||
// Class used to process events on the current message loop.
|
// Class used to process events on the current message loop.
|
||||||
class CefMessageLoopForUI : public MessageLoopForUI {
|
class CefMessageLoopForUI : public base::MessageLoopForUI {
|
||||||
typedef MessageLoopForUI inherited;
|
typedef base::MessageLoopForUI inherited;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CefMessageLoopForUI() {
|
CefMessageLoopForUI() {
|
||||||
@@ -22,8 +22,8 @@ class CefMessageLoopForUI : public MessageLoopForUI {
|
|||||||
|
|
||||||
// Returns the MessageLoopForUI of the current thread.
|
// Returns the MessageLoopForUI of the current thread.
|
||||||
static CefMessageLoopForUI* current() {
|
static CefMessageLoopForUI* current() {
|
||||||
MessageLoop* loop = MessageLoop::current();
|
base::MessageLoop* loop = base::MessageLoop::current();
|
||||||
DCHECK_EQ(MessageLoop::TYPE_UI, loop->type());
|
DCHECK_EQ(base::MessageLoop::TYPE_UI, loop->type());
|
||||||
return static_cast<CefMessageLoopForUI*>(loop);
|
return static_cast<CefMessageLoopForUI*>(loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ void CefProcess::CreateUIThread() {
|
|||||||
// Create the message loop on a new thread.
|
// Create the message loop on a new thread.
|
||||||
thread.reset(new CefProcessUIThread());
|
thread.reset(new CefProcessUIThread());
|
||||||
base::Thread::Options options;
|
base::Thread::Options options;
|
||||||
options.message_loop_type = MessageLoop::TYPE_UI;
|
options.message_loop_type = base::MessageLoop::TYPE_UI;
|
||||||
if (!thread->StartWithOptions(options))
|
if (!thread->StartWithOptions(options))
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
@@ -114,7 +114,7 @@ void CefProcess::CreateIOThread() {
|
|||||||
|
|
||||||
scoped_ptr<CefProcessIOThread> thread(new CefProcessIOThread());
|
scoped_ptr<CefProcessIOThread> thread(new CefProcessIOThread());
|
||||||
base::Thread::Options options;
|
base::Thread::Options options;
|
||||||
options.message_loop_type = MessageLoop::TYPE_IO;
|
options.message_loop_type = base::MessageLoop::TYPE_IO;
|
||||||
if (!thread->StartWithOptions(options))
|
if (!thread->StartWithOptions(options))
|
||||||
return;
|
return;
|
||||||
io_thread_.swap(thread);
|
io_thread_.swap(thread);
|
||||||
@@ -126,7 +126,7 @@ void CefProcess::CreateFileThread() {
|
|||||||
|
|
||||||
scoped_ptr<base::Thread> thread(new CefProcessSubThread(CefThread::FILE));
|
scoped_ptr<base::Thread> thread(new CefProcessSubThread(CefThread::FILE));
|
||||||
base::Thread::Options options;
|
base::Thread::Options options;
|
||||||
options.message_loop_type = MessageLoop::TYPE_IO;
|
options.message_loop_type = base::MessageLoop::TYPE_IO;
|
||||||
if (!thread->StartWithOptions(options))
|
if (!thread->StartWithOptions(options))
|
||||||
return;
|
return;
|
||||||
file_thread_.swap(thread);
|
file_thread_.swap(thread);
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
CefProcessIOThread::CefProcessIOThread()
|
CefProcessIOThread::CefProcessIOThread()
|
||||||
: CefThread(CefThread::IO), request_context_(NULL) {}
|
: CefThread(CefThread::IO), request_context_(NULL) {}
|
||||||
|
|
||||||
CefProcessIOThread::CefProcessIOThread(MessageLoop* message_loop)
|
CefProcessIOThread::CefProcessIOThread(base::MessageLoop* message_loop)
|
||||||
: CefThread(CefThread::IO, message_loop), request_context_(NULL) {}
|
: CefThread(CefThread::IO, message_loop), request_context_(NULL) {}
|
||||||
|
|
||||||
CefProcessIOThread::~CefProcessIOThread() {
|
CefProcessIOThread::~CefProcessIOThread() {
|
||||||
@@ -57,7 +57,7 @@ void CefProcessIOThread::CleanUp() {
|
|||||||
// Flush any remaining messages. This ensures that any accumulated
|
// Flush any remaining messages. This ensures that any accumulated
|
||||||
// Task objects get destroyed before we exit, which avoids noise in
|
// Task objects get destroyed before we exit, which avoids noise in
|
||||||
// purify leak-test results.
|
// purify leak-test results.
|
||||||
MessageLoop::current()->RunUntilIdle();
|
base::MessageLoop::current()->RunUntilIdle();
|
||||||
|
|
||||||
// In reverse order of initialization.
|
// In reverse order of initialization.
|
||||||
BrowserWebBlobRegistryImpl::Cleanup();
|
BrowserWebBlobRegistryImpl::Cleanup();
|
||||||
|
@@ -28,7 +28,7 @@ class NetworkDelegate;
|
|||||||
class CefProcessIOThread : public CefThread {
|
class CefProcessIOThread : public CefThread {
|
||||||
public:
|
public:
|
||||||
CefProcessIOThread();
|
CefProcessIOThread();
|
||||||
explicit CefProcessIOThread(MessageLoop* message_loop);
|
explicit CefProcessIOThread(base::MessageLoop* message_loop);
|
||||||
virtual ~CefProcessIOThread();
|
virtual ~CefProcessIOThread();
|
||||||
|
|
||||||
BrowserRequestContext* request_context() { return request_context_.get(); }
|
BrowserRequestContext* request_context() { return request_context_.get(); }
|
||||||
|
@@ -12,7 +12,7 @@ CefProcessSubThread::CefProcessSubThread(CefThread::ID identifier)
|
|||||||
: CefThread(identifier) {}
|
: CefThread(identifier) {}
|
||||||
|
|
||||||
CefProcessSubThread::CefProcessSubThread(CefThread::ID identifier,
|
CefProcessSubThread::CefProcessSubThread(CefThread::ID identifier,
|
||||||
MessageLoop* message_loop)
|
base::MessageLoop* message_loop)
|
||||||
: CefThread(identifier, message_loop) {}
|
: CefThread(identifier, message_loop) {}
|
||||||
|
|
||||||
CefProcessSubThread::~CefProcessSubThread() {
|
CefProcessSubThread::~CefProcessSubThread() {
|
||||||
@@ -25,7 +25,7 @@ void CefProcessSubThread::CleanUp() {
|
|||||||
// Flush any remaining messages. This ensures that any accumulated
|
// Flush any remaining messages. This ensures that any accumulated
|
||||||
// Task objects get destroyed before we exit, which avoids noise in
|
// Task objects get destroyed before we exit, which avoids noise in
|
||||||
// purify leak-test results.
|
// purify leak-test results.
|
||||||
MessageLoop::current()->RunUntilIdle();
|
base::MessageLoop::current()->RunUntilIdle();
|
||||||
|
|
||||||
CefThread::Cleanup();
|
CefThread::Cleanup();
|
||||||
}
|
}
|
||||||
|
@@ -23,7 +23,8 @@
|
|||||||
class CefProcessSubThread : public CefThread {
|
class CefProcessSubThread : public CefThread {
|
||||||
public:
|
public:
|
||||||
explicit CefProcessSubThread(CefThread::ID identifier);
|
explicit CefProcessSubThread(CefThread::ID identifier);
|
||||||
CefProcessSubThread(CefThread::ID identifier, MessageLoop* message_loop);
|
CefProcessSubThread(CefThread::ID identifier,
|
||||||
|
base::MessageLoop* message_loop);
|
||||||
virtual ~CefProcessSubThread();
|
virtual ~CefProcessSubThread();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -53,7 +53,7 @@ base::StringPiece ResourceProvider(int resource_id) {
|
|||||||
CefProcessUIThread::CefProcessUIThread()
|
CefProcessUIThread::CefProcessUIThread()
|
||||||
: CefThread(CefThread::UI), statstable_(NULL), webkit_init_(NULL) {}
|
: CefThread(CefThread::UI), statstable_(NULL), webkit_init_(NULL) {}
|
||||||
|
|
||||||
CefProcessUIThread::CefProcessUIThread(MessageLoop* message_loop)
|
CefProcessUIThread::CefProcessUIThread(base::MessageLoop* message_loop)
|
||||||
: CefThread(CefThread::UI, message_loop), statstable_(NULL),
|
: CefThread(CefThread::UI, message_loop), statstable_(NULL),
|
||||||
webkit_init_(NULL) {}
|
webkit_init_(NULL) {}
|
||||||
|
|
||||||
@@ -67,6 +67,9 @@ void CefProcessUIThread::Init() {
|
|||||||
// Initialize the global CommandLine object.
|
// Initialize the global CommandLine object.
|
||||||
CommandLine::Init(0, NULL);
|
CommandLine::Init(0, NULL);
|
||||||
|
|
||||||
|
// Create the blocking I/O pool before other threads.
|
||||||
|
CefThread::CreateThreadPool();
|
||||||
|
|
||||||
const CefSettings& settings = _Context->settings();
|
const CefSettings& settings = _Context->settings();
|
||||||
|
|
||||||
// Initialize logging.
|
// Initialize logging.
|
||||||
@@ -212,7 +215,7 @@ void CefProcessUIThread::CleanUp() {
|
|||||||
// Flush any remaining messages. This ensures that any accumulated
|
// Flush any remaining messages. This ensures that any accumulated
|
||||||
// Task objects get destroyed before we exit, which avoids noise in
|
// Task objects get destroyed before we exit, which avoids noise in
|
||||||
// purify leak-test results.
|
// purify leak-test results.
|
||||||
MessageLoop::current()->RunUntilIdle();
|
base::MessageLoop::current()->RunUntilIdle();
|
||||||
|
|
||||||
// Tear down the shared StatsTable.
|
// Tear down the shared StatsTable.
|
||||||
base::StatsTable::set_current(NULL);
|
base::StatsTable::set_current(NULL);
|
||||||
@@ -235,6 +238,14 @@ void CefProcessUIThread::CleanUp() {
|
|||||||
PlatformCleanUp();
|
PlatformCleanUp();
|
||||||
|
|
||||||
_Context->CleanupResourceBundle();
|
_Context->CleanupResourceBundle();
|
||||||
|
|
||||||
|
// Close the blocking I/O pool after the other threads. Other threads such
|
||||||
|
// as the I/O thread may need to schedule work like closing files or flushing
|
||||||
|
// data during shutdown, so the blocking pool needs to be available. There
|
||||||
|
// may also be slow operations pending that will blcok shutdown, so closing
|
||||||
|
// it here (which will block until required operations are complete) gives
|
||||||
|
// more head start for those operations to finish.
|
||||||
|
CefThread::ShutdownThreadPool();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefProcessUIThread::OnConnectionTypeChanged(
|
void CefProcessUIThread::OnConnectionTypeChanged(
|
||||||
|
@@ -33,7 +33,7 @@ class CefProcessUIThread
|
|||||||
public CefThread {
|
public CefThread {
|
||||||
public:
|
public:
|
||||||
CefProcessUIThread();
|
CefProcessUIThread();
|
||||||
explicit CefProcessUIThread(MessageLoop* message_loop);
|
explicit CefProcessUIThread(base::MessageLoop* message_loop);
|
||||||
virtual ~CefProcessUIThread();
|
virtual ~CefProcessUIThread();
|
||||||
|
|
||||||
virtual void Init();
|
virtual void Init();
|
||||||
|
@@ -6,8 +6,10 @@
|
|||||||
#include "libcef/cef_thread.h"
|
#include "libcef/cef_thread.h"
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
|
#include "base/lazy_instance.h"
|
||||||
#include "base/message_loop.h"
|
#include "base/message_loop.h"
|
||||||
#include "base/message_loop_proxy.h"
|
#include "base/message_loop_proxy.h"
|
||||||
|
#include "base/threading/sequenced_worker_pool.h"
|
||||||
|
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
#include <Objbase.h> // NOLINT(build/include_order)
|
#include <Objbase.h> // NOLINT(build/include_order)
|
||||||
@@ -15,6 +17,8 @@
|
|||||||
|
|
||||||
using base::MessageLoopProxy;
|
using base::MessageLoopProxy;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
// Friendly names for the well-known threads.
|
// Friendly names for the well-known threads.
|
||||||
static const char* cef_thread_names[CefThread::ID_COUNT] = {
|
static const char* cef_thread_names[CefThread::ID_COUNT] = {
|
||||||
"Cef_UIThread", // UI
|
"Cef_UIThread", // UI
|
||||||
@@ -22,6 +26,27 @@ static const char* cef_thread_names[CefThread::ID_COUNT] = {
|
|||||||
"Cef_IOThread", // IO
|
"Cef_IOThread", // IO
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct CefThreadGlobals {
|
||||||
|
CefThreadGlobals() {
|
||||||
|
memset(threads, 0, CefThread::ID_COUNT * sizeof(threads[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
// This lock protects |threads|. Do not read or modify that array
|
||||||
|
// without holding this lock. Do not block while holding this lock.
|
||||||
|
base::Lock lock;
|
||||||
|
|
||||||
|
// This array is protected by |lock|. The threads are not owned by this
|
||||||
|
// array. Typically, the threads are owned on the UI thread by
|
||||||
|
// BrowserMainLoop. BrowserThreadImpl objects remove themselves from this
|
||||||
|
// array upon destruction.
|
||||||
|
CefThread* threads[CefThread::ID_COUNT];
|
||||||
|
|
||||||
|
scoped_refptr<base::SequencedWorkerPool> blocking_pool;
|
||||||
|
};
|
||||||
|
|
||||||
|
base::LazyInstance<CefThreadGlobals>::Leaky
|
||||||
|
g_globals = LAZY_INSTANCE_INITIALIZER;
|
||||||
|
|
||||||
// An implementation of MessageLoopProxy to be used in conjunction
|
// An implementation of MessageLoopProxy to be used in conjunction
|
||||||
// with CefThread.
|
// with CefThread.
|
||||||
class CefThreadMessageLoopProxy : public MessageLoopProxy {
|
class CefThreadMessageLoopProxy : public MessageLoopProxy {
|
||||||
@@ -54,10 +79,7 @@ class CefThreadMessageLoopProxy : public MessageLoopProxy {
|
|||||||
DISALLOW_COPY_AND_ASSIGN(CefThreadMessageLoopProxy);
|
DISALLOW_COPY_AND_ASSIGN(CefThreadMessageLoopProxy);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace
|
||||||
base::Lock CefThread::lock_;
|
|
||||||
|
|
||||||
CefThread* CefThread::cef_threads_[ID_COUNT];
|
|
||||||
|
|
||||||
CefThread::CefThread(CefThread::ID identifier)
|
CefThread::CefThread(CefThread::ID identifier)
|
||||||
: Thread(cef_thread_names[identifier]),
|
: Thread(cef_thread_names[identifier]),
|
||||||
@@ -73,6 +95,25 @@ CefThread::CefThread(ID identifier, MessageLoop* message_loop)
|
|||||||
Initialize();
|
Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
void CefThread::CreateThreadPool() {
|
||||||
|
CefThreadGlobals& globals = g_globals.Get();
|
||||||
|
DCHECK(!globals.blocking_pool.get());
|
||||||
|
globals.blocking_pool = new base::SequencedWorkerPool(3, "BrowserBlocking");
|
||||||
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
void CefThread::ShutdownThreadPool() {
|
||||||
|
// The goal is to make it impossible for chrome to 'infinite loop' during
|
||||||
|
// shutdown, but to reasonably expect that all BLOCKING_SHUTDOWN tasks queued
|
||||||
|
// during shutdown get run. There's nothing particularly scientific about the
|
||||||
|
// number chosen.
|
||||||
|
const int kMaxNewShutdownBlockingTasks = 1000;
|
||||||
|
CefThreadGlobals& globals = g_globals.Get();
|
||||||
|
globals.blocking_pool->Shutdown(kMaxNewShutdownBlockingTasks);
|
||||||
|
globals.blocking_pool = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
void CefThread::Init() {
|
void CefThread::Init() {
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
// Initializes the COM library on the current thread.
|
// Initializes the COM library on the current thread.
|
||||||
@@ -97,10 +138,11 @@ void CefThread::Cleanup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CefThread::Initialize() {
|
void CefThread::Initialize() {
|
||||||
base::AutoLock lock(lock_);
|
CefThreadGlobals& globals = g_globals.Get();
|
||||||
|
base::AutoLock lock(globals.lock);
|
||||||
DCHECK(identifier_ >= 0 && identifier_ < ID_COUNT);
|
DCHECK(identifier_ >= 0 && identifier_ < ID_COUNT);
|
||||||
DCHECK(cef_threads_[identifier_] == NULL);
|
DCHECK(globals.threads[identifier_] == NULL);
|
||||||
cef_threads_[identifier_] = this;
|
globals.threads[identifier_] = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
CefThread::~CefThread() {
|
CefThread::~CefThread() {
|
||||||
@@ -109,30 +151,41 @@ CefThread::~CefThread() {
|
|||||||
// correct CefThread succeeds.
|
// correct CefThread succeeds.
|
||||||
Stop();
|
Stop();
|
||||||
|
|
||||||
base::AutoLock lock(lock_);
|
CefThreadGlobals& globals = g_globals.Get();
|
||||||
cef_threads_[identifier_] = NULL;
|
base::AutoLock lock(globals.lock);
|
||||||
|
globals.threads[identifier_] = NULL;
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
// Double check that the threads are ordererd correctly in the enumeration.
|
// Double check that the threads are ordererd correctly in the enumeration.
|
||||||
for (int i = identifier_ + 1; i < ID_COUNT; ++i) {
|
for (int i = identifier_ + 1; i < ID_COUNT; ++i) {
|
||||||
DCHECK(!cef_threads_[i]) <<
|
DCHECK(!globals.threads[i]) <<
|
||||||
"Threads must be listed in the reverse order that they die";
|
"Threads must be listed in the reverse order that they die";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
base::SequencedWorkerPool* CefThread::GetBlockingPool() {
|
||||||
|
CefThreadGlobals& globals = g_globals.Get();
|
||||||
|
DCHECK(globals.blocking_pool.get());
|
||||||
|
return globals.blocking_pool;
|
||||||
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
bool CefThread::IsWellKnownThread(ID identifier) {
|
bool CefThread::IsWellKnownThread(ID identifier) {
|
||||||
base::AutoLock lock(lock_);
|
CefThreadGlobals& globals = g_globals.Get();
|
||||||
|
base::AutoLock lock(globals.lock);
|
||||||
return (identifier >= 0 && identifier < ID_COUNT &&
|
return (identifier >= 0 && identifier < ID_COUNT &&
|
||||||
cef_threads_[identifier]);
|
globals.threads[identifier]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
bool CefThread::CurrentlyOn(ID identifier) {
|
bool CefThread::CurrentlyOn(ID identifier) {
|
||||||
base::AutoLock lock(lock_);
|
CefThreadGlobals& globals = g_globals.Get();
|
||||||
|
base::AutoLock lock(globals.lock);
|
||||||
DCHECK(identifier >= 0 && identifier < ID_COUNT);
|
DCHECK(identifier >= 0 && identifier < ID_COUNT);
|
||||||
return cef_threads_[identifier] &&
|
return globals.threads[identifier] &&
|
||||||
cef_threads_[identifier]->message_loop() == MessageLoop::current();
|
globals.threads[identifier]->message_loop() ==
|
||||||
|
base::MessageLoop::current();
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
@@ -169,11 +222,12 @@ bool CefThread::PostNonNestableDelayedTask(
|
|||||||
|
|
||||||
// static
|
// static
|
||||||
bool CefThread::GetCurrentThreadIdentifier(ID* identifier) {
|
bool CefThread::GetCurrentThreadIdentifier(ID* identifier) {
|
||||||
MessageLoop* cur_message_loop = MessageLoop::current();
|
CefThreadGlobals& globals = g_globals.Get();
|
||||||
|
base::MessageLoop* cur_message_loop = base::MessageLoop::current();
|
||||||
for (int i = 0; i < ID_COUNT; ++i) {
|
for (int i = 0; i < ID_COUNT; ++i) {
|
||||||
if (cef_threads_[i] &&
|
if (globals.threads[i] &&
|
||||||
cef_threads_[i]->message_loop() == cur_message_loop) {
|
globals.threads[i]->message_loop() == cur_message_loop) {
|
||||||
*identifier = cef_threads_[i]->identifier_;
|
*identifier = globals.threads[i]->identifier_;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,11 +262,13 @@ bool CefThread::PostTaskHelper(
|
|||||||
GetCurrentThreadIdentifier(¤t_thread) &&
|
GetCurrentThreadIdentifier(¤t_thread) &&
|
||||||
current_thread >= identifier;
|
current_thread >= identifier;
|
||||||
|
|
||||||
if (!guaranteed_to_outlive_target_thread)
|
CefThreadGlobals& globals = g_globals.Get();
|
||||||
lock_.Acquire();
|
|
||||||
|
|
||||||
MessageLoop* message_loop = cef_threads_[identifier] ?
|
if (!guaranteed_to_outlive_target_thread)
|
||||||
cef_threads_[identifier]->message_loop() : NULL;
|
globals.lock.Acquire();
|
||||||
|
|
||||||
|
base::MessageLoop* message_loop = globals.threads[identifier] ?
|
||||||
|
globals.threads[identifier]->message_loop() : NULL;
|
||||||
if (message_loop) {
|
if (message_loop) {
|
||||||
if (nestable) {
|
if (nestable) {
|
||||||
message_loop->PostDelayedTask(from_here, task, delay);
|
message_loop->PostDelayedTask(from_here, task, delay);
|
||||||
@@ -222,7 +278,7 @@ bool CefThread::PostTaskHelper(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!guaranteed_to_outlive_target_thread)
|
if (!guaranteed_to_outlive_target_thread)
|
||||||
lock_.Release();
|
globals.lock.Release();
|
||||||
|
|
||||||
return !!message_loop;
|
return !!message_loop;
|
||||||
}
|
}
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
namespace base {
|
namespace base {
|
||||||
class MessageLoopProxy;
|
class MessageLoopProxy;
|
||||||
|
class SequencedWorkerPool;
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -66,7 +67,10 @@ class CefThread : public base::Thread {
|
|||||||
|
|
||||||
// Special constructor for the main (UI) thread and unittests. We use a dummy
|
// Special constructor for the main (UI) thread and unittests. We use a dummy
|
||||||
// thread here since the main thread already exists.
|
// thread here since the main thread already exists.
|
||||||
CefThread(ID identifier, MessageLoop* message_loop);
|
CefThread(ID identifier, base::MessageLoop* message_loop);
|
||||||
|
|
||||||
|
static void CreateThreadPool();
|
||||||
|
static void ShutdownThreadPool();
|
||||||
|
|
||||||
virtual ~CefThread();
|
virtual ~CefThread();
|
||||||
|
|
||||||
@@ -107,6 +111,11 @@ class CefThread : public base::Thread {
|
|||||||
from_here, object);
|
from_here, object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Returns the thread pool used for blocking file I/O. Use this object to
|
||||||
|
// perform random blocking operations such as file writes or querying the
|
||||||
|
// Windows registry.
|
||||||
|
static base::SequencedWorkerPool* GetBlockingPool();
|
||||||
|
|
||||||
// Callable on any thread. Returns whether the given ID corresponds to a well
|
// Callable on any thread. Returns whether the given ID corresponds to a well
|
||||||
// known thread.
|
// known thread.
|
||||||
static bool IsWellKnownThread(ID identifier);
|
static bool IsWellKnownThread(ID identifier);
|
||||||
@@ -177,16 +186,6 @@ class CefThread : public base::Thread {
|
|||||||
// identifier at a given time.
|
// identifier at a given time.
|
||||||
ID identifier_;
|
ID identifier_;
|
||||||
|
|
||||||
// This lock protects |cef_threads_|. Do not read or modify that array
|
|
||||||
// without holding this lock. Do not block while holding this lock.
|
|
||||||
static base::Lock lock_;
|
|
||||||
|
|
||||||
// An array of the CefThread objects. This array is protected by |lock_|.
|
|
||||||
// The threads are not owned by this array. Typically, the threads are owned
|
|
||||||
// on the UI thread by the g_browser_process object. CefThreads remove
|
|
||||||
// themselves from this array upon destruction.
|
|
||||||
static CefThread* cef_threads_[ID_COUNT];
|
|
||||||
|
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
scoped_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_;
|
scoped_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "base/bind.h"
|
#include "base/bind.h"
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "chrome/browser/net/sqlite_persistent_cookie_store.h"
|
#include "content/browser/net/sqlite_persistent_cookie_store.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ bool CefCookieManagerImpl::SetStoragePath(const CefString& path) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
scoped_refptr<SQLitePersistentCookieStore> persistent_store;
|
scoped_refptr<content::SQLitePersistentCookieStore> persistent_store;
|
||||||
if (!new_path.empty()) {
|
if (!new_path.empty()) {
|
||||||
if (!file_util::PathExists(new_path) &&
|
if (!file_util::PathExists(new_path) &&
|
||||||
!file_util::CreateDirectory(new_path)) {
|
!file_util::CreateDirectory(new_path)) {
|
||||||
@@ -234,7 +234,7 @@ bool CefCookieManagerImpl::SetStoragePath(const CefString& path) {
|
|||||||
} else {
|
} else {
|
||||||
base::FilePath cookie_path = new_path.Append(FILE_PATH_LITERAL("Cookies"));
|
base::FilePath cookie_path = new_path.Append(FILE_PATH_LITERAL("Cookies"));
|
||||||
persistent_store =
|
persistent_store =
|
||||||
new SQLitePersistentCookieStore(
|
new content::SQLitePersistentCookieStore(
|
||||||
cookie_path,
|
cookie_path,
|
||||||
CefThread::GetMessageLoopProxyForThread(CefThread::IO),
|
CefThread::GetMessageLoopProxyForThread(CefThread::IO),
|
||||||
CefThread::GetMessageLoopProxyForThread(CefThread::FILE),
|
CefThread::GetMessageLoopProxyForThread(CefThread::FILE),
|
||||||
|
@@ -75,10 +75,6 @@ CefDOMEventImpl::Category CefDOMEventImpl::GetCategory() {
|
|||||||
flags |= DOM_EVENT_CATEGORY_PROGRESS;
|
flags |= DOM_EVENT_CATEGORY_PROGRESS;
|
||||||
if (event_.isXMLHttpRequestProgressEvent())
|
if (event_.isXMLHttpRequestProgressEvent())
|
||||||
flags |= DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS;
|
flags |= DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS;
|
||||||
if (event_.isWebKitAnimationEvent())
|
|
||||||
flags |= DOM_EVENT_CATEGORY_WEBKIT_ANIMATION;
|
|
||||||
if (event_.isWebKitTransitionEvent())
|
|
||||||
flags |= DOM_EVENT_CATEGORY_WEBKIT_TRANSITION;
|
|
||||||
if (event_.isBeforeLoadEvent())
|
if (event_.isBeforeLoadEvent())
|
||||||
flags |= DOM_EVENT_CATEGORY_BEFORE_LOAD;
|
flags |= DOM_EVENT_CATEGORY_BEFORE_LOAD;
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
#include "base/files/file_path.h"
|
#include "base/files/file_path.h"
|
||||||
#include "base/string16.h"
|
#include "base/string16.h"
|
||||||
#include "base/string_util.h"
|
#include "base/string_util.h"
|
||||||
#include "base/sys_string_conversions.h"
|
#include "base/strings/sys_string_conversions.h"
|
||||||
#include "base/utf_string_conversions.h"
|
#include "base/utf_string_conversions.h"
|
||||||
#include "base/threading/thread.h"
|
#include "base/threading/thread.h"
|
||||||
#include "base/threading/thread_restrictions.h"
|
#include "base/threading/thread_restrictions.h"
|
||||||
|
@@ -24,7 +24,7 @@ DragDownloadFile::DragDownloadFile(
|
|||||||
referrer_(referrer),
|
referrer_(referrer),
|
||||||
referrer_encoding_(referrer_encoding),
|
referrer_encoding_(referrer_encoding),
|
||||||
view_(view),
|
view_(view),
|
||||||
drag_message_loop_(MessageLoop::current()),
|
drag_message_loop_(base::MessageLoop::current()),
|
||||||
is_started_(false),
|
is_started_(false),
|
||||||
is_successful_(false) {
|
is_successful_(false) {
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
@@ -109,7 +109,7 @@ void DragDownloadFile::InitiateDownload() {
|
|||||||
void DragDownloadFile::DownloadCompleted(bool is_successful) {
|
void DragDownloadFile::DownloadCompleted(bool is_successful) {
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
// If not in drag-and-drop thread, defer the running to it.
|
// If not in drag-and-drop thread, defer the running to it.
|
||||||
if (drag_message_loop_ != MessageLoop::current()) {
|
if (drag_message_loop_ != base::MessageLoop::current()) {
|
||||||
drag_message_loop_->PostTask(
|
drag_message_loop_->PostTask(
|
||||||
FROM_HERE,
|
FROM_HERE,
|
||||||
base::Bind(&DragDownloadFile::DownloadCompleted, this, is_successful));
|
base::Bind(&DragDownloadFile::DownloadCompleted, this, is_successful));
|
||||||
@@ -126,7 +126,7 @@ void DragDownloadFile::DownloadCompleted(bool is_successful) {
|
|||||||
void DragDownloadFile::AssertCurrentlyOnDragThread() {
|
void DragDownloadFile::AssertCurrentlyOnDragThread() {
|
||||||
// Only do the check on Windows where two threads are involved.
|
// Only do the check on Windows where two threads are involved.
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
DCHECK(drag_message_loop_ == MessageLoop::current());
|
DCHECK(drag_message_loop_ == base::MessageLoop::current());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -71,7 +71,7 @@ class DragDownloadFile : public ui::DownloadFileProvider {
|
|||||||
GURL referrer_;
|
GURL referrer_;
|
||||||
std::string referrer_encoding_;
|
std::string referrer_encoding_;
|
||||||
BrowserWebViewDelegate* view_;
|
BrowserWebViewDelegate* view_;
|
||||||
MessageLoop* drag_message_loop_;
|
base::MessageLoop* drag_message_loop_;
|
||||||
base::FilePath temp_dir_path_;
|
base::FilePath temp_dir_path_;
|
||||||
|
|
||||||
// Accessed on drag-and-drop thread (Windows).
|
// Accessed on drag-and-drop thread (Windows).
|
||||||
|
@@ -8,6 +8,9 @@
|
|||||||
#include "libcef/cef_context.h"
|
#include "libcef/cef_context.h"
|
||||||
#include "libcef/cef_thread.h"
|
#include "libcef/cef_thread.h"
|
||||||
|
|
||||||
|
// Allow access to content internals.
|
||||||
|
#define CONTENT_IMPLEMENTATION 1
|
||||||
|
|
||||||
#include "base/bind.h"
|
#include "base/bind.h"
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "content/browser/geolocation/geolocation_observer.h"
|
#include "content/browser/geolocation/geolocation_observer.h"
|
||||||
@@ -149,8 +152,8 @@ void CefGeolocationClient::InitializeEnvironment() {
|
|||||||
if (!content::GetContentClient()) {
|
if (!content::GetContentClient()) {
|
||||||
static CefContentClient content_client;
|
static CefContentClient content_client;
|
||||||
static CefContentBrowserClient browser_client;
|
static CefContentBrowserClient browser_client;
|
||||||
content_client.set_browser_for_testing(&browser_client);
|
|
||||||
content::SetContentClient(&content_client);
|
content::SetContentClient(&content_client);
|
||||||
|
content::SetBrowserClientForTesting(&browser_client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -264,7 +264,7 @@ PrintingContext::Result PrintingContext::NewDocument(
|
|||||||
return OnError();
|
return OnError();
|
||||||
}
|
}
|
||||||
|
|
||||||
DCHECK_EQ(MessageLoop::current()->NestableTasksAllowed(), false);
|
DCHECK_EQ(base::MessageLoop::current()->NestableTasksAllowed(), false);
|
||||||
// Begin a print job by calling the StartDoc function.
|
// Begin a print job by calling the StartDoc function.
|
||||||
// NOTE: StartDoc() starts a message loop. That causes a lot of problems with
|
// NOTE: StartDoc() starts a message loop. That causes a lot of problems with
|
||||||
// IPC. Make sure recursive task processing is disabled.
|
// IPC. Make sure recursive task processing is disabled.
|
||||||
|
@@ -141,8 +141,9 @@ void CefRequestImpl::Set(net::URLRequest* request) {
|
|||||||
|
|
||||||
net::HttpRequestHeaders headers = request->extra_request_headers();
|
net::HttpRequestHeaders headers = request->extra_request_headers();
|
||||||
|
|
||||||
// Ensure that we do not send username and password fields in the referrer.
|
// URLRequest::SetReferrer ensures that we do not send username and password
|
||||||
GURL referrer(request->GetSanitizedReferrer());
|
// fields in the referrer.
|
||||||
|
GURL referrer(request->referrer());
|
||||||
|
|
||||||
// Strip Referer from request_info_.extra_headers to prevent, e.g., plugins
|
// Strip Referer from request_info_.extra_headers to prevent, e.g., plugins
|
||||||
// from overriding headers that are controlled using other means. Otherwise a
|
// from overriding headers that are controlled using other means. Otherwise a
|
||||||
|
@@ -11,7 +11,6 @@
|
|||||||
MSVC_PUSH_WARNING_LEVEL(0);
|
MSVC_PUSH_WARNING_LEVEL(0);
|
||||||
#include "Frame.h" // NOLINT(build/include)
|
#include "Frame.h" // NOLINT(build/include)
|
||||||
#include "ScriptController.h" // NOLINT(build/include)
|
#include "ScriptController.h" // NOLINT(build/include)
|
||||||
#include "ScriptControllerBase.h" // NOLINT(build/include)
|
|
||||||
#include "V8Binding.h" // NOLINT(build/include)
|
#include "V8Binding.h" // NOLINT(build/include)
|
||||||
#include "V8RecursionScope.h" // NOLINT(build/include)
|
#include "V8RecursionScope.h" // NOLINT(build/include)
|
||||||
MSVC_POP_WARNING();
|
MSVC_POP_WARNING();
|
||||||
|
@@ -72,7 +72,7 @@ WebDragSource::~WebDragSource() {
|
|||||||
if (drop_data_.get()) {
|
if (drop_data_.get()) {
|
||||||
gtk_grab_add(drag_widget_);
|
gtk_grab_add(drag_widget_);
|
||||||
gtk_grab_remove(drag_widget_);
|
gtk_grab_remove(drag_widget_);
|
||||||
MessageLoopForUI::current()->RemoveObserver(this);
|
base::MessageLoopForUI::current()->RemoveObserver(this);
|
||||||
drop_data_.reset();
|
drop_data_.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ void WebDragSource::StartDragging(const WebDropData& drop_data,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageLoopForUI::current()->AddObserver(this);
|
base::MessageLoopForUI::current()->AddObserver(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
WebKit::WebView* WebDragSource::getView() {
|
WebKit::WebView* WebDragSource::getView() {
|
||||||
@@ -378,7 +378,7 @@ void WebDragSource::OnDragEnd(GtkWidget* sender,
|
|||||||
drag_pixbuf_ = NULL;
|
drag_pixbuf_ = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageLoopForUI::current()->RemoveObserver(this);
|
base::MessageLoopForUI::current()->RemoveObserver(this);
|
||||||
|
|
||||||
if (!download_url_.is_empty()) {
|
if (!download_url_.is_empty()) {
|
||||||
gdk_property_delete(drag_context->source_window,
|
gdk_property_delete(drag_context->source_window,
|
||||||
|
@@ -29,7 +29,7 @@ class WebView;
|
|||||||
}
|
}
|
||||||
|
|
||||||
class WebDragSource : public base::RefCounted<WebDragSource>,
|
class WebDragSource : public base::RefCounted<WebDragSource>,
|
||||||
public MessageLoopForUI::Observer {
|
public base::MessageLoopForUI::Observer {
|
||||||
public:
|
public:
|
||||||
explicit WebDragSource(CefBrowserImpl* browser);
|
explicit WebDragSource(CefBrowserImpl* browser);
|
||||||
virtual ~WebDragSource();
|
virtual ~WebDragSource();
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "base/files/file_path.h"
|
#include "base/files/file_path.h"
|
||||||
#include "base/string_util.h"
|
#include "base/string_util.h"
|
||||||
#include "base/sys_string_conversions.h"
|
#include "base/strings/sys_string_conversions.h"
|
||||||
#include "base/threading/thread.h"
|
#include "base/threading/thread.h"
|
||||||
#include "base/threading/thread_restrictions.h"
|
#include "base/threading/thread_restrictions.h"
|
||||||
#include "base/utf_string_conversions.h"
|
#include "base/utf_string_conversions.h"
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "base/basictypes.h"
|
#include "base/basictypes.h"
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "base/sys_string_conversions.h"
|
#include "base/strings/sys_string_conversions.h"
|
||||||
#include "googleurl/src/gurl.h"
|
#include "googleurl/src/gurl.h"
|
||||||
#include "net/base/mime_util.h"
|
#include "net/base/mime_util.h"
|
||||||
#include "net/base/net_util.h"
|
#include "net/base/net_util.h"
|
||||||
|
@@ -287,7 +287,7 @@ void WebDropTarget::OnDragLeave(GtkWidget* sender, GdkDragContext* context,
|
|||||||
// preceded by a drag-leave. The renderer doesn't like getting the signals
|
// preceded by a drag-leave. The renderer doesn't like getting the signals
|
||||||
// in this order so delay telling it about the drag-leave till we are sure
|
// in this order so delay telling it about the drag-leave till we are sure
|
||||||
// we are not getting a drop as well.
|
// we are not getting a drop as well.
|
||||||
MessageLoop::current()->PostTask(FROM_HERE,
|
base::MessageLoop::current()->PostTask(FROM_HERE,
|
||||||
base::Bind(&WebDropTarget::DragLeave, method_factory_.GetWeakPtr()));
|
base::Bind(&WebDropTarget::DragLeave, method_factory_.GetWeakPtr()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#import "libcef/web_drag_utils_mac.h"
|
#import "libcef/web_drag_utils_mac.h"
|
||||||
|
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "base/sys_string_conversions.h"
|
#include "base/strings/sys_string_conversions.h"
|
||||||
#import "third_party/mozilla/NSPasteboard+Utils.h"
|
#import "third_party/mozilla/NSPasteboard+Utils.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h"
|
||||||
|
@@ -17,7 +17,7 @@ MSVC_POP_WARNING();
|
|||||||
|
|
||||||
#include "base/bind.h"
|
#include "base/bind.h"
|
||||||
#import "base/logging.h"
|
#import "base/logging.h"
|
||||||
#import "base/sys_string_conversions.h"
|
#import "base/strings/sys_string_conversions.h"
|
||||||
#import "skia/ext/platform_canvas.h"
|
#import "skia/ext/platform_canvas.h"
|
||||||
#import "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
|
#import "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
|
||||||
#import "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFactory.h"
|
#import "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFactory.h"
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
Index: message_loop.cc
|
Index: message_loop.cc
|
||||||
===================================================================
|
===================================================================
|
||||||
--- message_loop.cc (revision 181864)
|
--- message_loop.cc (revision 194165)
|
||||||
+++ message_loop.cc (working copy)
|
+++ message_loop.cc (working copy)
|
||||||
@@ -193,7 +193,7 @@
|
@@ -191,7 +191,7 @@
|
||||||
MessageLoop::~MessageLoop() {
|
MessageLoop::~MessageLoop() {
|
||||||
DCHECK_EQ(this, current());
|
DCHECK_EQ(this, current());
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
Index: page/FrameView.cpp
|
Index: page/FrameView.cpp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- page/FrameView.cpp (revision 146842)
|
--- page/FrameView.cpp (revision 148366)
|
||||||
+++ page/FrameView.cpp (working copy)
|
+++ page/FrameView.cpp (working copy)
|
||||||
@@ -209,10 +209,12 @@
|
@@ -198,10 +198,12 @@
|
||||||
if (!page)
|
if (!page)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -17,17 +17,17 @@ Index: page/FrameView.cpp
|
|||||||
PassRefPtr<FrameView> FrameView::create(Frame* frame)
|
PassRefPtr<FrameView> FrameView::create(Frame* frame)
|
||||||
Index: platform/mac/NSScrollerImpDetails.mm
|
Index: platform/mac/NSScrollerImpDetails.mm
|
||||||
===================================================================
|
===================================================================
|
||||||
--- platform/mac/NSScrollerImpDetails.mm (revision 146842)
|
--- platform/mac/NSScrollerImpDetails.mm (revision 148366)
|
||||||
+++ platform/mac/NSScrollerImpDetails.mm (working copy)
|
+++ platform/mac/NSScrollerImpDetails.mm (working copy)
|
||||||
@@ -34,6 +34,7 @@
|
@@ -33,6 +33,7 @@
|
||||||
#if PLATFORM(CHROMIUM)
|
|
||||||
bool isScrollbarOverlayAPIAvailable()
|
bool isScrollbarOverlayAPIAvailable()
|
||||||
{
|
{
|
||||||
+#if 0
|
+#if 0
|
||||||
static bool apiAvailable;
|
static bool apiAvailable;
|
||||||
static bool shouldInitialize = true;
|
static bool shouldInitialize = true;
|
||||||
if (shouldInitialize) {
|
if (shouldInitialize) {
|
||||||
@@ -44,6 +45,9 @@
|
@@ -43,6 +44,9 @@
|
||||||
&& [scrollerImpPairClass instancesRespondToSelector:@selector(scrollerStyle)];
|
&& [scrollerImpPairClass instancesRespondToSelector:@selector(scrollerStyle)];
|
||||||
}
|
}
|
||||||
return apiAvailable;
|
return apiAvailable;
|
||||||
@@ -35,5 +35,5 @@ Index: platform/mac/NSScrollerImpDetails.mm
|
|||||||
+ return false;
|
+ return false;
|
||||||
+#endif
|
+#endif
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
NSScrollerStyle recommendedScrollerStyle() {
|
||||||
|
@@ -389,8 +389,6 @@ void AppGetBrowserSettings(CefBrowserSettings& settings) {
|
|||||||
g_command_line->HasSwitch(cefclient::kAcceleratedFiltersDisabled);
|
g_command_line->HasSwitch(cefclient::kAcceleratedFiltersDisabled);
|
||||||
settings.accelerated_plugins_disabled =
|
settings.accelerated_plugins_disabled =
|
||||||
g_command_line->HasSwitch(cefclient::kAcceleratedPluginsDisabled);
|
g_command_line->HasSwitch(cefclient::kAcceleratedPluginsDisabled);
|
||||||
settings.developer_tools_disabled =
|
|
||||||
g_command_line->HasSwitch(cefclient::kDeveloperToolsDisabled);
|
|
||||||
settings.fullscreen_enabled =
|
settings.fullscreen_enabled =
|
||||||
g_command_line->HasSwitch(cefclient::kFullscreenEnabled);
|
g_command_line->HasSwitch(cefclient::kFullscreenEnabled);
|
||||||
}
|
}
|
||||||
|
@@ -84,7 +84,6 @@ const char kAcceleratedVideoDisabled[] = "accelerated-video-disabled";
|
|||||||
const char kAcceledated2dCanvasDisabled[] = "accelerated-2d-canvas-disabled";
|
const char kAcceledated2dCanvasDisabled[] = "accelerated-2d-canvas-disabled";
|
||||||
const char kAcceleratedFiltersDisabled[] = "accelerated-filters-disabled";
|
const char kAcceleratedFiltersDisabled[] = "accelerated-filters-disabled";
|
||||||
const char kAcceleratedPluginsDisabled[] = "accelerated-plugins-disabled";
|
const char kAcceleratedPluginsDisabled[] = "accelerated-plugins-disabled";
|
||||||
const char kDeveloperToolsDisabled[] = "developer-tools-disabled";
|
|
||||||
const char kFullscreenEnabled[] = "fullscreen-enabled";
|
const char kFullscreenEnabled[] = "fullscreen-enabled";
|
||||||
|
|
||||||
// Other attributes.
|
// Other attributes.
|
||||||
|
@@ -81,7 +81,6 @@ extern const char kAcceleratedVideoDisabled[];
|
|||||||
extern const char kAcceledated2dCanvasDisabled[];
|
extern const char kAcceledated2dCanvasDisabled[];
|
||||||
extern const char kAcceleratedFiltersDisabled[];
|
extern const char kAcceleratedFiltersDisabled[];
|
||||||
extern const char kAcceleratedPluginsDisabled[];
|
extern const char kAcceleratedPluginsDisabled[];
|
||||||
extern const char kDeveloperToolsDisabled[];
|
|
||||||
extern const char kFullscreenEnabled[];
|
extern const char kFullscreenEnabled[];
|
||||||
|
|
||||||
// Other attributes.
|
// Other attributes.
|
||||||
|
Reference in New Issue
Block a user