mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Merge revision 778 changes:
- Windows: Fix loading of custom cursor resources (issue #692). git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1180@779 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -460,6 +460,9 @@
|
|||||||
},
|
},
|
||||||
'sources': [
|
'sources': [
|
||||||
'<@(includes_win)',
|
'<@(includes_win)',
|
||||||
|
# TODO(cef): Remove webkit_resources.rc once custom cursor resources
|
||||||
|
# can be loaded via ResourceBundle. See crbug.com/147663.
|
||||||
|
'$(OutDir)/obj/global_intermediate/webkit/webkit_resources.rc',
|
||||||
'libcef_dll/libcef_dll.rc',
|
'libcef_dll/libcef_dll.rc',
|
||||||
],
|
],
|
||||||
'link_settings': {
|
'link_settings': {
|
||||||
|
@@ -3,6 +3,9 @@
|
|||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
#include "libcef/browser/content_browser_client.h"
|
#include "libcef/browser/content_browser_client.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "libcef/browser/browser_context.h"
|
#include "libcef/browser/browser_context.h"
|
||||||
#include "libcef/browser/browser_host_impl.h"
|
#include "libcef/browser/browser_host_impl.h"
|
||||||
#include "libcef/browser/browser_main.h"
|
#include "libcef/browser/browser_main.h"
|
||||||
@@ -15,6 +18,7 @@
|
|||||||
|
|
||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
#include "base/file_path.h"
|
#include "base/file_path.h"
|
||||||
|
#include "base/path_service.h"
|
||||||
#include "content/public/browser/access_token_store.h"
|
#include "content/public/browser/access_token_store.h"
|
||||||
#include "content/public/browser/media_observer.h"
|
#include "content/public/browser/media_observer.h"
|
||||||
#include "content/public/browser/render_process_host.h"
|
#include "content/public/browser/render_process_host.h"
|
||||||
@@ -156,3 +160,21 @@ void CefContentBrowserClient::OverrideWebkitPrefs(
|
|||||||
std::string CefContentBrowserClient::GetDefaultDownloadName() {
|
std::string CefContentBrowserClient::GetDefaultDownloadName() {
|
||||||
return "download";
|
return "download";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(OS_WIN)
|
||||||
|
const wchar_t* CefContentBrowserClient::GetResourceDllName() {
|
||||||
|
static wchar_t file_path[MAX_PATH+1] = {0};
|
||||||
|
|
||||||
|
if (file_path[0] == 0) {
|
||||||
|
// Retrieve the module path (usually libcef.dll).
|
||||||
|
FilePath module;
|
||||||
|
PathService::Get(base::FILE_MODULE, &module);
|
||||||
|
const std::wstring wstr = module.value();
|
||||||
|
size_t count = std::min(static_cast<size_t>(MAX_PATH), wstr.size());
|
||||||
|
wcsncpy(file_path, wstr.c_str(), count);
|
||||||
|
file_path[count] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return file_path;
|
||||||
|
}
|
||||||
|
#endif // defined(OS_WIN)
|
||||||
|
@@ -44,6 +44,9 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
|||||||
const GURL& url,
|
const GURL& url,
|
||||||
webkit_glue::WebPreferences* prefs) OVERRIDE;
|
webkit_glue::WebPreferences* prefs) OVERRIDE;
|
||||||
virtual std::string GetDefaultDownloadName() OVERRIDE;
|
virtual std::string GetDefaultDownloadName() OVERRIDE;
|
||||||
|
#if defined(OS_WIN)
|
||||||
|
const wchar_t* GetResourceDllName() OVERRIDE;
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CefBrowserMainParts* browser_main_parts_;
|
CefBrowserMainParts* browser_main_parts_;
|
||||||
|
Reference in New Issue
Block a user