Update to Chromium revision 142910.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@702 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
c56def5569
commit
65cc337f03
|
@ -17,5 +17,5 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
|
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
|
||||||
'chromium_revision': '140240',
|
'chromium_revision': '142910',
|
||||||
}
|
}
|
||||||
|
|
4
cef.gyp
4
cef.gyp
|
@ -845,8 +845,6 @@
|
||||||
'libcef/common/value_base.h',
|
'libcef/common/value_base.h',
|
||||||
'libcef/common/values_impl.cc',
|
'libcef/common/values_impl.cc',
|
||||||
'libcef/common/values_impl.h',
|
'libcef/common/values_impl.h',
|
||||||
'libcef/plugin/content_plugin_client.cc',
|
|
||||||
'libcef/plugin/content_plugin_client.h',
|
|
||||||
'libcef/renderer/browser_impl.cc',
|
'libcef/renderer/browser_impl.cc',
|
||||||
'libcef/renderer/browser_impl.h',
|
'libcef/renderer/browser_impl.h',
|
||||||
'libcef/renderer/content_renderer_client.cc',
|
'libcef/renderer/content_renderer_client.cc',
|
||||||
|
@ -868,8 +866,6 @@
|
||||||
'libcef/renderer/v8_impl.h',
|
'libcef/renderer/v8_impl.h',
|
||||||
'libcef/renderer/webkit_glue.cc',
|
'libcef/renderer/webkit_glue.cc',
|
||||||
'libcef/renderer/webkit_glue.h',
|
'libcef/renderer/webkit_glue.h',
|
||||||
'libcef/utility/content_utility_client.cc',
|
|
||||||
'libcef/utility/content_utility_client.h',
|
|
||||||
'<(DEPTH)/chrome/browser/net/clear_on_exit_policy.cc',
|
'<(DEPTH)/chrome/browser/net/clear_on_exit_policy.cc',
|
||||||
'<(DEPTH)/chrome/browser/net/clear_on_exit_policy.h',
|
'<(DEPTH)/chrome/browser/net/clear_on_exit_policy.h',
|
||||||
'<(DEPTH)/chrome/browser/net/sqlite_persistent_cookie_store.cc',
|
'<(DEPTH)/chrome/browser/net/sqlite_persistent_cookie_store.cc',
|
||||||
|
|
|
@ -180,9 +180,6 @@ class CefSpeechRecognitionPreferences
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void SetFilterProfanities(bool filter_profanities) OVERRIDE {
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DISALLOW_COPY_AND_ASSIGN(CefSpeechRecognitionPreferences);
|
DISALLOW_COPY_AND_ASSIGN(CefSpeechRecognitionPreferences);
|
||||||
};
|
};
|
||||||
|
@ -215,9 +212,10 @@ void CefBrowserContext::InitWhileIOAllowed() {
|
||||||
path_ = path_.Append(std::wstring(L"cef_data"));
|
path_ = path_.Append(std::wstring(L"cef_data"));
|
||||||
#elif defined(OS_LINUX)
|
#elif defined(OS_LINUX)
|
||||||
scoped_ptr<base::Environment> env(base::Environment::Create());
|
scoped_ptr<base::Environment> env(base::Environment::Create());
|
||||||
FilePath config_dir(base::nix::GetXDGDirectory(env.get(),
|
FilePath config_dir(
|
||||||
kXdgConfigHomeEnvVar,
|
base::nix::GetXDGDirectory(env.get(),
|
||||||
kDotConfigDir));
|
base::nix::kXdgConfigHomeEnvVar,
|
||||||
|
base::nix::kDotConfigDir));
|
||||||
path_ = config_dir.Append("cef_data");
|
path_ = config_dir.Append("cef_data");
|
||||||
#elif defined(OS_MACOSX)
|
#elif defined(OS_MACOSX)
|
||||||
CHECK(PathService::Get(base::DIR_APP_DATA, &path_));
|
CHECK(PathService::Get(base::DIR_APP_DATA, &path_));
|
||||||
|
@ -238,15 +236,10 @@ bool CefBrowserContext::IsOffTheRecord() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
content::DownloadManager* CefBrowserContext::GetDownloadManager() {
|
content::DownloadManagerDelegate*
|
||||||
if (!download_manager_.get()) {
|
CefBrowserContext::GetDownloadManagerDelegate() {
|
||||||
download_manager_delegate_ = new CefDownloadManagerDelegate();
|
download_manager_delegate_ = new CefDownloadManagerDelegate();
|
||||||
download_manager_ =
|
return download_manager_delegate_.get();
|
||||||
content::DownloadManager::Create(download_manager_delegate_, NULL);
|
|
||||||
download_manager_delegate_->SetDownloadManager(download_manager_.get());
|
|
||||||
download_manager_->Init(this);
|
|
||||||
}
|
|
||||||
return download_manager_.get();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
net::URLRequestContextGetter* CefBrowserContext::GetRequestContext() {
|
net::URLRequestContextGetter* CefBrowserContext::GetRequestContext() {
|
||||||
|
|
|
@ -30,7 +30,7 @@ class CefBrowserContext : public content::BrowserContext {
|
||||||
// BrowserContext methods.
|
// BrowserContext methods.
|
||||||
virtual FilePath GetPath() OVERRIDE;
|
virtual FilePath GetPath() OVERRIDE;
|
||||||
virtual bool IsOffTheRecord() const OVERRIDE;
|
virtual bool IsOffTheRecord() const OVERRIDE;
|
||||||
virtual content::DownloadManager* GetDownloadManager() OVERRIDE;
|
virtual content::DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE;
|
||||||
virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
|
virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
|
||||||
virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
|
virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
|
||||||
int renderer_child_id) OVERRIDE;
|
int renderer_child_id) OVERRIDE;
|
||||||
|
|
|
@ -1082,6 +1082,23 @@ void CefBrowserHostImpl::UpdatePreferredSize(content::WebContents* source,
|
||||||
PlatformSizeTo(pref_size.width(), pref_size.height());
|
PlatformSizeTo(pref_size.width(), pref_size.height());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CefBrowserHostImpl::RequestMediaAccessPermission(
|
||||||
|
content::WebContents* web_contents,
|
||||||
|
const content::MediaStreamRequest* request,
|
||||||
|
const content::MediaResponseCallback& callback) {
|
||||||
|
CEF_CURRENTLY_ON_UIT();
|
||||||
|
|
||||||
|
content::MediaStreamDevices devices;
|
||||||
|
for (content::MediaStreamDeviceMap::const_iterator it =
|
||||||
|
request->devices.begin(); it != request->devices.end(); ++it) {
|
||||||
|
devices.push_back(*it->second.begin());
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO(cef): Give the user an opportunity to approve the device list or run
|
||||||
|
// the callback with an empty device list to cancel the request.
|
||||||
|
callback.Run(devices);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// content::WebContentsObserver methods.
|
// content::WebContentsObserver methods.
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
|
@ -229,6 +229,10 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||||
const content::FileChooserParams& params) OVERRIDE;
|
const content::FileChooserParams& params) OVERRIDE;
|
||||||
virtual void UpdatePreferredSize(content::WebContents* source,
|
virtual void UpdatePreferredSize(content::WebContents* source,
|
||||||
const gfx::Size& pref_size) OVERRIDE;
|
const gfx::Size& pref_size) OVERRIDE;
|
||||||
|
virtual void RequestMediaAccessPermission(
|
||||||
|
content::WebContents* web_contents,
|
||||||
|
const content::MediaStreamRequest* request,
|
||||||
|
const content::MediaResponseCallback& callback) OVERRIDE;
|
||||||
|
|
||||||
// content::WebContentsObserver methods.
|
// content::WebContentsObserver methods.
|
||||||
virtual void RenderViewCreated(content::RenderViewHost* render_view_host)
|
virtual void RenderViewCreated(content::RenderViewHost* render_view_host)
|
||||||
|
|
|
@ -109,22 +109,6 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefContentBrowserClient::RequestMediaAccessPermission(
|
|
||||||
const content::MediaStreamRequest* request,
|
|
||||||
const content::MediaResponseCallback& callback) {
|
|
||||||
CEF_CURRENTLY_ON_UIT();
|
|
||||||
|
|
||||||
content::MediaStreamDevices devices;
|
|
||||||
for (content::MediaStreamDeviceMap::const_iterator it =
|
|
||||||
request->devices.begin(); it != request->devices.end(); ++it) {
|
|
||||||
devices.push_back(*it->second.begin());
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO(cef): Give the user an opportunity to approve the device list or run
|
|
||||||
// the callback with an empty device list to cancel the request.
|
|
||||||
callback.Run(devices);
|
|
||||||
}
|
|
||||||
|
|
||||||
content::MediaObserver* CefContentBrowserClient::GetMediaObserver() {
|
content::MediaObserver* CefContentBrowserClient::GetMediaObserver() {
|
||||||
// TODO(cef): Return NULL once it's supported. See crbug.com/116113.
|
// TODO(cef): Return NULL once it's supported. See crbug.com/116113.
|
||||||
if (!media_observer_.get())
|
if (!media_observer_.get())
|
||||||
|
|
|
@ -36,9 +36,6 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||||
content::RenderProcessHost* host) OVERRIDE;
|
content::RenderProcessHost* host) OVERRIDE;
|
||||||
virtual void AppendExtraCommandLineSwitches(CommandLine* command_line,
|
virtual void AppendExtraCommandLineSwitches(CommandLine* command_line,
|
||||||
int child_process_id) OVERRIDE;
|
int child_process_id) OVERRIDE;
|
||||||
virtual void RequestMediaAccessPermission(
|
|
||||||
const content::MediaStreamRequest* request,
|
|
||||||
const content::MediaResponseCallback& callback) OVERRIDE;
|
|
||||||
virtual content::MediaObserver* GetMediaObserver() OVERRIDE;
|
virtual content::MediaObserver* GetMediaObserver() OVERRIDE;
|
||||||
virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE;
|
virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE;
|
||||||
virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh,
|
virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh,
|
||||||
|
|
|
@ -37,11 +37,6 @@ void CefDownloadManagerDelegate::SetDownloadManager(
|
||||||
download_manager_ = download_manager;
|
download_manager_ = download_manager;
|
||||||
}
|
}
|
||||||
|
|
||||||
content::DownloadId CefDownloadManagerDelegate::GetNextId() {
|
|
||||||
static int next_id;
|
|
||||||
return content::DownloadId(this, ++next_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CefDownloadManagerDelegate::ShouldStartDownload(int32 download_id) {
|
bool CefDownloadManagerDelegate::ShouldStartDownload(int32 download_id) {
|
||||||
DownloadItem* download =
|
DownloadItem* download =
|
||||||
download_manager_->GetActiveDownloadItem(download_id);
|
download_manager_->GetActiveDownloadItem(download_id);
|
||||||
|
@ -72,20 +67,20 @@ bool CefDownloadManagerDelegate::ShouldStartDownload(int32 download_id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefDownloadManagerDelegate::ChooseDownloadPath(
|
void CefDownloadManagerDelegate::ChooseDownloadPath(
|
||||||
WebContents* web_contents,
|
content::DownloadItem* item) {
|
||||||
const FilePath& suggested_path,
|
|
||||||
int32 download_id) {
|
|
||||||
FilePath result;
|
FilePath result;
|
||||||
#if defined(OS_WIN) || defined(OS_MACOSX)
|
#if defined(OS_WIN) || defined(OS_MACOSX)
|
||||||
|
WebContents* web_contents = item->GetWebContents();
|
||||||
|
const FilePath suggested_path(item->GetTargetFilePath());
|
||||||
result = PlatformChooseDownloadPath(web_contents, suggested_path);
|
result = PlatformChooseDownloadPath(web_contents, suggested_path);
|
||||||
#else
|
#else
|
||||||
NOTIMPLEMENTED();
|
NOTIMPLEMENTED();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (result.empty()) {
|
if (result.empty()) {
|
||||||
download_manager_->FileSelectionCanceled(download_id);
|
download_manager_->FileSelectionCanceled(item->GetId());
|
||||||
} else {
|
} else {
|
||||||
download_manager_->FileSelected(result, download_id);
|
download_manager_->FileSelected(result, item->GetId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,8 @@ class CefDownloadManagerDelegate
|
||||||
void SetDownloadManager(content::DownloadManager* manager);
|
void SetDownloadManager(content::DownloadManager* manager);
|
||||||
|
|
||||||
// DownloadManagerDelegate methods.
|
// DownloadManagerDelegate methods.
|
||||||
virtual content::DownloadId GetNextId() OVERRIDE;
|
|
||||||
virtual bool ShouldStartDownload(int32 download_id) OVERRIDE;
|
virtual bool ShouldStartDownload(int32 download_id) OVERRIDE;
|
||||||
virtual void ChooseDownloadPath(content::WebContents* web_contents,
|
virtual void ChooseDownloadPath(content::DownloadItem* item) OVERRIDE;
|
||||||
const FilePath& suggested_path,
|
|
||||||
int32 download_id) OVERRIDE;
|
|
||||||
virtual void AddItemToPersistentStore(content::DownloadItem* item) OVERRIDE;
|
virtual void AddItemToPersistentStore(content::DownloadItem* item) OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -211,3 +211,14 @@ bool CefNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
|
||||||
const FilePath& path) const {
|
const FilePath& path) const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CefNetworkDelegate::OnCanThrottleRequest(
|
||||||
|
const net::URLRequest& request) const {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CefNetworkDelegate::OnBeforeSocketStreamConnect(
|
||||||
|
net::SocketStream* socket,
|
||||||
|
const net::CompletionCallback& callback) {
|
||||||
|
return net::OK;
|
||||||
|
}
|
||||||
|
|
|
@ -52,6 +52,11 @@ class CefNetworkDelegate : public net::NetworkDelegate {
|
||||||
net::CookieOptions* options) OVERRIDE;
|
net::CookieOptions* options) OVERRIDE;
|
||||||
virtual bool OnCanAccessFile(const net::URLRequest& request,
|
virtual bool OnCanAccessFile(const net::URLRequest& request,
|
||||||
const FilePath& path) const OVERRIDE;
|
const FilePath& path) const OVERRIDE;
|
||||||
|
virtual bool OnCanThrottleRequest(
|
||||||
|
const net::URLRequest& request) const OVERRIDE;
|
||||||
|
virtual int OnBeforeSocketStreamConnect(
|
||||||
|
net::SocketStream* stream,
|
||||||
|
const net::CompletionCallback& callback) OVERRIDE;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(CefNetworkDelegate);
|
DISALLOW_COPY_AND_ASSIGN(CefNetworkDelegate);
|
||||||
};
|
};
|
||||||
|
|
|
@ -280,8 +280,8 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
|
||||||
return url_request_context_.get();
|
return url_request_context_.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
scoped_refptr<base::MessageLoopProxy>
|
scoped_refptr<base::SingleThreadTaskRunner>
|
||||||
CefURLRequestContextGetter::GetIOMessageLoopProxy() const {
|
CefURLRequestContextGetter::GetNetworkTaskRunner() const {
|
||||||
return BrowserThread::GetMessageLoopProxyForThread(CEF_IOT);
|
return BrowserThread::GetMessageLoopProxyForThread(CEF_IOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,8 @@ class CefURLRequestContextGetter : public net::URLRequestContextGetter {
|
||||||
|
|
||||||
// net::URLRequestContextGetter implementation.
|
// net::URLRequestContextGetter implementation.
|
||||||
virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
|
virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
|
||||||
virtual scoped_refptr<base::MessageLoopProxy>
|
virtual scoped_refptr<base::SingleThreadTaskRunner>
|
||||||
GetIOMessageLoopProxy() const OVERRIDE;
|
GetNetworkTaskRunner() const OVERRIDE;
|
||||||
|
|
||||||
net::HostResolver* host_resolver();
|
net::HostResolver* host_resolver();
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,7 @@ net::URLRequestContext*
|
||||||
return context_proxy_.get();
|
return context_proxy_.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
scoped_refptr<base::MessageLoopProxy>
|
scoped_refptr<base::SingleThreadTaskRunner>
|
||||||
CefURLRequestContextGetterProxy::GetIOMessageLoopProxy() const {
|
CefURLRequestContextGetterProxy::GetNetworkTaskRunner() const {
|
||||||
return parent_->GetIOMessageLoopProxy();
|
return parent_->GetNetworkTaskRunner();
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,8 @@ class CefURLRequestContextGetterProxy : public net::URLRequestContextGetter {
|
||||||
|
|
||||||
// net::URLRequestContextGetter implementation.
|
// net::URLRequestContextGetter implementation.
|
||||||
virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
|
virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
|
||||||
virtual scoped_refptr<base::MessageLoopProxy>
|
virtual scoped_refptr<base::SingleThreadTaskRunner>
|
||||||
GetIOMessageLoopProxy() const OVERRIDE;
|
GetNetworkTaskRunner() const OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CefBrowserHostImpl* browser_;
|
CefBrowserHostImpl* browser_;
|
||||||
|
|
|
@ -7,9 +7,7 @@
|
||||||
#include "libcef/browser/context.h"
|
#include "libcef/browser/context.h"
|
||||||
#include "libcef/common/cef_switches.h"
|
#include "libcef/common/cef_switches.h"
|
||||||
#include "libcef/common/command_line_impl.h"
|
#include "libcef/common/command_line_impl.h"
|
||||||
#include "libcef/plugin/content_plugin_client.h"
|
|
||||||
#include "libcef/renderer/content_renderer_client.h"
|
#include "libcef/renderer/content_renderer_client.h"
|
||||||
#include "libcef/utility/content_utility_client.h"
|
|
||||||
|
|
||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
#include "base/file_path.h"
|
#include "base/file_path.h"
|
||||||
|
@ -229,7 +227,6 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||||
}
|
}
|
||||||
|
|
||||||
content::SetContentClient(&content_client_);
|
content::SetContentClient(&content_client_);
|
||||||
InitializeContentClient(process_type);
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -284,14 +281,17 @@ void CefMainDelegate::ProcessExiting(const std::string& process_type) {
|
||||||
ResourceBundle::CleanupSharedInstance();
|
ResourceBundle::CleanupSharedInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
|
|
||||||
void CefMainDelegate::ZygoteForked() {
|
content::ContentBrowserClient* CefMainDelegate::CreateContentBrowserClient() {
|
||||||
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
browser_client_.reset(new CefContentBrowserClient);
|
||||||
std::string process_type =
|
return browser_client_.get();
|
||||||
command_line.GetSwitchValueASCII(switches::kProcessType);
|
}
|
||||||
InitializeContentClient(process_type);
|
|
||||||
|
content::ContentRendererClient*
|
||||||
|
CefMainDelegate::CreateContentRendererClient() {
|
||||||
|
renderer_client_.reset(new CefContentRendererClient);
|
||||||
|
return renderer_client_.get();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
void CefMainDelegate::ShutdownBrowser() {
|
void CefMainDelegate::ShutdownBrowser() {
|
||||||
if (browser_runner_.get()) {
|
if (browser_runner_.get()) {
|
||||||
|
@ -305,31 +305,6 @@ void CefMainDelegate::ShutdownBrowser() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefMainDelegate::InitializeContentClient(
|
|
||||||
const std::string& process_type) {
|
|
||||||
if (process_type.empty()) {
|
|
||||||
browser_client_.reset(new CefContentBrowserClient);
|
|
||||||
content::GetContentClient()->set_browser(browser_client_.get());
|
|
||||||
|
|
||||||
// Single-process is an unsupported and not fully tested mode.
|
|
||||||
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
|
||||||
if (command_line.HasSwitch(switches::kSingleProcess)) {
|
|
||||||
content::RenderProcessHost::set_run_renderer_in_process(true);
|
|
||||||
renderer_client_.reset(new CefContentRendererClient);
|
|
||||||
content::GetContentClient()->set_renderer(renderer_client_.get());
|
|
||||||
}
|
|
||||||
} else if (process_type == switches::kRendererProcess) {
|
|
||||||
renderer_client_.reset(new CefContentRendererClient);
|
|
||||||
content::GetContentClient()->set_renderer(renderer_client_.get());
|
|
||||||
} else if (process_type == switches::kPluginProcess) {
|
|
||||||
plugin_client_.reset(new CefContentPluginClient);
|
|
||||||
content::GetContentClient()->set_plugin(plugin_client_.get());
|
|
||||||
} else if (process_type == switches::kUtilityProcess) {
|
|
||||||
utility_client_.reset(new CefContentUtilityClient);
|
|
||||||
content::GetContentClient()->set_utility(utility_client_.get());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefMainDelegate::InitializeResourceBundle() {
|
void CefMainDelegate::InitializeResourceBundle() {
|
||||||
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
||||||
FilePath pak_file, locales_dir;
|
FilePath pak_file, locales_dir;
|
||||||
|
|
|
@ -40,9 +40,9 @@ class CefMainDelegate : public content::ContentMainDelegate {
|
||||||
const std::string& process_type,
|
const std::string& process_type,
|
||||||
const content::MainFunctionParams& main_function_params) OVERRIDE;
|
const content::MainFunctionParams& main_function_params) OVERRIDE;
|
||||||
virtual void ProcessExiting(const std::string& process_type) OVERRIDE;
|
virtual void ProcessExiting(const std::string& process_type) OVERRIDE;
|
||||||
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
|
virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE;
|
||||||
virtual void ZygoteForked() OVERRIDE;
|
virtual content::ContentRendererClient*
|
||||||
#endif
|
CreateContentRendererClient() OVERRIDE;
|
||||||
|
|
||||||
// Shut down the browser runner.
|
// Shut down the browser runner.
|
||||||
void ShutdownBrowser();
|
void ShutdownBrowser();
|
||||||
|
@ -51,7 +51,6 @@ class CefMainDelegate : public content::ContentMainDelegate {
|
||||||
CefContentClient* content_client() { return &content_client_; }
|
CefContentClient* content_client() { return &content_client_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void InitializeContentClient(const std::string& process_type);
|
|
||||||
void InitializeResourceBundle();
|
void InitializeResourceBundle();
|
||||||
|
|
||||||
scoped_ptr<content::BrowserMainRunner> browser_runner_;
|
scoped_ptr<content::BrowserMainRunner> browser_runner_;
|
||||||
|
@ -59,8 +58,6 @@ class CefMainDelegate : public content::ContentMainDelegate {
|
||||||
|
|
||||||
scoped_ptr<CefContentBrowserClient> browser_client_;
|
scoped_ptr<CefContentBrowserClient> browser_client_;
|
||||||
scoped_ptr<CefContentRendererClient> renderer_client_;
|
scoped_ptr<CefContentRendererClient> renderer_client_;
|
||||||
scoped_ptr<CefContentPluginClient> plugin_client_;
|
|
||||||
scoped_ptr<CefContentUtilityClient> utility_client_;
|
|
||||||
CefContentClient content_client_;
|
CefContentClient content_client_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(CefMainDelegate);
|
DISALLOW_COPY_AND_ASSIGN(CefMainDelegate);
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
#include "libcef/plugin/content_plugin_client.h"
|
|
||||||
|
|
||||||
CefContentPluginClient::~CefContentPluginClient() {
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
#ifndef CEF_LIBCEF_PLUGIN_CONTENT_PLUGIN_CLIENT_H_
|
|
||||||
#define CEF_LIBCEF_PLUGIN_CONTENT_PLUGIN_CLIENT_H_
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
|
||||||
#include "content/public/plugin/content_plugin_client.h"
|
|
||||||
|
|
||||||
class CefContentPluginClient : public content::ContentPluginClient {
|
|
||||||
public:
|
|
||||||
virtual ~CefContentPluginClient();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // CEF_LIBCEF_PLUGIN_CONTENT_PLUGIN_CLIENT_H_
|
|
|
@ -1,15 +0,0 @@
|
||||||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
#include "libcef/utility/content_utility_client.h"
|
|
||||||
|
|
||||||
CefContentUtilityClient::~CefContentUtilityClient() {
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefContentUtilityClient::UtilityThreadStarted() {
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CefContentUtilityClient::OnMessageReceived(const IPC::Message& message) {
|
|
||||||
return false;
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
#ifndef CEF_LIBCEF_UTILITY_CONTENT_UTILITY_CLIENT_H_
|
|
||||||
#define CEF_LIBCEF_UTILITY_CONTENT_UTILITY_CLIENT_H_
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
|
||||||
#include "content/public/utility/content_utility_client.h"
|
|
||||||
|
|
||||||
class CefContentUtilityClient : public content::ContentUtilityClient {
|
|
||||||
public:
|
|
||||||
virtual ~CefContentUtilityClient();
|
|
||||||
virtual void UtilityThreadStarted() OVERRIDE;
|
|
||||||
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // CEF_LIBCEF_UTILITY_CONTENT_UTILITY_CLIENT_H_
|
|
Loading…
Reference in New Issue