Update to Chromium revision 8cb76f56 (#307671)

- Linux/Mac: Load V8 initial snapshot from external bin files (see http://crbug.com/421063).
- Windows: 8.1 SDK is now required (issue #1470).
- Remove CefDOMDocument::GetSelectionStartNode and GetSelectionEndNode methods(see https://codereview.chromium.org/763043004).
- Rename internal namespace used in base headers to avoid linker conflicts with cef_sandbox.lib.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1956 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2014-12-13 20:18:31 +00:00
parent ac81cbcdf1
commit 5a5d2caff2
81 changed files with 2159 additions and 2184 deletions

View File

@ -7,5 +7,5 @@
# https://code.google.com/p/chromiumembedded/wiki/BranchesAndBuilding
{
'chromium_checkout': '40af916dfb14ca12890e3a7cf8b50d8e62c69695',
'chromium_checkout': '8cb76f56a1d0e12b80006e8958187bc8148ea346',
}

File diff suppressed because it is too large Load Diff

View File

@ -1128,6 +1128,8 @@
'<(DEPTH)/chrome/browser/printing/print_job_worker_owner.h',
'<(DEPTH)/chrome/browser/printing/printer_query.cc',
'<(DEPTH)/chrome/browser/printing/printer_query.h',
'<(DEPTH)/chrome/common/extensions/extension_constants.cc',
'<(DEPTH)/chrome/common/extensions/extension_constants.h',
'<(DEPTH)/chrome/common/prerender_messages.h',
'<(DEPTH)/chrome/common/print_messages.cc',
'<(DEPTH)/chrome/common/print_messages.h',
@ -1137,6 +1139,8 @@
'<(DEPTH)/chrome/renderer/prerender/prerender_helper.h',
'<(DEPTH)/chrome/renderer/printing/print_web_view_helper.cc',
'<(DEPTH)/chrome/renderer/printing/print_web_view_helper.h',
'<(DEPTH)/extensions/common/constants.cc',
'<(DEPTH)/extensions/common/constants.h',
# Include header for stub creation (BrowserProcess) so print_job_worker can
# determine the current locale.
'<(DEPTH)/chrome/browser/browser_process.cc',
@ -1287,6 +1291,8 @@
'<(PRODUCT_DIR)/cef_200_percent.pak',
'<(PRODUCT_DIR)/devtools_resources.pak',
'<(PRODUCT_DIR)/icudtl.dat',
'<(PRODUCT_DIR)/natives_blob.bin',
'<(PRODUCT_DIR)/snapshot_blob.bin',
'libcef/resources/framework-Info.plist',
],
'mac_bundle_resources!': [

View File

@ -90,39 +90,39 @@ namespace base {
template <typename Functor>
base::Callback<
typename internal::BindState<
typename internal::FunctorTraits<Functor>::RunnableType,
typename internal::FunctorTraits<Functor>::RunType,
typename cef_internal::BindState<
typename cef_internal::FunctorTraits<Functor>::RunnableType,
typename cef_internal::FunctorTraits<Functor>::RunType,
void()>
::UnboundRunType>
Bind(Functor functor) {
// Typedefs for how to store and run the functor.
typedef typename internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename internal::FunctorTraits<Functor>::RunType RunType;
typedef typename cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;
typedef internal::BindState<RunnableType, RunType, void()> BindState;
typedef cef_internal::BindState<RunnableType, RunType, void()> BindState;
return Callback<typename BindState::UnboundRunType>(
new BindState(internal::MakeRunnable(functor)));
new BindState(cef_internal::MakeRunnable(functor)));
}
template <typename Functor, typename P1>
base::Callback<
typename internal::BindState<
typename internal::FunctorTraits<Functor>::RunnableType,
typename internal::FunctorTraits<Functor>::RunType,
void(typename internal::CallbackParamTraits<P1>::StorageType)>
typename cef_internal::BindState<
typename cef_internal::FunctorTraits<Functor>::RunnableType,
typename cef_internal::FunctorTraits<Functor>::RunType,
void(typename cef_internal::CallbackParamTraits<P1>::StorageType)>
::UnboundRunType>
Bind(Functor functor, const P1& p1) {
// Typedefs for how to store and run the functor.
typedef typename internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename internal::FunctorTraits<Functor>::RunType RunType;
typedef typename cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;
// Use RunnableType::RunType instead of RunType above because our
// checks should below for bound references need to know what the actual
// functor is going to interpret the argument as.
typedef internal::FunctionTraits<typename RunnableType::RunType>
typedef cef_internal::FunctionTraits<typename RunnableType::RunType>
BoundFunctorTraits;
// Do not allow binding a non-const reference parameter. Non-const reference
@ -139,37 +139,37 @@ Bind(Functor functor, const P1& p1) {
// methods. We also disallow binding of an array as the method's target
// object.
COMPILE_ASSERT(
internal::HasIsMethodTag<RunnableType>::value ||
!internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
cef_internal::HasIsMethodTag<RunnableType>::value ||
!cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
p1_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::HasIsMethodTag<RunnableType>::value ||
COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||
!is_array<P1>::value,
first_bound_argument_to_method_cannot_be_array);
typedef internal::BindState<RunnableType, RunType,
void(typename internal::CallbackParamTraits<P1>::StorageType)> BindState;
typedef cef_internal::BindState<RunnableType, RunType,
void(typename cef_internal::CallbackParamTraits<P1>::StorageType)> BindState;
return Callback<typename BindState::UnboundRunType>(
new BindState(internal::MakeRunnable(functor), p1));
new BindState(cef_internal::MakeRunnable(functor), p1));
}
template <typename Functor, typename P1, typename P2>
base::Callback<
typename internal::BindState<
typename internal::FunctorTraits<Functor>::RunnableType,
typename internal::FunctorTraits<Functor>::RunType,
void(typename internal::CallbackParamTraits<P1>::StorageType,
typename internal::CallbackParamTraits<P2>::StorageType)>
typename cef_internal::BindState<
typename cef_internal::FunctorTraits<Functor>::RunnableType,
typename cef_internal::FunctorTraits<Functor>::RunType,
void(typename cef_internal::CallbackParamTraits<P1>::StorageType,
typename cef_internal::CallbackParamTraits<P2>::StorageType)>
::UnboundRunType>
Bind(Functor functor, const P1& p1, const P2& p2) {
// Typedefs for how to store and run the functor.
typedef typename internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename internal::FunctorTraits<Functor>::RunType RunType;
typedef typename cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;
// Use RunnableType::RunType instead of RunType above because our
// checks should below for bound references need to know what the actual
// functor is going to interpret the argument as.
typedef internal::FunctionTraits<typename RunnableType::RunType>
typedef cef_internal::FunctionTraits<typename RunnableType::RunType>
BoundFunctorTraits;
// Do not allow binding a non-const reference parameter. Non-const reference
@ -187,41 +187,41 @@ Bind(Functor functor, const P1& p1, const P2& p2) {
// methods. We also disallow binding of an array as the method's target
// object.
COMPILE_ASSERT(
internal::HasIsMethodTag<RunnableType>::value ||
!internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
cef_internal::HasIsMethodTag<RunnableType>::value ||
!cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
p1_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::HasIsMethodTag<RunnableType>::value ||
COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||
!is_array<P1>::value,
first_bound_argument_to_method_cannot_be_array);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
p2_is_refcounted_type_and_needs_scoped_refptr);
typedef internal::BindState<RunnableType, RunType,
void(typename internal::CallbackParamTraits<P1>::StorageType,
typename internal::CallbackParamTraits<P2>::StorageType)> BindState;
typedef cef_internal::BindState<RunnableType, RunType,
void(typename cef_internal::CallbackParamTraits<P1>::StorageType,
typename cef_internal::CallbackParamTraits<P2>::StorageType)> BindState;
return Callback<typename BindState::UnboundRunType>(
new BindState(internal::MakeRunnable(functor), p1, p2));
new BindState(cef_internal::MakeRunnable(functor), p1, p2));
}
template <typename Functor, typename P1, typename P2, typename P3>
base::Callback<
typename internal::BindState<
typename internal::FunctorTraits<Functor>::RunnableType,
typename internal::FunctorTraits<Functor>::RunType,
void(typename internal::CallbackParamTraits<P1>::StorageType,
typename internal::CallbackParamTraits<P2>::StorageType,
typename internal::CallbackParamTraits<P3>::StorageType)>
typename cef_internal::BindState<
typename cef_internal::FunctorTraits<Functor>::RunnableType,
typename cef_internal::FunctorTraits<Functor>::RunType,
void(typename cef_internal::CallbackParamTraits<P1>::StorageType,
typename cef_internal::CallbackParamTraits<P2>::StorageType,
typename cef_internal::CallbackParamTraits<P3>::StorageType)>
::UnboundRunType>
Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3) {
// Typedefs for how to store and run the functor.
typedef typename internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename internal::FunctorTraits<Functor>::RunType RunType;
typedef typename cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;
// Use RunnableType::RunType instead of RunType above because our
// checks should below for bound references need to know what the actual
// functor is going to interpret the argument as.
typedef internal::FunctionTraits<typename RunnableType::RunType>
typedef cef_internal::FunctionTraits<typename RunnableType::RunType>
BoundFunctorTraits;
// Do not allow binding a non-const reference parameter. Non-const reference
@ -240,45 +240,45 @@ Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3) {
// methods. We also disallow binding of an array as the method's target
// object.
COMPILE_ASSERT(
internal::HasIsMethodTag<RunnableType>::value ||
!internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
cef_internal::HasIsMethodTag<RunnableType>::value ||
!cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
p1_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::HasIsMethodTag<RunnableType>::value ||
COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||
!is_array<P1>::value,
first_bound_argument_to_method_cannot_be_array);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
p2_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,
p3_is_refcounted_type_and_needs_scoped_refptr);
typedef internal::BindState<RunnableType, RunType,
void(typename internal::CallbackParamTraits<P1>::StorageType,
typename internal::CallbackParamTraits<P2>::StorageType,
typename internal::CallbackParamTraits<P3>::StorageType)> BindState;
typedef cef_internal::BindState<RunnableType, RunType,
void(typename cef_internal::CallbackParamTraits<P1>::StorageType,
typename cef_internal::CallbackParamTraits<P2>::StorageType,
typename cef_internal::CallbackParamTraits<P3>::StorageType)> BindState;
return Callback<typename BindState::UnboundRunType>(
new BindState(internal::MakeRunnable(functor), p1, p2, p3));
new BindState(cef_internal::MakeRunnable(functor), p1, p2, p3));
}
template <typename Functor, typename P1, typename P2, typename P3, typename P4>
base::Callback<
typename internal::BindState<
typename internal::FunctorTraits<Functor>::RunnableType,
typename internal::FunctorTraits<Functor>::RunType,
void(typename internal::CallbackParamTraits<P1>::StorageType,
typename internal::CallbackParamTraits<P2>::StorageType,
typename internal::CallbackParamTraits<P3>::StorageType,
typename internal::CallbackParamTraits<P4>::StorageType)>
typename cef_internal::BindState<
typename cef_internal::FunctorTraits<Functor>::RunnableType,
typename cef_internal::FunctorTraits<Functor>::RunType,
void(typename cef_internal::CallbackParamTraits<P1>::StorageType,
typename cef_internal::CallbackParamTraits<P2>::StorageType,
typename cef_internal::CallbackParamTraits<P3>::StorageType,
typename cef_internal::CallbackParamTraits<P4>::StorageType)>
::UnboundRunType>
Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
// Typedefs for how to store and run the functor.
typedef typename internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename internal::FunctorTraits<Functor>::RunType RunType;
typedef typename cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;
// Use RunnableType::RunType instead of RunType above because our
// checks should below for bound references need to know what the actual
// functor is going to interpret the argument as.
typedef internal::FunctionTraits<typename RunnableType::RunType>
typedef cef_internal::FunctionTraits<typename RunnableType::RunType>
BoundFunctorTraits;
// Do not allow binding a non-const reference parameter. Non-const reference
@ -298,51 +298,51 @@ Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
// methods. We also disallow binding of an array as the method's target
// object.
COMPILE_ASSERT(
internal::HasIsMethodTag<RunnableType>::value ||
!internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
cef_internal::HasIsMethodTag<RunnableType>::value ||
!cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
p1_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::HasIsMethodTag<RunnableType>::value ||
COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||
!is_array<P1>::value,
first_bound_argument_to_method_cannot_be_array);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
p2_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,
p3_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P4>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P4>::value,
p4_is_refcounted_type_and_needs_scoped_refptr);
typedef internal::BindState<RunnableType, RunType,
void(typename internal::CallbackParamTraits<P1>::StorageType,
typename internal::CallbackParamTraits<P2>::StorageType,
typename internal::CallbackParamTraits<P3>::StorageType,
typename internal::CallbackParamTraits<P4>::StorageType)> BindState;
typedef cef_internal::BindState<RunnableType, RunType,
void(typename cef_internal::CallbackParamTraits<P1>::StorageType,
typename cef_internal::CallbackParamTraits<P2>::StorageType,
typename cef_internal::CallbackParamTraits<P3>::StorageType,
typename cef_internal::CallbackParamTraits<P4>::StorageType)> BindState;
return Callback<typename BindState::UnboundRunType>(
new BindState(internal::MakeRunnable(functor), p1, p2, p3, p4));
new BindState(cef_internal::MakeRunnable(functor), p1, p2, p3, p4));
}
template <typename Functor, typename P1, typename P2, typename P3, typename P4,
typename P5>
base::Callback<
typename internal::BindState<
typename internal::FunctorTraits<Functor>::RunnableType,
typename internal::FunctorTraits<Functor>::RunType,
void(typename internal::CallbackParamTraits<P1>::StorageType,
typename internal::CallbackParamTraits<P2>::StorageType,
typename internal::CallbackParamTraits<P3>::StorageType,
typename internal::CallbackParamTraits<P4>::StorageType,
typename internal::CallbackParamTraits<P5>::StorageType)>
typename cef_internal::BindState<
typename cef_internal::FunctorTraits<Functor>::RunnableType,
typename cef_internal::FunctorTraits<Functor>::RunType,
void(typename cef_internal::CallbackParamTraits<P1>::StorageType,
typename cef_internal::CallbackParamTraits<P2>::StorageType,
typename cef_internal::CallbackParamTraits<P3>::StorageType,
typename cef_internal::CallbackParamTraits<P4>::StorageType,
typename cef_internal::CallbackParamTraits<P5>::StorageType)>
::UnboundRunType>
Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4,
const P5& p5) {
// Typedefs for how to store and run the functor.
typedef typename internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename internal::FunctorTraits<Functor>::RunType RunType;
typedef typename cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;
// Use RunnableType::RunType instead of RunType above because our
// checks should below for bound references need to know what the actual
// functor is going to interpret the argument as.
typedef internal::FunctionTraits<typename RunnableType::RunType>
typedef cef_internal::FunctionTraits<typename RunnableType::RunType>
BoundFunctorTraits;
// Do not allow binding a non-const reference parameter. Non-const reference
@ -363,55 +363,55 @@ Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4,
// methods. We also disallow binding of an array as the method's target
// object.
COMPILE_ASSERT(
internal::HasIsMethodTag<RunnableType>::value ||
!internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
cef_internal::HasIsMethodTag<RunnableType>::value ||
!cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
p1_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::HasIsMethodTag<RunnableType>::value ||
COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||
!is_array<P1>::value,
first_bound_argument_to_method_cannot_be_array);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
p2_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,
p3_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P4>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P4>::value,
p4_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P5>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P5>::value,
p5_is_refcounted_type_and_needs_scoped_refptr);
typedef internal::BindState<RunnableType, RunType,
void(typename internal::CallbackParamTraits<P1>::StorageType,
typename internal::CallbackParamTraits<P2>::StorageType,
typename internal::CallbackParamTraits<P3>::StorageType,
typename internal::CallbackParamTraits<P4>::StorageType,
typename internal::CallbackParamTraits<P5>::StorageType)> BindState;
typedef cef_internal::BindState<RunnableType, RunType,
void(typename cef_internal::CallbackParamTraits<P1>::StorageType,
typename cef_internal::CallbackParamTraits<P2>::StorageType,
typename cef_internal::CallbackParamTraits<P3>::StorageType,
typename cef_internal::CallbackParamTraits<P4>::StorageType,
typename cef_internal::CallbackParamTraits<P5>::StorageType)> BindState;
return Callback<typename BindState::UnboundRunType>(
new BindState(internal::MakeRunnable(functor), p1, p2, p3, p4, p5));
new BindState(cef_internal::MakeRunnable(functor), p1, p2, p3, p4, p5));
}
template <typename Functor, typename P1, typename P2, typename P3, typename P4,
typename P5, typename P6>
base::Callback<
typename internal::BindState<
typename internal::FunctorTraits<Functor>::RunnableType,
typename internal::FunctorTraits<Functor>::RunType,
void(typename internal::CallbackParamTraits<P1>::StorageType,
typename internal::CallbackParamTraits<P2>::StorageType,
typename internal::CallbackParamTraits<P3>::StorageType,
typename internal::CallbackParamTraits<P4>::StorageType,
typename internal::CallbackParamTraits<P5>::StorageType,
typename internal::CallbackParamTraits<P6>::StorageType)>
typename cef_internal::BindState<
typename cef_internal::FunctorTraits<Functor>::RunnableType,
typename cef_internal::FunctorTraits<Functor>::RunType,
void(typename cef_internal::CallbackParamTraits<P1>::StorageType,
typename cef_internal::CallbackParamTraits<P2>::StorageType,
typename cef_internal::CallbackParamTraits<P3>::StorageType,
typename cef_internal::CallbackParamTraits<P4>::StorageType,
typename cef_internal::CallbackParamTraits<P5>::StorageType,
typename cef_internal::CallbackParamTraits<P6>::StorageType)>
::UnboundRunType>
Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4,
const P5& p5, const P6& p6) {
// Typedefs for how to store and run the functor.
typedef typename internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename internal::FunctorTraits<Functor>::RunType RunType;
typedef typename cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;
// Use RunnableType::RunType instead of RunType above because our
// checks should below for bound references need to know what the actual
// functor is going to interpret the argument as.
typedef internal::FunctionTraits<typename RunnableType::RunType>
typedef cef_internal::FunctionTraits<typename RunnableType::RunType>
BoundFunctorTraits;
// Do not allow binding a non-const reference parameter. Non-const reference
@ -433,59 +433,59 @@ Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4,
// methods. We also disallow binding of an array as the method's target
// object.
COMPILE_ASSERT(
internal::HasIsMethodTag<RunnableType>::value ||
!internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
cef_internal::HasIsMethodTag<RunnableType>::value ||
!cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
p1_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::HasIsMethodTag<RunnableType>::value ||
COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||
!is_array<P1>::value,
first_bound_argument_to_method_cannot_be_array);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
p2_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,
p3_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P4>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P4>::value,
p4_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P5>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P5>::value,
p5_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P6>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P6>::value,
p6_is_refcounted_type_and_needs_scoped_refptr);
typedef internal::BindState<RunnableType, RunType,
void(typename internal::CallbackParamTraits<P1>::StorageType,
typename internal::CallbackParamTraits<P2>::StorageType,
typename internal::CallbackParamTraits<P3>::StorageType,
typename internal::CallbackParamTraits<P4>::StorageType,
typename internal::CallbackParamTraits<P5>::StorageType,
typename internal::CallbackParamTraits<P6>::StorageType)> BindState;
typedef cef_internal::BindState<RunnableType, RunType,
void(typename cef_internal::CallbackParamTraits<P1>::StorageType,
typename cef_internal::CallbackParamTraits<P2>::StorageType,
typename cef_internal::CallbackParamTraits<P3>::StorageType,
typename cef_internal::CallbackParamTraits<P4>::StorageType,
typename cef_internal::CallbackParamTraits<P5>::StorageType,
typename cef_internal::CallbackParamTraits<P6>::StorageType)> BindState;
return Callback<typename BindState::UnboundRunType>(
new BindState(internal::MakeRunnable(functor), p1, p2, p3, p4, p5, p6));
new BindState(cef_internal::MakeRunnable(functor), p1, p2, p3, p4, p5, p6));
}
template <typename Functor, typename P1, typename P2, typename P3, typename P4,
typename P5, typename P6, typename P7>
base::Callback<
typename internal::BindState<
typename internal::FunctorTraits<Functor>::RunnableType,
typename internal::FunctorTraits<Functor>::RunType,
void(typename internal::CallbackParamTraits<P1>::StorageType,
typename internal::CallbackParamTraits<P2>::StorageType,
typename internal::CallbackParamTraits<P3>::StorageType,
typename internal::CallbackParamTraits<P4>::StorageType,
typename internal::CallbackParamTraits<P5>::StorageType,
typename internal::CallbackParamTraits<P6>::StorageType,
typename internal::CallbackParamTraits<P7>::StorageType)>
typename cef_internal::BindState<
typename cef_internal::FunctorTraits<Functor>::RunnableType,
typename cef_internal::FunctorTraits<Functor>::RunType,
void(typename cef_internal::CallbackParamTraits<P1>::StorageType,
typename cef_internal::CallbackParamTraits<P2>::StorageType,
typename cef_internal::CallbackParamTraits<P3>::StorageType,
typename cef_internal::CallbackParamTraits<P4>::StorageType,
typename cef_internal::CallbackParamTraits<P5>::StorageType,
typename cef_internal::CallbackParamTraits<P6>::StorageType,
typename cef_internal::CallbackParamTraits<P7>::StorageType)>
::UnboundRunType>
Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4,
const P5& p5, const P6& p6, const P7& p7) {
// Typedefs for how to store and run the functor.
typedef typename internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename internal::FunctorTraits<Functor>::RunType RunType;
typedef typename cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;
// Use RunnableType::RunType instead of RunType above because our
// checks should below for bound references need to know what the actual
// functor is going to interpret the argument as.
typedef internal::FunctionTraits<typename RunnableType::RunType>
typedef cef_internal::FunctionTraits<typename RunnableType::RunType>
BoundFunctorTraits;
// Do not allow binding a non-const reference parameter. Non-const reference
@ -508,36 +508,36 @@ Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4,
// methods. We also disallow binding of an array as the method's target
// object.
COMPILE_ASSERT(
internal::HasIsMethodTag<RunnableType>::value ||
!internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
cef_internal::HasIsMethodTag<RunnableType>::value ||
!cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
p1_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::HasIsMethodTag<RunnableType>::value ||
COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||
!is_array<P1>::value,
first_bound_argument_to_method_cannot_be_array);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
p2_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,
p3_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P4>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P4>::value,
p4_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P5>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P5>::value,
p5_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P6>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P6>::value,
p6_is_refcounted_type_and_needs_scoped_refptr);
COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr<P7>::value,
COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P7>::value,
p7_is_refcounted_type_and_needs_scoped_refptr);
typedef internal::BindState<RunnableType, RunType,
void(typename internal::CallbackParamTraits<P1>::StorageType,
typename internal::CallbackParamTraits<P2>::StorageType,
typename internal::CallbackParamTraits<P3>::StorageType,
typename internal::CallbackParamTraits<P4>::StorageType,
typename internal::CallbackParamTraits<P5>::StorageType,
typename internal::CallbackParamTraits<P6>::StorageType,
typename internal::CallbackParamTraits<P7>::StorageType)> BindState;
typedef cef_internal::BindState<RunnableType, RunType,
void(typename cef_internal::CallbackParamTraits<P1>::StorageType,
typename cef_internal::CallbackParamTraits<P2>::StorageType,
typename cef_internal::CallbackParamTraits<P3>::StorageType,
typename cef_internal::CallbackParamTraits<P4>::StorageType,
typename cef_internal::CallbackParamTraits<P5>::StorageType,
typename cef_internal::CallbackParamTraits<P6>::StorageType,
typename cef_internal::CallbackParamTraits<P7>::StorageType)> BindState;
return Callback<typename BindState::UnboundRunType>(
new BindState(internal::MakeRunnable(functor), p1, p2, p3, p4, p5, p6,
new BindState(cef_internal::MakeRunnable(functor), p1, p2, p3, p4, p5, p6,
p7));
}

View File

@ -189,7 +189,7 @@
#include "include/base/cef_weak_ptr.h"
namespace base {
namespace internal {
namespace cef_internal {
// Use the Substitution Failure Is Not An Error (SFINAE) trick to inspect T
// for the existence of AddRef() and Release() functions of the correct
@ -531,21 +531,21 @@ struct IsWeakMethod<true, WeakPtr<T> > : public true_type {};
template <typename T>
struct IsWeakMethod<true, ConstRefWrapper<WeakPtr<T> > > : public true_type {};
} // namespace internal
} // namespace cef_internal
template <typename T>
static inline internal::UnretainedWrapper<T> Unretained(T* o) {
return internal::UnretainedWrapper<T>(o);
static inline cef_internal::UnretainedWrapper<T> Unretained(T* o) {
return cef_internal::UnretainedWrapper<T>(o);
}
template <typename T>
static inline internal::ConstRefWrapper<T> ConstRef(const T& o) {
return internal::ConstRefWrapper<T>(o);
static inline cef_internal::ConstRefWrapper<T> ConstRef(const T& o) {
return cef_internal::ConstRefWrapper<T>(o);
}
template <typename T>
static inline internal::OwnedWrapper<T> Owned(T* o) {
return internal::OwnedWrapper<T>(o);
static inline cef_internal::OwnedWrapper<T> Owned(T* o) {
return cef_internal::OwnedWrapper<T>(o);
}
// We offer 2 syntaxes for calling Passed(). The first takes a temporary and
@ -553,23 +553,23 @@ static inline internal::OwnedWrapper<T> Owned(T* o) {
// takes a pointer to the scoper and is just syntactic sugar to avoid having
// to write Passed(scoper.Pass()).
template <typename T>
static inline internal::PassedWrapper<T> Passed(T scoper) {
return internal::PassedWrapper<T>(scoper.Pass());
static inline cef_internal::PassedWrapper<T> Passed(T scoper) {
return cef_internal::PassedWrapper<T>(scoper.Pass());
}
template <typename T>
static inline internal::PassedWrapper<T> Passed(T* scoper) {
return internal::PassedWrapper<T>(scoper->Pass());
static inline cef_internal::PassedWrapper<T> Passed(T* scoper) {
return cef_internal::PassedWrapper<T>(scoper->Pass());
}
template <typename T>
static inline internal::IgnoreResultHelper<T> IgnoreResult(T data) {
return internal::IgnoreResultHelper<T>(data);
static inline cef_internal::IgnoreResultHelper<T> IgnoreResult(T data) {
return cef_internal::IgnoreResultHelper<T>(data);
}
template <typename T>
static inline internal::IgnoreResultHelper<Callback<T> >
static inline cef_internal::IgnoreResultHelper<Callback<T> >
IgnoreResult(const Callback<T>& data) {
return internal::IgnoreResultHelper<Callback<T> >(data);
return cef_internal::IgnoreResultHelper<Callback<T> >(data);
}
void DoNothing();

View File

@ -397,13 +397,13 @@ namespace base {
template <typename Sig>
class Callback;
namespace internal {
namespace cef_internal {
template <typename Runnable, typename RunType, typename BoundArgsType>
struct BindState;
} // namespace internal
} // namespace cef_internal
template <typename R>
class Callback<R(void)> : public internal::CallbackBase {
class Callback<R(void)> : public cef_internal::CallbackBase {
public:
typedef R(RunType)();
@ -412,7 +412,7 @@ class Callback<R(void)> : public internal::CallbackBase {
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT
// return the exact Callback<> type. See base/bind.h for details.
template <typename Runnable, typename BindRunType, typename BoundArgsType>
Callback(internal::BindState<Runnable, BindRunType,
Callback(cef_internal::BindState<Runnable, BindRunType,
BoundArgsType>* bind_state)
: CallbackBase(bind_state) {
@ -420,7 +420,7 @@ class Callback<R(void)> : public internal::CallbackBase {
// so the compiler will typecheck that the passed in Run() method has
// the correct type.
PolymorphicInvoke invoke_func =
&internal::BindState<Runnable, BindRunType, BoundArgsType>
&cef_internal::BindState<Runnable, BindRunType, BoundArgsType>
::InvokerType::Run;
polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);
}
@ -438,12 +438,12 @@ class Callback<R(void)> : public internal::CallbackBase {
private:
typedef R(*PolymorphicInvoke)(
internal::BindStateBase*);
cef_internal::BindStateBase*);
};
template <typename R, typename A1>
class Callback<R(A1)> : public internal::CallbackBase {
class Callback<R(A1)> : public cef_internal::CallbackBase {
public:
typedef R(RunType)(A1);
@ -452,7 +452,7 @@ class Callback<R(A1)> : public internal::CallbackBase {
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT
// return the exact Callback<> type. See base/bind.h for details.
template <typename Runnable, typename BindRunType, typename BoundArgsType>
Callback(internal::BindState<Runnable, BindRunType,
Callback(cef_internal::BindState<Runnable, BindRunType,
BoundArgsType>* bind_state)
: CallbackBase(bind_state) {
@ -460,7 +460,7 @@ class Callback<R(A1)> : public internal::CallbackBase {
// so the compiler will typecheck that the passed in Run() method has
// the correct type.
PolymorphicInvoke invoke_func =
&internal::BindState<Runnable, BindRunType, BoundArgsType>
&cef_internal::BindState<Runnable, BindRunType, BoundArgsType>
::InvokerType::Run;
polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);
}
@ -469,22 +469,22 @@ class Callback<R(A1)> : public internal::CallbackBase {
return CallbackBase::Equals(other);
}
R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1) const {
R Run(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1) const {
PolymorphicInvoke f =
reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
return f(bind_state_.get(), internal::CallbackForward(a1));
return f(bind_state_.get(), cef_internal::CallbackForward(a1));
}
private:
typedef R(*PolymorphicInvoke)(
internal::BindStateBase*,
typename internal::CallbackParamTraits<A1>::ForwardType);
cef_internal::BindStateBase*,
typename cef_internal::CallbackParamTraits<A1>::ForwardType);
};
template <typename R, typename A1, typename A2>
class Callback<R(A1, A2)> : public internal::CallbackBase {
class Callback<R(A1, A2)> : public cef_internal::CallbackBase {
public:
typedef R(RunType)(A1, A2);
@ -493,7 +493,7 @@ class Callback<R(A1, A2)> : public internal::CallbackBase {
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT
// return the exact Callback<> type. See base/bind.h for details.
template <typename Runnable, typename BindRunType, typename BoundArgsType>
Callback(internal::BindState<Runnable, BindRunType,
Callback(cef_internal::BindState<Runnable, BindRunType,
BoundArgsType>* bind_state)
: CallbackBase(bind_state) {
@ -501,7 +501,7 @@ class Callback<R(A1, A2)> : public internal::CallbackBase {
// so the compiler will typecheck that the passed in Run() method has
// the correct type.
PolymorphicInvoke invoke_func =
&internal::BindState<Runnable, BindRunType, BoundArgsType>
&cef_internal::BindState<Runnable, BindRunType, BoundArgsType>
::InvokerType::Run;
polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);
}
@ -510,25 +510,25 @@ class Callback<R(A1, A2)> : public internal::CallbackBase {
return CallbackBase::Equals(other);
}
R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1,
typename internal::CallbackParamTraits<A2>::ForwardType a2) const {
R Run(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,
typename cef_internal::CallbackParamTraits<A2>::ForwardType a2) const {
PolymorphicInvoke f =
reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
return f(bind_state_.get(), internal::CallbackForward(a1),
internal::CallbackForward(a2));
return f(bind_state_.get(), cef_internal::CallbackForward(a1),
cef_internal::CallbackForward(a2));
}
private:
typedef R(*PolymorphicInvoke)(
internal::BindStateBase*,
typename internal::CallbackParamTraits<A1>::ForwardType,
typename internal::CallbackParamTraits<A2>::ForwardType);
cef_internal::BindStateBase*,
typename cef_internal::CallbackParamTraits<A1>::ForwardType,
typename cef_internal::CallbackParamTraits<A2>::ForwardType);
};
template <typename R, typename A1, typename A2, typename A3>
class Callback<R(A1, A2, A3)> : public internal::CallbackBase {
class Callback<R(A1, A2, A3)> : public cef_internal::CallbackBase {
public:
typedef R(RunType)(A1, A2, A3);
@ -537,7 +537,7 @@ class Callback<R(A1, A2, A3)> : public internal::CallbackBase {
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT
// return the exact Callback<> type. See base/bind.h for details.
template <typename Runnable, typename BindRunType, typename BoundArgsType>
Callback(internal::BindState<Runnable, BindRunType,
Callback(cef_internal::BindState<Runnable, BindRunType,
BoundArgsType>* bind_state)
: CallbackBase(bind_state) {
@ -545,7 +545,7 @@ class Callback<R(A1, A2, A3)> : public internal::CallbackBase {
// so the compiler will typecheck that the passed in Run() method has
// the correct type.
PolymorphicInvoke invoke_func =
&internal::BindState<Runnable, BindRunType, BoundArgsType>
&cef_internal::BindState<Runnable, BindRunType, BoundArgsType>
::InvokerType::Run;
polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);
}
@ -554,28 +554,28 @@ class Callback<R(A1, A2, A3)> : public internal::CallbackBase {
return CallbackBase::Equals(other);
}
R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1,
typename internal::CallbackParamTraits<A2>::ForwardType a2,
typename internal::CallbackParamTraits<A3>::ForwardType a3) const {
R Run(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,
typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,
typename cef_internal::CallbackParamTraits<A3>::ForwardType a3) const {
PolymorphicInvoke f =
reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
return f(bind_state_.get(), internal::CallbackForward(a1),
internal::CallbackForward(a2),
internal::CallbackForward(a3));
return f(bind_state_.get(), cef_internal::CallbackForward(a1),
cef_internal::CallbackForward(a2),
cef_internal::CallbackForward(a3));
}
private:
typedef R(*PolymorphicInvoke)(
internal::BindStateBase*,
typename internal::CallbackParamTraits<A1>::ForwardType,
typename internal::CallbackParamTraits<A2>::ForwardType,
typename internal::CallbackParamTraits<A3>::ForwardType);
cef_internal::BindStateBase*,
typename cef_internal::CallbackParamTraits<A1>::ForwardType,
typename cef_internal::CallbackParamTraits<A2>::ForwardType,
typename cef_internal::CallbackParamTraits<A3>::ForwardType);
};
template <typename R, typename A1, typename A2, typename A3, typename A4>
class Callback<R(A1, A2, A3, A4)> : public internal::CallbackBase {
class Callback<R(A1, A2, A3, A4)> : public cef_internal::CallbackBase {
public:
typedef R(RunType)(A1, A2, A3, A4);
@ -584,7 +584,7 @@ class Callback<R(A1, A2, A3, A4)> : public internal::CallbackBase {
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT
// return the exact Callback<> type. See base/bind.h for details.
template <typename Runnable, typename BindRunType, typename BoundArgsType>
Callback(internal::BindState<Runnable, BindRunType,
Callback(cef_internal::BindState<Runnable, BindRunType,
BoundArgsType>* bind_state)
: CallbackBase(bind_state) {
@ -592,7 +592,7 @@ class Callback<R(A1, A2, A3, A4)> : public internal::CallbackBase {
// so the compiler will typecheck that the passed in Run() method has
// the correct type.
PolymorphicInvoke invoke_func =
&internal::BindState<Runnable, BindRunType, BoundArgsType>
&cef_internal::BindState<Runnable, BindRunType, BoundArgsType>
::InvokerType::Run;
polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);
}
@ -601,32 +601,32 @@ class Callback<R(A1, A2, A3, A4)> : public internal::CallbackBase {
return CallbackBase::Equals(other);
}
R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1,
typename internal::CallbackParamTraits<A2>::ForwardType a2,
typename internal::CallbackParamTraits<A3>::ForwardType a3,
typename internal::CallbackParamTraits<A4>::ForwardType a4) const {
R Run(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,
typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,
typename cef_internal::CallbackParamTraits<A3>::ForwardType a3,
typename cef_internal::CallbackParamTraits<A4>::ForwardType a4) const {
PolymorphicInvoke f =
reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
return f(bind_state_.get(), internal::CallbackForward(a1),
internal::CallbackForward(a2),
internal::CallbackForward(a3),
internal::CallbackForward(a4));
return f(bind_state_.get(), cef_internal::CallbackForward(a1),
cef_internal::CallbackForward(a2),
cef_internal::CallbackForward(a3),
cef_internal::CallbackForward(a4));
}
private:
typedef R(*PolymorphicInvoke)(
internal::BindStateBase*,
typename internal::CallbackParamTraits<A1>::ForwardType,
typename internal::CallbackParamTraits<A2>::ForwardType,
typename internal::CallbackParamTraits<A3>::ForwardType,
typename internal::CallbackParamTraits<A4>::ForwardType);
cef_internal::BindStateBase*,
typename cef_internal::CallbackParamTraits<A1>::ForwardType,
typename cef_internal::CallbackParamTraits<A2>::ForwardType,
typename cef_internal::CallbackParamTraits<A3>::ForwardType,
typename cef_internal::CallbackParamTraits<A4>::ForwardType);
};
template <typename R, typename A1, typename A2, typename A3, typename A4,
typename A5>
class Callback<R(A1, A2, A3, A4, A5)> : public internal::CallbackBase {
class Callback<R(A1, A2, A3, A4, A5)> : public cef_internal::CallbackBase {
public:
typedef R(RunType)(A1, A2, A3, A4, A5);
@ -635,7 +635,7 @@ class Callback<R(A1, A2, A3, A4, A5)> : public internal::CallbackBase {
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT
// return the exact Callback<> type. See base/bind.h for details.
template <typename Runnable, typename BindRunType, typename BoundArgsType>
Callback(internal::BindState<Runnable, BindRunType,
Callback(cef_internal::BindState<Runnable, BindRunType,
BoundArgsType>* bind_state)
: CallbackBase(bind_state) {
@ -643,7 +643,7 @@ class Callback<R(A1, A2, A3, A4, A5)> : public internal::CallbackBase {
// so the compiler will typecheck that the passed in Run() method has
// the correct type.
PolymorphicInvoke invoke_func =
&internal::BindState<Runnable, BindRunType, BoundArgsType>
&cef_internal::BindState<Runnable, BindRunType, BoundArgsType>
::InvokerType::Run;
polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);
}
@ -652,35 +652,35 @@ class Callback<R(A1, A2, A3, A4, A5)> : public internal::CallbackBase {
return CallbackBase::Equals(other);
}
R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1,
typename internal::CallbackParamTraits<A2>::ForwardType a2,
typename internal::CallbackParamTraits<A3>::ForwardType a3,
typename internal::CallbackParamTraits<A4>::ForwardType a4,
typename internal::CallbackParamTraits<A5>::ForwardType a5) const {
R Run(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,
typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,
typename cef_internal::CallbackParamTraits<A3>::ForwardType a3,
typename cef_internal::CallbackParamTraits<A4>::ForwardType a4,
typename cef_internal::CallbackParamTraits<A5>::ForwardType a5) const {
PolymorphicInvoke f =
reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
return f(bind_state_.get(), internal::CallbackForward(a1),
internal::CallbackForward(a2),
internal::CallbackForward(a3),
internal::CallbackForward(a4),
internal::CallbackForward(a5));
return f(bind_state_.get(), cef_internal::CallbackForward(a1),
cef_internal::CallbackForward(a2),
cef_internal::CallbackForward(a3),
cef_internal::CallbackForward(a4),
cef_internal::CallbackForward(a5));
}
private:
typedef R(*PolymorphicInvoke)(
internal::BindStateBase*,
typename internal::CallbackParamTraits<A1>::ForwardType,
typename internal::CallbackParamTraits<A2>::ForwardType,
typename internal::CallbackParamTraits<A3>::ForwardType,
typename internal::CallbackParamTraits<A4>::ForwardType,
typename internal::CallbackParamTraits<A5>::ForwardType);
cef_internal::BindStateBase*,
typename cef_internal::CallbackParamTraits<A1>::ForwardType,
typename cef_internal::CallbackParamTraits<A2>::ForwardType,
typename cef_internal::CallbackParamTraits<A3>::ForwardType,
typename cef_internal::CallbackParamTraits<A4>::ForwardType,
typename cef_internal::CallbackParamTraits<A5>::ForwardType);
};
template <typename R, typename A1, typename A2, typename A3, typename A4,
typename A5, typename A6>
class Callback<R(A1, A2, A3, A4, A5, A6)> : public internal::CallbackBase {
class Callback<R(A1, A2, A3, A4, A5, A6)> : public cef_internal::CallbackBase {
public:
typedef R(RunType)(A1, A2, A3, A4, A5, A6);
@ -689,7 +689,7 @@ class Callback<R(A1, A2, A3, A4, A5, A6)> : public internal::CallbackBase {
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT
// return the exact Callback<> type. See base/bind.h for details.
template <typename Runnable, typename BindRunType, typename BoundArgsType>
Callback(internal::BindState<Runnable, BindRunType,
Callback(cef_internal::BindState<Runnable, BindRunType,
BoundArgsType>* bind_state)
: CallbackBase(bind_state) {
@ -697,7 +697,7 @@ class Callback<R(A1, A2, A3, A4, A5, A6)> : public internal::CallbackBase {
// so the compiler will typecheck that the passed in Run() method has
// the correct type.
PolymorphicInvoke invoke_func =
&internal::BindState<Runnable, BindRunType, BoundArgsType>
&cef_internal::BindState<Runnable, BindRunType, BoundArgsType>
::InvokerType::Run;
polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);
}
@ -706,38 +706,38 @@ class Callback<R(A1, A2, A3, A4, A5, A6)> : public internal::CallbackBase {
return CallbackBase::Equals(other);
}
R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1,
typename internal::CallbackParamTraits<A2>::ForwardType a2,
typename internal::CallbackParamTraits<A3>::ForwardType a3,
typename internal::CallbackParamTraits<A4>::ForwardType a4,
typename internal::CallbackParamTraits<A5>::ForwardType a5,
typename internal::CallbackParamTraits<A6>::ForwardType a6) const {
R Run(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,
typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,
typename cef_internal::CallbackParamTraits<A3>::ForwardType a3,
typename cef_internal::CallbackParamTraits<A4>::ForwardType a4,
typename cef_internal::CallbackParamTraits<A5>::ForwardType a5,
typename cef_internal::CallbackParamTraits<A6>::ForwardType a6) const {
PolymorphicInvoke f =
reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
return f(bind_state_.get(), internal::CallbackForward(a1),
internal::CallbackForward(a2),
internal::CallbackForward(a3),
internal::CallbackForward(a4),
internal::CallbackForward(a5),
internal::CallbackForward(a6));
return f(bind_state_.get(), cef_internal::CallbackForward(a1),
cef_internal::CallbackForward(a2),
cef_internal::CallbackForward(a3),
cef_internal::CallbackForward(a4),
cef_internal::CallbackForward(a5),
cef_internal::CallbackForward(a6));
}
private:
typedef R(*PolymorphicInvoke)(
internal::BindStateBase*,
typename internal::CallbackParamTraits<A1>::ForwardType,
typename internal::CallbackParamTraits<A2>::ForwardType,
typename internal::CallbackParamTraits<A3>::ForwardType,
typename internal::CallbackParamTraits<A4>::ForwardType,
typename internal::CallbackParamTraits<A5>::ForwardType,
typename internal::CallbackParamTraits<A6>::ForwardType);
cef_internal::BindStateBase*,
typename cef_internal::CallbackParamTraits<A1>::ForwardType,
typename cef_internal::CallbackParamTraits<A2>::ForwardType,
typename cef_internal::CallbackParamTraits<A3>::ForwardType,
typename cef_internal::CallbackParamTraits<A4>::ForwardType,
typename cef_internal::CallbackParamTraits<A5>::ForwardType,
typename cef_internal::CallbackParamTraits<A6>::ForwardType);
};
template <typename R, typename A1, typename A2, typename A3, typename A4,
typename A5, typename A6, typename A7>
class Callback<R(A1, A2, A3, A4, A5, A6, A7)> : public internal::CallbackBase {
class Callback<R(A1, A2, A3, A4, A5, A6, A7)> : public cef_internal::CallbackBase {
public:
typedef R(RunType)(A1, A2, A3, A4, A5, A6, A7);
@ -746,7 +746,7 @@ class Callback<R(A1, A2, A3, A4, A5, A6, A7)> : public internal::CallbackBase {
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT
// return the exact Callback<> type. See base/bind.h for details.
template <typename Runnable, typename BindRunType, typename BoundArgsType>
Callback(internal::BindState<Runnable, BindRunType,
Callback(cef_internal::BindState<Runnable, BindRunType,
BoundArgsType>* bind_state)
: CallbackBase(bind_state) {
@ -754,7 +754,7 @@ class Callback<R(A1, A2, A3, A4, A5, A6, A7)> : public internal::CallbackBase {
// so the compiler will typecheck that the passed in Run() method has
// the correct type.
PolymorphicInvoke invoke_func =
&internal::BindState<Runnable, BindRunType, BoundArgsType>
&cef_internal::BindState<Runnable, BindRunType, BoundArgsType>
::InvokerType::Run;
polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);
}
@ -763,35 +763,35 @@ class Callback<R(A1, A2, A3, A4, A5, A6, A7)> : public internal::CallbackBase {
return CallbackBase::Equals(other);
}
R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1,
typename internal::CallbackParamTraits<A2>::ForwardType a2,
typename internal::CallbackParamTraits<A3>::ForwardType a3,
typename internal::CallbackParamTraits<A4>::ForwardType a4,
typename internal::CallbackParamTraits<A5>::ForwardType a5,
typename internal::CallbackParamTraits<A6>::ForwardType a6,
typename internal::CallbackParamTraits<A7>::ForwardType a7) const {
R Run(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,
typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,
typename cef_internal::CallbackParamTraits<A3>::ForwardType a3,
typename cef_internal::CallbackParamTraits<A4>::ForwardType a4,
typename cef_internal::CallbackParamTraits<A5>::ForwardType a5,
typename cef_internal::CallbackParamTraits<A6>::ForwardType a6,
typename cef_internal::CallbackParamTraits<A7>::ForwardType a7) const {
PolymorphicInvoke f =
reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
return f(bind_state_.get(), internal::CallbackForward(a1),
internal::CallbackForward(a2),
internal::CallbackForward(a3),
internal::CallbackForward(a4),
internal::CallbackForward(a5),
internal::CallbackForward(a6),
internal::CallbackForward(a7));
return f(bind_state_.get(), cef_internal::CallbackForward(a1),
cef_internal::CallbackForward(a2),
cef_internal::CallbackForward(a3),
cef_internal::CallbackForward(a4),
cef_internal::CallbackForward(a5),
cef_internal::CallbackForward(a6),
cef_internal::CallbackForward(a7));
}
private:
typedef R(*PolymorphicInvoke)(
internal::BindStateBase*,
typename internal::CallbackParamTraits<A1>::ForwardType,
typename internal::CallbackParamTraits<A2>::ForwardType,
typename internal::CallbackParamTraits<A3>::ForwardType,
typename internal::CallbackParamTraits<A4>::ForwardType,
typename internal::CallbackParamTraits<A5>::ForwardType,
typename internal::CallbackParamTraits<A6>::ForwardType,
typename internal::CallbackParamTraits<A7>::ForwardType);
cef_internal::BindStateBase*,
typename cef_internal::CallbackParamTraits<A1>::ForwardType,
typename cef_internal::CallbackParamTraits<A2>::ForwardType,
typename cef_internal::CallbackParamTraits<A3>::ForwardType,
typename cef_internal::CallbackParamTraits<A4>::ForwardType,
typename cef_internal::CallbackParamTraits<A5>::ForwardType,
typename cef_internal::CallbackParamTraits<A6>::ForwardType,
typename cef_internal::CallbackParamTraits<A7>::ForwardType);
};

View File

@ -111,7 +111,7 @@
namespace base {
namespace internal {
namespace cef_internal {
template <typename CallbackType>
class CallbackListBase {
@ -240,20 +240,20 @@ class CallbackListBase {
DISALLOW_COPY_AND_ASSIGN(CallbackListBase);
};
} // namespace internal
} // namespace cef_internal
template <typename Sig> class CallbackList;
template <>
class CallbackList<void(void)>
: public internal::CallbackListBase<Callback<void(void)> > {
: public cef_internal::CallbackListBase<Callback<void(void)> > {
public:
typedef Callback<void(void)> CallbackType;
CallbackList() {}
void Notify() {
internal::CallbackListBase<CallbackType>::Iterator it =
cef_internal::CallbackListBase<CallbackType>::Iterator it =
this->GetIterator();
CallbackType* cb;
while ((cb = it.GetNext()) != NULL) {
@ -267,14 +267,14 @@ class CallbackList<void(void)>
template <typename A1>
class CallbackList<void(A1)>
: public internal::CallbackListBase<Callback<void(A1)> > {
: public cef_internal::CallbackListBase<Callback<void(A1)> > {
public:
typedef Callback<void(A1)> CallbackType;
CallbackList() {}
void Notify(typename internal::CallbackParamTraits<A1>::ForwardType a1) {
typename internal::CallbackListBase<CallbackType>::Iterator it =
void Notify(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1) {
typename cef_internal::CallbackListBase<CallbackType>::Iterator it =
this->GetIterator();
CallbackType* cb;
while ((cb = it.GetNext()) != NULL) {
@ -288,15 +288,15 @@ class CallbackList<void(A1)>
template <typename A1, typename A2>
class CallbackList<void(A1, A2)>
: public internal::CallbackListBase<Callback<void(A1, A2)> > {
: public cef_internal::CallbackListBase<Callback<void(A1, A2)> > {
public:
typedef Callback<void(A1, A2)> CallbackType;
CallbackList() {}
void Notify(typename internal::CallbackParamTraits<A1>::ForwardType a1,
typename internal::CallbackParamTraits<A2>::ForwardType a2) {
typename internal::CallbackListBase<CallbackType>::Iterator it =
void Notify(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,
typename cef_internal::CallbackParamTraits<A2>::ForwardType a2) {
typename cef_internal::CallbackListBase<CallbackType>::Iterator it =
this->GetIterator();
CallbackType* cb;
while ((cb = it.GetNext()) != NULL) {
@ -310,16 +310,16 @@ class CallbackList<void(A1, A2)>
template <typename A1, typename A2, typename A3>
class CallbackList<void(A1, A2, A3)>
: public internal::CallbackListBase<Callback<void(A1, A2, A3)> > {
: public cef_internal::CallbackListBase<Callback<void(A1, A2, A3)> > {
public:
typedef Callback<void(A1, A2, A3)> CallbackType;
CallbackList() {}
void Notify(typename internal::CallbackParamTraits<A1>::ForwardType a1,
typename internal::CallbackParamTraits<A2>::ForwardType a2,
typename internal::CallbackParamTraits<A3>::ForwardType a3) {
typename internal::CallbackListBase<CallbackType>::Iterator it =
void Notify(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,
typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,
typename cef_internal::CallbackParamTraits<A3>::ForwardType a3) {
typename cef_internal::CallbackListBase<CallbackType>::Iterator it =
this->GetIterator();
CallbackType* cb;
while ((cb = it.GetNext()) != NULL) {
@ -333,17 +333,17 @@ class CallbackList<void(A1, A2, A3)>
template <typename A1, typename A2, typename A3, typename A4>
class CallbackList<void(A1, A2, A3, A4)>
: public internal::CallbackListBase<Callback<void(A1, A2, A3, A4)> > {
: public cef_internal::CallbackListBase<Callback<void(A1, A2, A3, A4)> > {
public:
typedef Callback<void(A1, A2, A3, A4)> CallbackType;
CallbackList() {}
void Notify(typename internal::CallbackParamTraits<A1>::ForwardType a1,
typename internal::CallbackParamTraits<A2>::ForwardType a2,
typename internal::CallbackParamTraits<A3>::ForwardType a3,
typename internal::CallbackParamTraits<A4>::ForwardType a4) {
typename internal::CallbackListBase<CallbackType>::Iterator it =
void Notify(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,
typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,
typename cef_internal::CallbackParamTraits<A3>::ForwardType a3,
typename cef_internal::CallbackParamTraits<A4>::ForwardType a4) {
typename cef_internal::CallbackListBase<CallbackType>::Iterator it =
this->GetIterator();
CallbackType* cb;
while ((cb = it.GetNext()) != NULL) {
@ -357,18 +357,18 @@ class CallbackList<void(A1, A2, A3, A4)>
template <typename A1, typename A2, typename A3, typename A4, typename A5>
class CallbackList<void(A1, A2, A3, A4, A5)>
: public internal::CallbackListBase<Callback<void(A1, A2, A3, A4, A5)> > {
: public cef_internal::CallbackListBase<Callback<void(A1, A2, A3, A4, A5)> > {
public:
typedef Callback<void(A1, A2, A3, A4, A5)> CallbackType;
CallbackList() {}
void Notify(typename internal::CallbackParamTraits<A1>::ForwardType a1,
typename internal::CallbackParamTraits<A2>::ForwardType a2,
typename internal::CallbackParamTraits<A3>::ForwardType a3,
typename internal::CallbackParamTraits<A4>::ForwardType a4,
typename internal::CallbackParamTraits<A5>::ForwardType a5) {
typename internal::CallbackListBase<CallbackType>::Iterator it =
void Notify(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,
typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,
typename cef_internal::CallbackParamTraits<A3>::ForwardType a3,
typename cef_internal::CallbackParamTraits<A4>::ForwardType a4,
typename cef_internal::CallbackParamTraits<A5>::ForwardType a5) {
typename cef_internal::CallbackListBase<CallbackType>::Iterator it =
this->GetIterator();
CallbackType* cb;
while ((cb = it.GetNext()) != NULL) {
@ -383,20 +383,20 @@ class CallbackList<void(A1, A2, A3, A4, A5)>
template <typename A1, typename A2, typename A3, typename A4, typename A5,
typename A6>
class CallbackList<void(A1, A2, A3, A4, A5, A6)>
: public internal::CallbackListBase<Callback<void(A1, A2, A3, A4, A5,
: public cef_internal::CallbackListBase<Callback<void(A1, A2, A3, A4, A5,
A6)> > {
public:
typedef Callback<void(A1, A2, A3, A4, A5, A6)> CallbackType;
CallbackList() {}
void Notify(typename internal::CallbackParamTraits<A1>::ForwardType a1,
typename internal::CallbackParamTraits<A2>::ForwardType a2,
typename internal::CallbackParamTraits<A3>::ForwardType a3,
typename internal::CallbackParamTraits<A4>::ForwardType a4,
typename internal::CallbackParamTraits<A5>::ForwardType a5,
typename internal::CallbackParamTraits<A6>::ForwardType a6) {
typename internal::CallbackListBase<CallbackType>::Iterator it =
void Notify(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,
typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,
typename cef_internal::CallbackParamTraits<A3>::ForwardType a3,
typename cef_internal::CallbackParamTraits<A4>::ForwardType a4,
typename cef_internal::CallbackParamTraits<A5>::ForwardType a5,
typename cef_internal::CallbackParamTraits<A6>::ForwardType a6) {
typename cef_internal::CallbackListBase<CallbackType>::Iterator it =
this->GetIterator();
CallbackType* cb;
while ((cb = it.GetNext()) != NULL) {
@ -411,21 +411,21 @@ class CallbackList<void(A1, A2, A3, A4, A5, A6)>
template <typename A1, typename A2, typename A3, typename A4, typename A5,
typename A6, typename A7>
class CallbackList<void(A1, A2, A3, A4, A5, A6, A7)>
: public internal::CallbackListBase<Callback<void(A1, A2, A3, A4, A5, A6,
: public cef_internal::CallbackListBase<Callback<void(A1, A2, A3, A4, A5, A6,
A7)> > {
public:
typedef Callback<void(A1, A2, A3, A4, A5, A6, A7)> CallbackType;
CallbackList() {}
void Notify(typename internal::CallbackParamTraits<A1>::ForwardType a1,
typename internal::CallbackParamTraits<A2>::ForwardType a2,
typename internal::CallbackParamTraits<A3>::ForwardType a3,
typename internal::CallbackParamTraits<A4>::ForwardType a4,
typename internal::CallbackParamTraits<A5>::ForwardType a5,
typename internal::CallbackParamTraits<A6>::ForwardType a6,
typename internal::CallbackParamTraits<A7>::ForwardType a7) {
typename internal::CallbackListBase<CallbackType>::Iterator it =
void Notify(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1,
typename cef_internal::CallbackParamTraits<A2>::ForwardType a2,
typename cef_internal::CallbackParamTraits<A3>::ForwardType a3,
typename cef_internal::CallbackParamTraits<A4>::ForwardType a4,
typename cef_internal::CallbackParamTraits<A5>::ForwardType a5,
typename cef_internal::CallbackParamTraits<A6>::ForwardType a6,
typename cef_internal::CallbackParamTraits<A7>::ForwardType a7) {
typename cef_internal::CallbackListBase<CallbackType>::Iterator it =
this->GetIterator();
CallbackType* cb;
while ((cb = it.GetNext()) != NULL) {

View File

@ -113,7 +113,7 @@ class Lock {
#endif // NDEBUG
// Platform specific underlying lock implementation.
internal::LockImpl lock_;
cef_internal::LockImpl lock_;
DISALLOW_COPY_AND_ASSIGN(Lock);
};

View File

@ -215,7 +215,7 @@ struct FreeDeleter {
}
};
namespace internal {
namespace cef_internal {
template <typename T> struct IsNotRefCounted {
enum {
@ -327,7 +327,7 @@ class scoped_ptr_impl {
DISALLOW_COPY_AND_ASSIGN(scoped_ptr_impl);
};
} // namespace internal
} // namespace cef_internal
} // namespace base
@ -351,7 +351,7 @@ template <class T, class D = base::DefaultDeleter<T> >
class scoped_ptr {
MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr, RValue)
COMPILE_ASSERT(base::internal::IsNotRefCounted<T>::value,
COMPILE_ASSERT(base::cef_internal::IsNotRefCounted<T>::value,
T_is_refcounted_type_and_needs_scoped_refptr);
public:
@ -431,7 +431,7 @@ class scoped_ptr {
// scoped_ptr2" will compile but do the wrong thing (i.e., convert
// to Testable and then do the comparison).
private:
typedef base::internal::scoped_ptr_impl<element_type, deleter_type>
typedef base::cef_internal::scoped_ptr_impl<element_type, deleter_type>
scoped_ptr::*Testable;
public:
@ -471,7 +471,7 @@ class scoped_ptr {
private:
// Needed to reach into |impl_| in the constructor.
template <typename U, typename V> friend class scoped_ptr;
base::internal::scoped_ptr_impl<element_type, deleter_type> impl_;
base::cef_internal::scoped_ptr_impl<element_type, deleter_type> impl_;
// Forbidden for API compatibility with std::unique_ptr.
explicit scoped_ptr(int disallow_construction_from_null);
@ -541,7 +541,7 @@ class scoped_ptr<T[], D> {
// Allow scoped_ptr<element_type> to be used in boolean expressions, but not
// implicitly convertible to a real bool (which is dangerous).
private:
typedef base::internal::scoped_ptr_impl<element_type, deleter_type>
typedef base::cef_internal::scoped_ptr_impl<element_type, deleter_type>
scoped_ptr::*Testable;
public:
@ -572,7 +572,7 @@ class scoped_ptr<T[], D> {
enum { type_must_be_complete = sizeof(element_type) };
// Actually hold the data.
base::internal::scoped_ptr_impl<element_type, deleter_type> impl_;
base::cef_internal::scoped_ptr_impl<element_type, deleter_type> impl_;
// Disable initialization from any type other than element_type*, by
// providing a constructor that matches such an initialization, but is

View File

@ -118,7 +118,7 @@ template <class T> struct is_const<const T> : true_type {};
template <class T> struct is_void : false_type {};
template <> struct is_void<void> : true_type {};
namespace internal {
namespace cef_internal {
// Types YesType and NoType are guaranteed such that sizeof(YesType) <
// sizeof(NoType).
@ -158,7 +158,7 @@ struct IsClassHelper {
static NoType Test(...);
};
} // namespace internal
} // namespace cef_internal
// Inherits from true_type if From is convertible to To, false_type otherwise.
//
@ -167,16 +167,16 @@ struct IsClassHelper {
template <typename From, typename To>
struct is_convertible
: integral_constant<bool,
sizeof(internal::ConvertHelper::Test<To>(
internal::ConvertHelper::Create<From>())) ==
sizeof(internal::YesType)> {
sizeof(cef_internal::ConvertHelper::Test<To>(
cef_internal::ConvertHelper::Create<From>())) ==
sizeof(cef_internal::YesType)> {
};
template <typename T>
struct is_class
: integral_constant<bool,
sizeof(internal::IsClassHelper::Test<T>(0)) ==
sizeof(internal::YesType)> {
sizeof(cef_internal::IsClassHelper::Test<T>(0)) ==
sizeof(cef_internal::YesType)> {
};
template<bool B, class T = void>

View File

@ -580,86 +580,86 @@ inline void DispatchToMethod(ObjT* obj, Method method, const Tuple0& arg) {
template <class ObjT, class Method, class A>
inline void DispatchToMethod(ObjT* obj, Method method, const A& arg) {
(obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg));
(obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg));
}
template <class ObjT, class Method, class A>
inline void DispatchToMethod(ObjT* obj, Method method, const Tuple1<A>& arg) {
(obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a));
(obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a));
}
template<class ObjT, class Method, class A, class B>
inline void DispatchToMethod(ObjT* obj,
Method method,
const Tuple2<A, B>& arg) {
(obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b));
(obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b));
}
template<class ObjT, class Method, class A, class B, class C>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple3<A, B, C>& arg) {
(obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b),
base::internal::UnwrapTraits<C>::Unwrap(arg.c));
(obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c));
}
template<class ObjT, class Method, class A, class B, class C, class D>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple4<A, B, C, D>& arg) {
(obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b),
base::internal::UnwrapTraits<C>::Unwrap(arg.c),
base::internal::UnwrapTraits<D>::Unwrap(arg.d));
(obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d));
}
template<class ObjT, class Method, class A, class B, class C, class D, class E>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple5<A, B, C, D, E>& arg) {
(obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b),
base::internal::UnwrapTraits<C>::Unwrap(arg.c),
base::internal::UnwrapTraits<D>::Unwrap(arg.d),
base::internal::UnwrapTraits<E>::Unwrap(arg.e));
(obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e));
}
template<class ObjT, class Method, class A, class B, class C, class D, class E,
class F>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple6<A, B, C, D, E, F>& arg) {
(obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b),
base::internal::UnwrapTraits<C>::Unwrap(arg.c),
base::internal::UnwrapTraits<D>::Unwrap(arg.d),
base::internal::UnwrapTraits<E>::Unwrap(arg.e),
base::internal::UnwrapTraits<F>::Unwrap(arg.f));
(obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),
base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f));
}
template<class ObjT, class Method, class A, class B, class C, class D, class E,
class F, class G>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple7<A, B, C, D, E, F, G>& arg) {
(obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b),
base::internal::UnwrapTraits<C>::Unwrap(arg.c),
base::internal::UnwrapTraits<D>::Unwrap(arg.d),
base::internal::UnwrapTraits<E>::Unwrap(arg.e),
base::internal::UnwrapTraits<F>::Unwrap(arg.f),
base::internal::UnwrapTraits<G>::Unwrap(arg.g));
(obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),
base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f),
base::cef_internal::UnwrapTraits<G>::Unwrap(arg.g));
}
template<class ObjT, class Method, class A, class B, class C, class D, class E,
class F, class G, class H>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple8<A, B, C, D, E, F, G, H>& arg) {
(obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b),
base::internal::UnwrapTraits<C>::Unwrap(arg.c),
base::internal::UnwrapTraits<D>::Unwrap(arg.d),
base::internal::UnwrapTraits<E>::Unwrap(arg.e),
base::internal::UnwrapTraits<F>::Unwrap(arg.f),
base::internal::UnwrapTraits<G>::Unwrap(arg.g),
base::internal::UnwrapTraits<H>::Unwrap(arg.h));
(obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),
base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f),
base::cef_internal::UnwrapTraits<G>::Unwrap(arg.g),
base::cef_internal::UnwrapTraits<H>::Unwrap(arg.h));
}
// Static Dispatchers with no out params.
@ -676,77 +676,77 @@ inline void DispatchToFunction(Function function, const A& arg) {
template <class Function, class A>
inline void DispatchToFunction(Function function, const Tuple1<A>& arg) {
(*function)(base::internal::UnwrapTraits<A>::Unwrap(arg.a));
(*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a));
}
template<class Function, class A, class B>
inline void DispatchToFunction(Function function, const Tuple2<A, B>& arg) {
(*function)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b));
(*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b));
}
template<class Function, class A, class B, class C>
inline void DispatchToFunction(Function function, const Tuple3<A, B, C>& arg) {
(*function)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b),
base::internal::UnwrapTraits<C>::Unwrap(arg.c));
(*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c));
}
template<class Function, class A, class B, class C, class D>
inline void DispatchToFunction(Function function,
const Tuple4<A, B, C, D>& arg) {
(*function)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b),
base::internal::UnwrapTraits<C>::Unwrap(arg.c),
base::internal::UnwrapTraits<D>::Unwrap(arg.d));
(*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d));
}
template<class Function, class A, class B, class C, class D, class E>
inline void DispatchToFunction(Function function,
const Tuple5<A, B, C, D, E>& arg) {
(*function)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b),
base::internal::UnwrapTraits<C>::Unwrap(arg.c),
base::internal::UnwrapTraits<D>::Unwrap(arg.d),
base::internal::UnwrapTraits<E>::Unwrap(arg.e));
(*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e));
}
template<class Function, class A, class B, class C, class D, class E, class F>
inline void DispatchToFunction(Function function,
const Tuple6<A, B, C, D, E, F>& arg) {
(*function)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b),
base::internal::UnwrapTraits<C>::Unwrap(arg.c),
base::internal::UnwrapTraits<D>::Unwrap(arg.d),
base::internal::UnwrapTraits<E>::Unwrap(arg.e),
base::internal::UnwrapTraits<F>::Unwrap(arg.f));
(*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),
base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f));
}
template<class Function, class A, class B, class C, class D, class E, class F,
class G>
inline void DispatchToFunction(Function function,
const Tuple7<A, B, C, D, E, F, G>& arg) {
(*function)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b),
base::internal::UnwrapTraits<C>::Unwrap(arg.c),
base::internal::UnwrapTraits<D>::Unwrap(arg.d),
base::internal::UnwrapTraits<E>::Unwrap(arg.e),
base::internal::UnwrapTraits<F>::Unwrap(arg.f),
base::internal::UnwrapTraits<G>::Unwrap(arg.g));
(*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),
base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f),
base::cef_internal::UnwrapTraits<G>::Unwrap(arg.g));
}
template<class Function, class A, class B, class C, class D, class E, class F,
class G, class H>
inline void DispatchToFunction(Function function,
const Tuple8<A, B, C, D, E, F, G, H>& arg) {
(*function)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b),
base::internal::UnwrapTraits<C>::Unwrap(arg.c),
base::internal::UnwrapTraits<D>::Unwrap(arg.d),
base::internal::UnwrapTraits<E>::Unwrap(arg.e),
base::internal::UnwrapTraits<F>::Unwrap(arg.f),
base::internal::UnwrapTraits<G>::Unwrap(arg.g),
base::internal::UnwrapTraits<H>::Unwrap(arg.h));
(*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),
base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f),
base::cef_internal::UnwrapTraits<G>::Unwrap(arg.g),
base::cef_internal::UnwrapTraits<H>::Unwrap(arg.h));
}
// Dispatchers with 0 out param (as a Tuple0).
@ -760,61 +760,61 @@ inline void DispatchToMethod(ObjT* obj,
template <class ObjT, class Method, class A>
inline void DispatchToMethod(ObjT* obj, Method method, const A& arg, Tuple0*) {
(obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg));
(obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg));
}
template <class ObjT, class Method, class A>
inline void DispatchToMethod(ObjT* obj,
Method method,
const Tuple1<A>& arg, Tuple0*) {
(obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a));
(obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a));
}
template<class ObjT, class Method, class A, class B>
inline void DispatchToMethod(ObjT* obj,
Method method,
const Tuple2<A, B>& arg, Tuple0*) {
(obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b));
(obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b));
}
template<class ObjT, class Method, class A, class B, class C>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple3<A, B, C>& arg, Tuple0*) {
(obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b),
base::internal::UnwrapTraits<C>::Unwrap(arg.c));
(obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c));
}
template<class ObjT, class Method, class A, class B, class C, class D>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple4<A, B, C, D>& arg, Tuple0*) {
(obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b),
base::internal::UnwrapTraits<C>::Unwrap(arg.c),
base::internal::UnwrapTraits<D>::Unwrap(arg.d));
(obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d));
}
template<class ObjT, class Method, class A, class B, class C, class D, class E>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple5<A, B, C, D, E>& arg, Tuple0*) {
(obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b),
base::internal::UnwrapTraits<C>::Unwrap(arg.c),
base::internal::UnwrapTraits<D>::Unwrap(arg.d),
base::internal::UnwrapTraits<E>::Unwrap(arg.e));
(obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e));
}
template<class ObjT, class Method, class A, class B, class C, class D, class E,
class F>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple6<A, B, C, D, E, F>& arg, Tuple0*) {
(obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
base::internal::UnwrapTraits<B>::Unwrap(arg.b),
base::internal::UnwrapTraits<C>::Unwrap(arg.c),
base::internal::UnwrapTraits<D>::Unwrap(arg.d),
base::internal::UnwrapTraits<E>::Unwrap(arg.e),
base::internal::UnwrapTraits<F>::Unwrap(arg.f));
(obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),
base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f));
}
// Dispatchers with 1 out param.
@ -840,7 +840,7 @@ template<class ObjT, class Method, class InA,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple1<InA>& in,
Tuple1<OutA>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a), &out->a);
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a), &out->a);
}
template<class ObjT, class Method, class InA, class InB,
@ -848,8 +848,8 @@ template<class ObjT, class Method, class InA, class InB,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple2<InA, InB>& in,
Tuple1<OutA>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
&out->a);
}
@ -858,9 +858,9 @@ template<class ObjT, class Method, class InA, class InB, class InC,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple3<InA, InB, InC>& in,
Tuple1<OutA>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
&out->a);
}
@ -869,10 +869,10 @@ template<class ObjT, class Method, class InA, class InB, class InC, class InD,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple4<InA, InB, InC, InD>& in,
Tuple1<OutA>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
base::internal::UnwrapTraits<InD>::Unwrap(in.d),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
&out->a);
}
@ -881,11 +881,11 @@ template<class ObjT, class Method, class InA, class InB, class InC, class InD,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple5<InA, InB, InC, InD, InE>& in,
Tuple1<OutA>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
base::internal::UnwrapTraits<InD>::Unwrap(in.d),
base::internal::UnwrapTraits<InE>::Unwrap(in.e),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
&out->a);
}
@ -895,12 +895,12 @@ template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple6<InA, InB, InC, InD, InE, InF>& in,
Tuple1<OutA>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
base::internal::UnwrapTraits<InD>::Unwrap(in.d),
base::internal::UnwrapTraits<InE>::Unwrap(in.e),
base::internal::UnwrapTraits<InF>::Unwrap(in.f),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
base::cef_internal::UnwrapTraits<InF>::Unwrap(in.f),
&out->a);
}
@ -928,7 +928,7 @@ inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple1<InA>& in,
Tuple2<OutA, OutB>* out) {
(obj->*method)(
base::internal::UnwrapTraits<InA>::Unwrap(in.a), &out->a, &out->b);
base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a), &out->a, &out->b);
}
template<class ObjT, class Method, class InA, class InB,
@ -936,8 +936,8 @@ template<class ObjT, class Method, class InA, class InB,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple2<InA, InB>& in,
Tuple2<OutA, OutB>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
&out->a,
&out->b);
}
@ -947,9 +947,9 @@ template<class ObjT, class Method, class InA, class InB, class InC,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple3<InA, InB, InC>& in,
Tuple2<OutA, OutB>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
&out->a,
&out->b);
}
@ -959,10 +959,10 @@ template<class ObjT, class Method, class InA, class InB, class InC, class InD,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple4<InA, InB, InC, InD>& in,
Tuple2<OutA, OutB>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
base::internal::UnwrapTraits<InD>::Unwrap(in.d),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
&out->a,
&out->b);
}
@ -973,11 +973,11 @@ template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple5<InA, InB, InC, InD, InE>& in,
Tuple2<OutA, OutB>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
base::internal::UnwrapTraits<InD>::Unwrap(in.d),
base::internal::UnwrapTraits<InE>::Unwrap(in.e),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
&out->a,
&out->b);
}
@ -988,12 +988,12 @@ template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple6<InA, InB, InC, InD, InE, InF>& in,
Tuple2<OutA, OutB>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
base::internal::UnwrapTraits<InD>::Unwrap(in.d),
base::internal::UnwrapTraits<InE>::Unwrap(in.e),
base::internal::UnwrapTraits<InF>::Unwrap(in.f),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
base::cef_internal::UnwrapTraits<InF>::Unwrap(in.f),
&out->a,
&out->b);
}
@ -1021,7 +1021,7 @@ template<class ObjT, class Method, class InA,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple1<InA>& in,
Tuple3<OutA, OutB, OutC>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
&out->a,
&out->b,
&out->c);
@ -1032,8 +1032,8 @@ template<class ObjT, class Method, class InA, class InB,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple2<InA, InB>& in,
Tuple3<OutA, OutB, OutC>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
&out->a,
&out->b,
&out->c);
@ -1044,9 +1044,9 @@ template<class ObjT, class Method, class InA, class InB, class InC,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple3<InA, InB, InC>& in,
Tuple3<OutA, OutB, OutC>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
&out->a,
&out->b,
&out->c);
@ -1057,10 +1057,10 @@ template<class ObjT, class Method, class InA, class InB, class InC, class InD,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple4<InA, InB, InC, InD>& in,
Tuple3<OutA, OutB, OutC>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
base::internal::UnwrapTraits<InD>::Unwrap(in.d),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
&out->a,
&out->b,
&out->c);
@ -1072,11 +1072,11 @@ template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple5<InA, InB, InC, InD, InE>& in,
Tuple3<OutA, OutB, OutC>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
base::internal::UnwrapTraits<InD>::Unwrap(in.d),
base::internal::UnwrapTraits<InE>::Unwrap(in.e),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
&out->a,
&out->b,
&out->c);
@ -1088,12 +1088,12 @@ template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple6<InA, InB, InC, InD, InE, InF>& in,
Tuple3<OutA, OutB, OutC>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
base::internal::UnwrapTraits<InD>::Unwrap(in.d),
base::internal::UnwrapTraits<InE>::Unwrap(in.e),
base::internal::UnwrapTraits<InF>::Unwrap(in.f),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
base::cef_internal::UnwrapTraits<InF>::Unwrap(in.f),
&out->a,
&out->b,
&out->c);
@ -1114,7 +1114,7 @@ template<class ObjT, class Method, class InA,
inline void DispatchToMethod(ObjT* obj, Method method,
const InA& in,
Tuple4<OutA, OutB, OutC, OutD>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in),
&out->a,
&out->b,
&out->c,
@ -1126,7 +1126,7 @@ template<class ObjT, class Method, class InA,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple1<InA>& in,
Tuple4<OutA, OutB, OutC, OutD>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
&out->a,
&out->b,
&out->c,
@ -1138,8 +1138,8 @@ template<class ObjT, class Method, class InA, class InB,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple2<InA, InB>& in,
Tuple4<OutA, OutB, OutC, OutD>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
&out->a,
&out->b,
&out->c,
@ -1151,9 +1151,9 @@ template<class ObjT, class Method, class InA, class InB, class InC,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple3<InA, InB, InC>& in,
Tuple4<OutA, OutB, OutC, OutD>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
&out->a,
&out->b,
&out->c,
@ -1165,10 +1165,10 @@ template<class ObjT, class Method, class InA, class InB, class InC, class InD,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple4<InA, InB, InC, InD>& in,
Tuple4<OutA, OutB, OutC, OutD>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
base::internal::UnwrapTraits<InD>::Unwrap(in.d),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
&out->a,
&out->b,
&out->c,
@ -1181,11 +1181,11 @@ template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple5<InA, InB, InC, InD, InE>& in,
Tuple4<OutA, OutB, OutC, OutD>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
base::internal::UnwrapTraits<InD>::Unwrap(in.d),
base::internal::UnwrapTraits<InE>::Unwrap(in.e),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
&out->a,
&out->b,
&out->c,
@ -1198,12 +1198,12 @@ template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple6<InA, InB, InC, InD, InE, InF>& in,
Tuple4<OutA, OutB, OutC, OutD>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
base::internal::UnwrapTraits<InD>::Unwrap(in.d),
base::internal::UnwrapTraits<InE>::Unwrap(in.e),
base::internal::UnwrapTraits<InF>::Unwrap(in.f),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
base::cef_internal::UnwrapTraits<InF>::Unwrap(in.f),
&out->a,
&out->b,
&out->c,
@ -1225,7 +1225,7 @@ template<class ObjT, class Method, class InA,
inline void DispatchToMethod(ObjT* obj, Method method,
const InA& in,
Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in),
&out->a,
&out->b,
&out->c,
@ -1238,7 +1238,7 @@ template<class ObjT, class Method, class InA,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple1<InA>& in,
Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
&out->a,
&out->b,
&out->c,
@ -1251,8 +1251,8 @@ template<class ObjT, class Method, class InA, class InB,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple2<InA, InB>& in,
Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
&out->a,
&out->b,
&out->c,
@ -1265,9 +1265,9 @@ template<class ObjT, class Method, class InA, class InB, class InC,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple3<InA, InB, InC>& in,
Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
&out->a,
&out->b,
&out->c,
@ -1280,10 +1280,10 @@ template<class ObjT, class Method, class InA, class InB, class InC, class InD,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple4<InA, InB, InC, InD>& in,
Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
base::internal::UnwrapTraits<InD>::Unwrap(in.d),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
&out->a,
&out->b,
&out->c,
@ -1297,11 +1297,11 @@ template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple5<InA, InB, InC, InD, InE>& in,
Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
base::internal::UnwrapTraits<InD>::Unwrap(in.d),
base::internal::UnwrapTraits<InE>::Unwrap(in.e),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
&out->a,
&out->b,
&out->c,
@ -1315,12 +1315,12 @@ template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple6<InA, InB, InC, InD, InE, InF>& in,
Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
(obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
base::internal::UnwrapTraits<InB>::Unwrap(in.b),
base::internal::UnwrapTraits<InC>::Unwrap(in.c),
base::internal::UnwrapTraits<InD>::Unwrap(in.d),
base::internal::UnwrapTraits<InE>::Unwrap(in.e),
base::internal::UnwrapTraits<InF>::Unwrap(in.f),
(obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
base::cef_internal::UnwrapTraits<InF>::Unwrap(in.f),
&out->a,
&out->b,
&out->c,

View File

@ -114,7 +114,7 @@ namespace base {
template <typename T> class SupportsWeakPtr;
template <typename T> class WeakPtr;
namespace internal {
namespace cef_internal {
// These classes are part of the WeakPtr implementation.
// DO NOT USE THESE CLASSES DIRECTLY YOURSELF.
@ -195,7 +195,7 @@ class SupportsWeakPtrBase {
template<typename Derived>
static WeakPtr<Derived> StaticAsWeakPtr(Derived* t) {
typedef
is_convertible<Derived, internal::SupportsWeakPtrBase&> convertible;
is_convertible<Derived, cef_internal::SupportsWeakPtrBase&> convertible;
COMPILE_ASSERT(convertible::value,
AsWeakPtr_argument_inherits_from_SupportsWeakPtr);
return AsWeakPtrImpl<Derived>(t, *t);
@ -213,7 +213,7 @@ class SupportsWeakPtrBase {
}
};
} // namespace internal
} // namespace cef_internal
template <typename T> class WeakPtrFactory;
@ -231,7 +231,7 @@ template <typename T> class WeakPtrFactory;
// foo->method();
//
template <typename T>
class WeakPtr : public internal::WeakPtrBase {
class WeakPtr : public cef_internal::WeakPtrBase {
public:
WeakPtr() : ptr_(NULL) {
}
@ -267,7 +267,7 @@ class WeakPtr : public internal::WeakPtrBase {
operator Testable() const { return get() ? &WeakPtr::ptr_ : NULL; }
void reset() {
ref_ = internal::WeakReference();
ref_ = cef_internal::WeakReference();
ptr_ = NULL;
}
@ -277,12 +277,12 @@ class WeakPtr : public internal::WeakPtrBase {
template <class U> bool operator==(WeakPtr<U> const&) const;
template <class U> bool operator!=(WeakPtr<U> const&) const;
friend class internal::SupportsWeakPtrBase;
friend class cef_internal::SupportsWeakPtrBase;
template <typename U> friend class WeakPtr;
friend class SupportsWeakPtr<T>;
friend class WeakPtrFactory<T>;
WeakPtr(const internal::WeakReference& ref, T* ptr)
WeakPtr(const cef_internal::WeakReference& ref, T* ptr)
: WeakPtrBase(ref),
ptr_(ptr) {
}
@ -325,7 +325,7 @@ class WeakPtrFactory {
}
private:
internal::WeakReferenceOwner weak_reference_owner_;
cef_internal::WeakReferenceOwner weak_reference_owner_;
T* ptr_;
DISALLOW_IMPLICIT_CONSTRUCTORS(WeakPtrFactory);
};
@ -336,7 +336,7 @@ class WeakPtrFactory {
// weak pointers to the class until after the derived class' members have been
// destroyed, its use can lead to subtle use-after-destroy issues.
template <class T>
class SupportsWeakPtr : public internal::SupportsWeakPtrBase {
class SupportsWeakPtr : public cef_internal::SupportsWeakPtrBase {
public:
SupportsWeakPtr() {}
@ -348,7 +348,7 @@ class SupportsWeakPtr : public internal::SupportsWeakPtrBase {
~SupportsWeakPtr() {}
private:
internal::WeakReferenceOwner weak_reference_owner_;
cef_internal::WeakReferenceOwner weak_reference_owner_;
DISALLOW_COPY_AND_ASSIGN(SupportsWeakPtr);
};
@ -372,7 +372,7 @@ class SupportsWeakPtr : public internal::SupportsWeakPtrBase {
template <typename Derived>
WeakPtr<Derived> AsWeakPtr(Derived* t) {
return internal::SupportsWeakPtrBase::StaticAsWeakPtr<Derived>(t);
return cef_internal::SupportsWeakPtrBase::StaticAsWeakPtr<Derived>(t);
}
} // namespace base

View File

@ -44,7 +44,7 @@
#endif
namespace base {
namespace internal {
namespace cef_internal {
// See base/callback.h for user documentation.
//
@ -2805,7 +2805,7 @@ struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5, P6,
P7 p7_;
};
} // namespace internal
} // namespace cef_internal
} // namespace base
#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_H_

View File

@ -41,7 +41,7 @@
#if !defined(ARCH_CPU_X86_64)
namespace base {
namespace internal {
namespace cef_internal {
template <typename Functor>
class RunnableAdapter;
@ -382,7 +382,7 @@ class RunnableAdapter<R(__fastcall *)(A1, A2, A3, A4, A5, A6, A7)> {
R (__fastcall *function_)(A1, A2, A3, A4, A5, A6, A7);
};
} // namespace internal
} // namespace cef_internal
} // namespace base
#endif // !defined(ARCH_CPU_X86_64)

View File

@ -45,7 +45,7 @@ template <typename T>
class ScopedVector;
namespace base {
namespace internal {
namespace cef_internal {
// BindStateBase is used to provide an opaque handle that the Callback
// class can use to represent a function object with bound arguments. It
@ -199,7 +199,7 @@ typename enable_if<IsMoveOnlyType<T>::value, T>::type CallbackForward(T& t) {
return t.Pass();
}
} // namespace internal
} // namespace cef_internal
} // namespace base
#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_CALLBACK_INTERNAL_H_

View File

@ -43,7 +43,7 @@
#include "include/base/cef_macros.h"
namespace base {
namespace internal {
namespace cef_internal {
// This class implements the underlying platform-specific spin-lock mechanism
// used for the Lock class. Most users should not use LockImpl directly, but
@ -81,7 +81,7 @@ class LockImpl {
DISALLOW_COPY_AND_ASSIGN(LockImpl);
};
} // namespace internal
} // namespace cef_internal
} // namespace base
#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_LOCK_IMPL_H_

View File

@ -46,7 +46,7 @@
namespace base {
namespace internal {
namespace cef_internal {
template <typename T>
struct NeedsScopedRefptrButGetsRawPtr {
@ -147,7 +147,7 @@ struct ParamsUseScopedRefptrCorrectly<Tuple8<A, B, C, D, E, F, G, H> > {
NeedsScopedRefptrButGetsRawPtr<H>::value) };
};
} // namespace internal
} // namespace cef_internal
} // namespace base

View File

@ -127,24 +127,12 @@ typedef struct _cef_domdocument_t {
///
int (CEF_CALLBACK *has_selection)(struct _cef_domdocument_t* self);
///
// Returns the selection start node.
///
struct _cef_domnode_t* (CEF_CALLBACK *get_selection_start_node)(
struct _cef_domdocument_t* self);
///
// Returns the selection offset within the start node.
///
int (CEF_CALLBACK *get_selection_start_offset)(
struct _cef_domdocument_t* self);
///
// Returns the selection end node.
///
struct _cef_domnode_t* (CEF_CALLBACK *get_selection_end_node)(
struct _cef_domdocument_t* self);
///
// Returns the selection offset within the end node.
///

View File

@ -120,24 +120,12 @@ class CefDOMDocument : public virtual CefBase {
/*--cef()--*/
virtual bool HasSelection() =0;
///
// Returns the selection start node.
///
/*--cef()--*/
virtual CefRefPtr<CefDOMNode> GetSelectionStartNode() =0;
///
// Returns the selection offset within the start node.
///
/*--cef()--*/
virtual int GetSelectionStartOffset() =0;
///
// Returns the selection end node.
///
/*--cef()--*/
virtual CefRefPtr<CefDOMNode> GetSelectionEndNode() =0;
///
// Returns the selection offset within the end node.
///

View File

@ -49,6 +49,8 @@ class CefBrowserContextImpl::CefResourceContext : public content::ResourceContex
CefBrowserContextImpl::CefBrowserContextImpl()
: resource_context_(new CefResourceContext) {
BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices(
this);
}
CefBrowserContextImpl::~CefBrowserContextImpl() {
@ -71,6 +73,11 @@ base::FilePath CefBrowserContextImpl::GetPath() const {
return CefContext::Get()->cache_path();
}
scoped_ptr<content::ZoomLevelDelegate>
CefBrowserContextImpl::CreateZoomLevelDelegate(const base::FilePath&) {
return scoped_ptr<content::ZoomLevelDelegate>();
}
bool CefBrowserContextImpl::IsOffTheRecord() const {
return false;
}

View File

@ -27,6 +27,8 @@ class CefBrowserContextImpl : public CefBrowserContext {
// BrowserContext methods.
base::FilePath GetPath() const override;
scoped_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(
const base::FilePath& partition_path) override;
bool IsOffTheRecord() const override;
content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
net::URLRequestContextGetter* GetRequestContext() override;

View File

@ -52,6 +52,8 @@ CefBrowserContextProxy::CefBrowserContextProxy(
handler_(handler),
parent_(parent),
resource_context_(new CefResourceContext) {
BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices(
this);
}
CefBrowserContextProxy::~CefBrowserContextProxy() {
@ -69,6 +71,12 @@ base::FilePath CefBrowserContextProxy::GetPath() const {
return parent_->GetPath();
}
scoped_ptr<content::ZoomLevelDelegate>
CefBrowserContextProxy::CreateZoomLevelDelegate(
const base::FilePath& partition_path) {
return parent_->CreateZoomLevelDelegate(partition_path);
}
bool CefBrowserContextProxy::IsOffTheRecord() const {
return parent_->IsOffTheRecord();
}

View File

@ -35,6 +35,8 @@ class CefBrowserContextProxy : public CefBrowserContext {
// BrowserContext methods.
base::FilePath GetPath() const override;
scoped_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(
const base::FilePath& partition_path) override;
bool IsOffTheRecord() const override;
content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
net::URLRequestContextGetter* GetRequestContext() override;

View File

@ -2256,7 +2256,8 @@ void CefBrowserHostImpl::DidNavigateMainFramePostCommit(
}
content::JavaScriptDialogManager*
CefBrowserHostImpl::GetJavaScriptDialogManager() {
CefBrowserHostImpl::GetJavaScriptDialogManager(
content::WebContents* source) {
if (!dialog_manager_.get())
dialog_manager_.reset(new CefJavaScriptDialogManager(this));
return dialog_manager_.get();

View File

@ -383,7 +383,8 @@ class CefBrowserHostImpl : public CefBrowserHost,
content::WebContents* new_contents) override;
void DidNavigateMainFramePostCommit(
content::WebContents* tab) override;
content::JavaScriptDialogManager* GetJavaScriptDialogManager() override;
content::JavaScriptDialogManager* GetJavaScriptDialogManager(
content::WebContents* source) override;
void RunFileChooser(
content::WebContents* tab,
const content::FileChooserParams& params) override;

View File

@ -199,7 +199,7 @@ std::wstring GetFilterStringFromAcceptTypes(
if (ascii_type.length()) {
// Just treat as extension if contains '.' as the first character.
if (ascii_type[0] == '.') {
extensions.push_back(L"*" + base::ASCIIToWide(ascii_type));
extensions.push_back(L"*" + base::ASCIIToUTF16(ascii_type));
descriptions.push_back(std::wstring());
} else {
// Otherwise convert mime type to one or more extensions.
@ -398,7 +398,7 @@ const int kMaxAddressLengthChars = 2048;
bool HasExternalHandler(const std::string& scheme) {
base::win::RegKey key;
const std::wstring registry_path =
base::ASCIIToWide(scheme + "\\shell\\open\\command");
base::ASCIIToUTF16(scheme + "\\shell\\open\\command");
key.Open(HKEY_CLASSES_ROOT, registry_path.c_str(), KEY_READ);
if (key.Valid()) {
DWORD size = 0;

View File

@ -47,7 +47,8 @@
CefBrowserMainParts::CefBrowserMainParts(
const content::MainFunctionParams& parameters)
: BrowserMainParts() {
: BrowserMainParts(),
devtools_delegate_(NULL) {
}
CefBrowserMainParts::~CefBrowserMainParts() {
@ -145,7 +146,8 @@ void CefBrowserMainParts::PreMainMessageLoopRun() {
command_line.GetSwitchValueASCII(switches::kRemoteDebuggingPort);
int port;
if (base::StringToInt(port_str, &port) && port > 0 && port < 65535) {
devtools_delegate_.reset(new CefDevToolsDelegate(port));
devtools_delegate_ =
new CefDevToolsDelegate(static_cast<uint16>(port));
} else {
LOG(WARNING) << "Invalid http debugger port number " << port;
}
@ -155,8 +157,10 @@ void CefBrowserMainParts::PreMainMessageLoopRun() {
}
void CefBrowserMainParts::PostMainMessageLoopRun() {
if (devtools_delegate_)
if (devtools_delegate_) {
devtools_delegate_->Stop();
devtools_delegate_ = NULL;
}
pref_proxy_config_tracker_->DetachFromPrefService();
// Only the global browser context should still exist.

View File

@ -51,7 +51,7 @@ class CefBrowserMainParts : public content::BrowserMainParts {
return global_request_context_;
}
CefDevToolsDelegate* devtools_delegate() const {
return devtools_delegate_.get();
return devtools_delegate_;
}
PrefService* pref_service() const { return pref_service_.get(); }
scoped_ptr<net::ProxyConfigService> proxy_config_service() {
@ -68,7 +68,7 @@ class CefBrowserMainParts : public content::BrowserMainParts {
scoped_ptr<CefBrowserContext> global_browser_context_;
scoped_refptr<net::URLRequestContextGetter> global_request_context_;
ScopedVector<CefBrowserContext> browser_contexts_;
scoped_ptr<CefDevToolsDelegate> devtools_delegate_;
CefDevToolsDelegate* devtools_delegate_; // Deletes itself.
scoped_ptr<base::MessageLoop> message_loop_;
scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
scoped_ptr<net::ProxyConfigService> proxy_config_service_;

View File

@ -122,7 +122,7 @@ GpuModeManager* ChromeBrowserProcessStub::gpu_mode_manager() {
void ChromeBrowserProcessStub::CreateDevToolsHttpProtocolHandler(
chrome::HostDesktopType host_desktop_type,
const std::string& ip,
int port) {
uint16 port) {
}
unsigned int ChromeBrowserProcessStub::AddRefModule() {

View File

@ -53,7 +53,7 @@ class ChromeBrowserProcessStub : public BrowserProcess {
void CreateDevToolsHttpProtocolHandler(
chrome::HostDesktopType host_desktop_type,
const std::string& ip,
int port) override;
uint16 port) override;
unsigned int AddRefModule() override;
unsigned int ReleaseModule() override;
bool IsShuttingDown() override;

View File

@ -37,6 +37,7 @@
#include "content/public/browser/access_token_store.h"
#include "content/public/browser/browser_url_handler.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/geolocation_provider.h"
#include "content/public/browser/plugin_service_filter.h"
#include "content/public/browser/quota_permission_context.h"
#include "content/public/browser/render_process_host.h"
@ -190,6 +191,11 @@ class CefGeolocationCallbackImpl : public CefGeolocationCallback {
void Continue(bool allow) override {
if (CEF_CURRENTLY_ON_UIT()) {
if (!callback_.is_null()) {
if (allow) {
content::GeolocationProvider::GetInstance()->
UserDidOptIntoLocationServices();
}
callback_.Run(allow);
callback_.Reset();
}
@ -725,7 +731,7 @@ content::MediaObserver* CefContentBrowserClient::GetMediaObserver() {
}
content::SpeechRecognitionManagerDelegate*
CefContentBrowserClient::GetSpeechRecognitionManagerDelegate() {
CefContentBrowserClient::CreateSpeechRecognitionManagerDelegate() {
const base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kEnableSpeechInput))

View File

@ -102,7 +102,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
CreateQuotaPermissionContext() override;
content::MediaObserver* GetMediaObserver() override;
content::SpeechRecognitionManagerDelegate*
GetSpeechRecognitionManagerDelegate() override;
CreateSpeechRecognitionManagerDelegate() override;
void AllowCertificateError(
int render_process_id,
int render_frame_id,

View File

@ -41,7 +41,7 @@ const char kTargetTypeOther[] = "other";
class TCPServerSocketFactory
: public content::DevToolsHttpHandler::ServerSocketFactory {
public:
TCPServerSocketFactory(const std::string& address, int port, int backlog)
TCPServerSocketFactory(const std::string& address, uint16 port, int backlog)
: content::DevToolsHttpHandler::ServerSocketFactory(
address, port, backlog) {}
@ -56,7 +56,7 @@ class TCPServerSocketFactory
};
scoped_ptr<content::DevToolsHttpHandler::ServerSocketFactory>
CreateSocketFactory(int port) {
CreateSocketFactory(uint16 port) {
return scoped_ptr<content::DevToolsHttpHandler::ServerSocketFactory>(
new TCPServerSocketFactory("127.0.0.1", port, 1));
}
@ -126,20 +126,21 @@ bool Target::Close() const {
// CefDevToolsDelegate
CefDevToolsDelegate::CefDevToolsDelegate(int port) {
devtools_http_handler_ = content::DevToolsHttpHandler::Start(
CefDevToolsDelegate::CefDevToolsDelegate(uint16 port) {
devtools_http_handler_.reset(content::DevToolsHttpHandler::Start(
CreateSocketFactory(port),
std::string(),
this,
base::FilePath());
base::FilePath()));
}
CefDevToolsDelegate::~CefDevToolsDelegate() {
DCHECK(!devtools_http_handler_.get());
}
void CefDevToolsDelegate::Stop() {
// The call below destroys this.
devtools_http_handler_->Stop();
// The call below deletes |this|.
devtools_http_handler_.reset();
}
std::string CefDevToolsDelegate::GetDiscoveryPageHTML() {
@ -155,11 +156,9 @@ base::FilePath CefDevToolsDelegate::GetDebugFrontendDir() {
return base::FilePath();
}
scoped_ptr<net::StreamListenSocket>
CefDevToolsDelegate::CreateSocketForTethering(
net::StreamListenSocket::Delegate* delegate,
std::string* name) {
return scoped_ptr<net::StreamListenSocket>();
scoped_ptr<net::ServerSocket>
CefDevToolsDelegate::CreateSocketForTethering(std::string* name) {
return scoped_ptr<net::ServerSocket>();
}
std::string CefDevToolsDelegate::GetChromeDevToolsURL() {

View File

@ -23,7 +23,7 @@ class RenderViewHost;
class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
public:
explicit CefDevToolsDelegate(int port);
explicit CefDevToolsDelegate(uint16 port);
~CefDevToolsDelegate() override;
// Stops http server.
@ -33,15 +33,14 @@ class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
std::string GetDiscoveryPageHTML() override;
bool BundlesFrontendResources() override;
base::FilePath GetDebugFrontendDir() override;
scoped_ptr<net::StreamListenSocket> CreateSocketForTethering(
net::StreamListenSocket::Delegate* delegate,
scoped_ptr<net::ServerSocket> CreateSocketForTethering(
std::string* name) override;
// Returns the chrome-devtools URL.
std::string GetChromeDevToolsURL();
private:
content::DevToolsHttpHandler* devtools_http_handler_;
scoped_ptr<content::DevToolsHttpHandler> devtools_http_handler_;
DISALLOW_COPY_AND_ASSIGN(CefDevToolsDelegate);
};

View File

@ -11,6 +11,7 @@
#include "base/command_line.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/path_service.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
@ -94,16 +95,12 @@ void CefDevToolsFrontend::RenderViewCreated(
content::RenderViewHost* render_view_host) {
if (!frontend_host_) {
frontend_host_.reset(
content::DevToolsFrontendHost::Create(render_view_host, this));
content::DevToolsFrontendHost::Create(
web_contents()->GetMainFrame(), this));
agent_host_->AttachClient(this);
}
}
void CefDevToolsFrontend::DocumentOnLoadCompletedInMainFrame() {
web_contents()->GetMainFrame()->ExecuteJavaScript(
base::ASCIIToUTF16("InspectorFrontendAPI.setUseSoftMenu(true);"));
}
void CefDevToolsFrontend::WebContentsDestroyed() {
agent_host_->DetachClient();
delete this;
@ -112,30 +109,31 @@ void CefDevToolsFrontend::WebContentsDestroyed() {
void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend(
const std::string& message) {
std::string method;
std::string browser_message;
int id = 0;
base::ListValue* params = NULL;
base::DictionaryValue* dict = NULL;
scoped_ptr<base::Value> parsed_message(base::JSONReader::Read(message));
if (!parsed_message ||
!parsed_message->GetAsDictionary(&dict) ||
!dict->GetString("method", &method) ||
!dict->GetList("params", &params)) {
!dict->GetString("method", &method)) {
return;
}
dict->GetList("params", &params);
std::string browser_message;
if (method == "sendMessageToBrowser" && params &&
params->GetSize() == 1 && params->GetString(0, &browser_message)) {
agent_host_->DispatchProtocolMessage(browser_message);
} else if (method == "loadCompleted") {
web_contents()->GetMainFrame()->ExecuteJavaScript(
base::ASCIIToUTF16("DevToolsAPI.setUseSoftMenu(true);"));
} else {
return;
}
if (method != "sendMessageToBrowser" ||
params->GetSize() != 1 ||
!params->GetString(0, &browser_message)) {
return;
}
dict->GetInteger("id", &id);
agent_host_->DispatchProtocolMessage(browser_message);
if (id) {
std::string code = "InspectorFrontendAPI.embedderMessageAck(" +
std::string code = "DevToolsAPI.embedderMessageAck(" +
base::IntToString(id) + ",\"\");";
base::string16 javascript = base::UTF8ToUTF16(code);
web_contents()->GetMainFrame()->ExecuteJavaScript(javascript);
@ -150,7 +148,10 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontendToBackend(
void CefDevToolsFrontend::DispatchProtocolMessage(
content::DevToolsAgentHost* agent_host,
const std::string& message) {
std::string code = "InspectorFrontendAPI.dispatchMessage(" + message + ");";
base::StringValue message_value(message);
std::string param;
base::JSONWriter::Write(&message_value, &param);
std::string code = "DevToolsAPI.dispatchMessage(" + param + ");";
base::string16 javascript = base::UTF8ToUTF16(code);
web_contents()->GetMainFrame()->ExecuteJavaScript(javascript);
}

View File

@ -47,7 +47,6 @@ class CefDevToolsFrontend : public content::WebContentsObserver,
// WebContentsObserver overrides.
void RenderViewCreated(
content::RenderViewHost* render_view_host) override;
void DocumentOnLoadCompletedInMainFrame() override;
void WebContentsDestroyed() override;
// content::DevToolsFrontendHost::Delegate implementation.

View File

@ -163,7 +163,7 @@ void PrintViewManagerBase::OnDidPrintPage(
reinterpret_cast<const unsigned char*>(shared_buf.memory()),
params.data_size);
document->DebugDumpData(bytes, FILE_PATH_LITERAL(".pdf"));
document->DebugDumpData(bytes.get(), FILE_PATH_LITERAL(".pdf"));
print_job_->StartPdfToEmfConversion(
bytes, params.page_size, params.content_area);
}

View File

@ -18,6 +18,7 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view_frame_subscriber.h"
#include "third_party/WebKit/public/platform/WebScreenInfo.h"
#include "ui/gfx/geometry/dip_util.h"
#include "ui/gfx/geometry/size_conversions.h"
#include "ui/gfx/image/image_skia_operations.h"
@ -494,7 +495,7 @@ void CefRenderWidgetHostViewOSR::SelectionBoundsChanged(
void CefRenderWidgetHostViewOSR::CopyFromCompositingSurface(
const gfx::Rect& src_subrect,
const gfx::Size& dst_size,
const base::Callback<void(bool, const SkBitmap&)>& callback,
content::ReadbackRequestCallback& callback,
const SkColorType color_type) {
delegated_frame_host_->CopyFromCompositingSurface(
src_subrect, dst_size, callback, color_type);
@ -891,8 +892,8 @@ void CefRenderWidgetHostViewOSR::InternalGenerateFrame() {
damage_rect));
const gfx::Rect& src_subrect_in_pixel =
content::ConvertRectToPixel(CurrentDeviceScaleFactor(),
root_layer_->bounds());
gfx::ConvertRectToPixel(CurrentDeviceScaleFactor(),
root_layer_->bounds());
request->set_area(src_subrect_in_pixel);
RequestCopyOfOutput(request.Pass());
}

View File

@ -19,6 +19,7 @@
#if defined(OS_MACOSX)
#include "content/browser/compositor/browser_compositor_view_mac.h"
#include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
#endif
#if defined(OS_WIN)
@ -69,7 +70,7 @@ class CefWindowX11;
class CefRenderWidgetHostViewOSR
: public content::RenderWidgetHostViewBase,
#if defined(OS_MACOSX)
public content::BrowserCompositorViewMacClient,
public ui::AcceleratedWidgetMacNSView,
#endif
public content::DelegatedFrameHostClient {
public:
@ -142,7 +143,7 @@ class CefRenderWidgetHostViewOSR
void CopyFromCompositingSurface(
const gfx::Rect& src_subrect,
const gfx::Size& dst_size,
const base::Callback<void(bool, const SkBitmap&)>& callback,
content::ReadbackRequestCallback& callback,
const SkColorType color_type) override;
void CopyFromCompositingSurfaceToVideoFrame(
const gfx::Rect& src_subrect,
@ -186,10 +187,12 @@ class CefRenderWidgetHostViewOSR
#endif
#if defined(OS_MACOSX)
// BrowserCompositorViewMacClient implementation.
bool BrowserCompositorViewShouldAckImmediately() const override;
void BrowserCompositorViewFrameSwapped(
// AcceleratedWidgetMacNSView implementation.
NSView* AcceleratedWidgetGetNSView() const override;
bool AcceleratedWidgetShouldIgnoreBackpressure() const override;
void AcceleratedWidgetSwapCompleted(
const std::vector<ui::LatencyInfo>& latency_info) override;
void AcceleratedWidgetHitError() override;
#endif // defined(OS_MACOSX)
// DelegatedFrameHostClient implementation.
@ -318,7 +321,7 @@ class CefRenderWidgetHostViewOSR
#elif defined(OS_MACOSX)
NSWindow* window_;
CALayer* background_layer_;
scoped_ptr<content::BrowserCompositorViewMac> compositor_view_;
scoped_ptr<content::BrowserCompositorMac> browser_compositor_;
#elif defined(USE_X11)
CefWindowX11* window_;
#endif

View File

@ -10,7 +10,6 @@
#include "libcef/browser/browser_host_impl.h"
#include "libcef/browser/text_input_client_osr_mac.h"
#include "content/browser/compositor/browser_compositor_view_mac.h"
#include "ui/events/latency_info.h"
#if !defined(UNUSED)
@ -90,12 +89,16 @@ void CefRenderWidgetHostViewOSR::ImeCompositionRangeChanged(
client->composition_bounds_ = character_bounds;
}
bool CefRenderWidgetHostViewOSR::BrowserCompositorViewShouldAckImmediately()
NSView* CefRenderWidgetHostViewOSR::AcceleratedWidgetGetNSView() const {
return [window_ contentView];
}
bool CefRenderWidgetHostViewOSR::AcceleratedWidgetShouldIgnoreBackpressure()
const {
return true;
}
void CefRenderWidgetHostViewOSR::BrowserCompositorViewFrameSwapped(
void CefRenderWidgetHostViewOSR::AcceleratedWidgetSwapCompleted(
const std::vector<ui::LatencyInfo>& all_latency_info) {
if (!render_widget_host_)
return;
@ -106,6 +109,11 @@ void CefRenderWidgetHostViewOSR::BrowserCompositorViewFrameSwapped(
}
}
void CefRenderWidgetHostViewOSR::AcceleratedWidgetHitError() {
// Request a new frame be drawn.
browser_compositor_->compositor()->ScheduleFullRedraw();
}
CefTextInputContext CefRenderWidgetHostViewOSR::GetNSTextInputContext() {
if (!text_input_context_osr_mac_) {
CefTextInputClientOSRMac* text_input_client_osr_mac =
@ -288,17 +296,19 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
[content_view setLayer:background_layer_];
[content_view setWantsLayer:YES];
compositor_view_.reset(
new content::BrowserCompositorViewMac(this, content_view,
root_layer_.get()));
compositor_.reset(compositor_view_->GetCompositor());
browser_compositor_ = content::BrowserCompositorMac::Create();
compositor_.reset(browser_compositor_->compositor());
compositor_->SetRootLayer(root_layer_.get());
browser_compositor_->accelerated_widget_mac()->SetNSView(this);
browser_compositor_->compositor()->SetVisible(true);
DCHECK(compositor_);
}
void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() {
DCHECK(window_);
// Compositor is owned by and will be freed by BrowserCompositorViewMac.
// Compositor is owned by and will be freed by BrowserCompositorMac.
ui::Compositor* compositor = compositor_.release();
UNUSED(compositor);
@ -307,5 +317,9 @@ void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() {
[background_layer_ release];
background_layer_ = nil;
compositor_view_.reset(NULL);
browser_compositor_->accelerated_widget_mac()->ResetNSView();
browser_compositor_->compositor()->SetVisible(false);
browser_compositor_->compositor()->SetScaleAndSize(1.0, gfx::Size(0, 0));
browser_compositor_->compositor()->SetRootLayer(NULL);
content::BrowserCompositorMac::Recycle(browser_compositor_.Pass());
}

View File

@ -6,11 +6,11 @@
#define CEF_LIBCEF_BROWSER_URL_NETWORK_DELEGATE_H_
#pragma once
#include "net/base/network_delegate.h"
#include "net/base/network_delegate_impl.h"
// Used for intercepting resource requests, redirects and responses. The single
// instance of this class is managed by CefURLRequestContextGetter.
class CefNetworkDelegate : public net::NetworkDelegate {
class CefNetworkDelegate : public net::NetworkDelegateImpl {
public:
CefNetworkDelegate();
~CefNetworkDelegate() override;

View File

@ -231,6 +231,8 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
ftp_transaction_factory_.get());
protocol_handlers_.clear();
request_interceptors_.push_back(new CefRequestInterceptor());
// Set up interceptors in the reverse order.
scoped_ptr<net::URLRequestJobFactory> top_job_factory =
job_factory.Pass();
@ -244,8 +246,6 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
request_interceptors_.weak_clear();
storage_->set_job_factory(top_job_factory.release());
request_interceptor_.reset(new CefRequestInterceptor);
}
return url_request_context_.get();

View File

@ -32,7 +32,6 @@ class URLRequestJobFactoryImpl;
class URLSecurityManager;
}
class CefRequestInterceptor;
class CefURLRequestContextProxy;
/*
@ -112,7 +111,6 @@ class CefURLRequestContextGetter : public net::URLRequestContextGetter {
base::MessageLoop* file_loop_;
scoped_ptr<net::ProxyConfigService> proxy_config_service_;
scoped_ptr<CefRequestInterceptor> request_interceptor_;
scoped_ptr<net::URLRequestContextStorage> storage_;
scoped_ptr<net::URLRequestContext> url_request_context_;
scoped_ptr<net::URLSecurityManager> url_security_manager_;

View File

@ -11,23 +11,19 @@
#include "libcef/browser/thread_util.h"
#include "libcef/common/request_impl.h"
#include "net/url_request/url_request_job_manager.h"
#include "net/url_request/url_request_redirect_job.h"
CefRequestInterceptor::CefRequestInterceptor() {
CEF_REQUIRE_IOT();
net::URLRequestJobManager::GetInstance()->RegisterRequestInterceptor(this);
}
CefRequestInterceptor::~CefRequestInterceptor() {
CEF_REQUIRE_IOT();
net::URLRequestJobManager::GetInstance()->
UnregisterRequestInterceptor(this);
}
net::URLRequestJob* CefRequestInterceptor::MaybeIntercept(
net::URLRequestJob* CefRequestInterceptor::MaybeInterceptRequest(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) {
net::NetworkDelegate* network_delegate) const {
CefRefPtr<CefBrowserHostImpl> browser =
CefBrowserHostImpl::GetBrowserForRequest(request);
if (browser.get()) {
@ -57,7 +53,7 @@ net::URLRequestJob* CefRequestInterceptor::MaybeIntercept(
net::URLRequestJob* CefRequestInterceptor::MaybeInterceptRedirect(
net::URLRequest* request,
net::NetworkDelegate* network_delegate,
const GURL& location) {
const GURL& location) const {
CefRefPtr<CefBrowserHostImpl> browser =
CefBrowserHostImpl::GetBrowserForRequest(request);
if (browser.get()) {
@ -89,6 +85,6 @@ net::URLRequestJob* CefRequestInterceptor::MaybeInterceptRedirect(
net::URLRequestJob* CefRequestInterceptor::MaybeInterceptResponse(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) {
net::NetworkDelegate* network_delegate) const {
return NULL;
}

View File

@ -6,26 +6,26 @@
#define CEF_LIBCEF_BROWSER_URL_REQUEST_INTERCEPTOR_H_
#pragma once
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_interceptor.h"
// Used for intercepting resource requests, redirects and responses. The single
// instance of this class is managed by CefURLRequestContextGetter.
class CefRequestInterceptor : public net::URLRequest::Interceptor {
class CefRequestInterceptor : public net::URLRequestInterceptor {
public:
CefRequestInterceptor();
~CefRequestInterceptor() override;
// net::URLRequest::Interceptor methods.
net::URLRequestJob* MaybeIntercept(
// net::URLRequestInterceptor methods.
net::URLRequestJob* MaybeInterceptRequest(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) override;
net::NetworkDelegate* network_delegate) const override;
net::URLRequestJob* MaybeInterceptRedirect(
net::URLRequest* request,
net::NetworkDelegate* network_delegate,
const GURL& location) override;
const GURL& location) const override;
net::URLRequestJob* MaybeInterceptResponse(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) override;
net::NetworkDelegate* network_delegate) const override;
DISALLOW_COPY_AND_ASSIGN(CefRequestInterceptor);
};

View File

@ -6,6 +6,7 @@
#include <algorithm>
#include "base/logging.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
namespace {
@ -22,6 +23,12 @@ void string_utf16_dtor(char16* str) {
delete [] str;
}
// Originally from base/strings/utf_string_conversions.cc
std::wstring ASCIIToWide(const base::StringPiece& ascii) {
DCHECK(base::IsStringASCII(ascii)) << ascii;
return std::wstring(ascii.begin(), ascii.end());
}
} // namespace
CEF_EXPORT int cef_string_wide_set(const wchar_t* src, size_t src_len,
@ -225,13 +232,13 @@ CEF_EXPORT int cef_string_utf16_to_utf8(const char16* src, size_t src_len,
CEF_EXPORT int cef_string_ascii_to_wide(const char* src, size_t src_len,
cef_string_wide_t* output) {
std::wstring str = base::ASCIIToWide(std::string(src, src_len));
const std::wstring& str = ASCIIToWide(std::string(src, src_len));
return cef_string_wide_set(str.c_str(), str.length(), output, true);
}
CEF_EXPORT int cef_string_ascii_to_utf16(const char* src, size_t src_len,
cef_string_utf16_t* output) {
base::string16 str = base::ASCIIToUTF16(std::string(src, src_len));
const base::string16& str = base::ASCIIToUTF16(std::string(src, src_len));
return cef_string_utf16_set(str.c_str(), str.length(), output, true);
}

View File

@ -580,7 +580,9 @@ bool CefContentRendererClient::OverrideCreatePlugin(
params_to_use.attributeNames.swap(new_names);
params_to_use.attributeValues.swap(new_values);
*plugin = render_frame_impl->CreatePlugin(frame, info, params_to_use);
*plugin = render_frame_impl->CreatePlugin(
frame, info, params_to_use,
content::RenderFrame::POWER_SAVER_MODE_ESSENTIAL);
return true;
}
#endif // defined(ENABLE_PLUGINS)

View File

@ -98,18 +98,6 @@ bool CefDOMDocumentImpl::HasSelection() {
return frame_->hasSelection();
}
CefRefPtr<CefDOMNode> CefDOMDocumentImpl::GetSelectionStartNode() {
if (!VerifyContext() || !frame_->hasSelection())
return NULL;
const WebRange& range = frame_->selectionRange();
if (range.isNull())
return NULL;
int exceptionCode;
return GetOrCreateNode(range.startContainer(exceptionCode));
}
int CefDOMDocumentImpl::GetSelectionStartOffset() {
if (!VerifyContext() || !frame_->hasSelection())
return 0;
@ -121,18 +109,6 @@ int CefDOMDocumentImpl::GetSelectionStartOffset() {
return range.startOffset();
}
CefRefPtr<CefDOMNode> CefDOMDocumentImpl::GetSelectionEndNode() {
if (!VerifyContext() || !frame_->hasSelection())
return NULL;
const WebRange& range = frame_->selectionRange();
if (range.isNull())
return NULL;
int exceptionCode;
return GetOrCreateNode(range.endContainer(exceptionCode));
}
int CefDOMDocumentImpl::GetSelectionEndOffset() {
if (!VerifyContext() || !frame_->hasSelection())
return 0;

View File

@ -31,9 +31,7 @@ class CefDOMDocumentImpl : public CefDOMDocument {
CefRefPtr<CefDOMNode> GetElementById(const CefString& id) override;
CefRefPtr<CefDOMNode> GetFocusedNode() override;
bool HasSelection() override;
CefRefPtr<CefDOMNode> GetSelectionStartNode() override;
int GetSelectionStartOffset() override;
CefRefPtr<CefDOMNode> GetSelectionEndNode() override;
int GetSelectionEndOffset() override;
CefString GetSelectionAsMarkup() override;
CefString GetSelectionAsText() override;

View File

@ -1,39 +1,39 @@
# Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
add_definitions(-DUSING_CEF_SHARED)
# Append platform specific sources to a list of sources.
macro(LIBCEF_APPEND_PLATFORM_SOURCES name_of_list)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND ${name_of_list}_MACOSX)
list(APPEND ${name_of_list} ${${name_of_list}_MACOSX})
endif()
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND ${name_of_list}_LINUX)
list(APPEND ${name_of_list} ${${name_of_list}_LINUX})
endif()
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" AND ${name_of_list}_WINDOWS)
list(APPEND ${name_of_list} ${${name_of_list}_WINDOWS})
endif()
endmacro()
{{
'prefix': 'libcef',
'library': 'libcef_dll_wrapper',
'append_macro': 'LIBCEF_APPEND_PLATFORM_SOURCES',
'includes': [
'includes_common',
'autogen_cpp_includes',
'includes_capi',
'autogen_capi_includes',
'includes_wrapper',
'includes_win:WINDOWS',
'includes_mac:MACOSX',
'includes_linux:LINUX',
'libcef_dll_wrapper_sources_common',
'autogen_client_side',
],
}}
# Remove the default "lib" prefix from the resulting library.
set_target_properties(libcef_dll_wrapper PROPERTIES PREFIX "")
# Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
add_definitions(-DUSING_CEF_SHARED)
# Append platform specific sources to a list of sources.
macro(LIBCEF_APPEND_PLATFORM_SOURCES name_of_list)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND ${name_of_list}_MACOSX)
list(APPEND ${name_of_list} ${${name_of_list}_MACOSX})
endif()
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND ${name_of_list}_LINUX)
list(APPEND ${name_of_list} ${${name_of_list}_LINUX})
endif()
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" AND ${name_of_list}_WINDOWS)
list(APPEND ${name_of_list} ${${name_of_list}_WINDOWS})
endif()
endmacro()
{{
'prefix': 'libcef',
'library': 'libcef_dll_wrapper',
'append_macro': 'LIBCEF_APPEND_PLATFORM_SOURCES',
'includes': [
'includes_common',
'autogen_cpp_includes',
'includes_capi',
'autogen_capi_includes',
'includes_wrapper',
'includes_win:WINDOWS',
'includes_mac:MACOSX',
'includes_linux:LINUX',
'libcef_dll_wrapper_sources_common',
'autogen_client_side',
],
}}
# Remove the default "lib" prefix from the resulting library.
set_target_properties(libcef_dll_wrapper PROPERTIES PREFIX "")

View File

@ -7,7 +7,7 @@
#include "include/base/cef_logging.h"
namespace base {
namespace internal {
namespace cef_internal {
void CallbackBase::Reset() {
polymorphic_invoke_ = NULL;
@ -30,5 +30,5 @@ CallbackBase::CallbackBase(BindStateBase* bind_state)
CallbackBase::~CallbackBase() {
}
} // namespace internal
} // namespace cef_internal
} // namespace base

View File

@ -7,7 +7,7 @@
#if defined(OS_WIN)
namespace base {
namespace internal {
namespace cef_internal {
LockImpl::LockImpl() {
// The second parameter is the spin count, for short-held locks it avoid the
@ -34,7 +34,7 @@ void LockImpl::Unlock() {
::LeaveCriticalSection(&native_handle_);
}
} // namespace internal
} // namespace cef_internal
} // namespace base
#elif defined(OS_POSIX)
@ -45,7 +45,7 @@ void LockImpl::Unlock() {
#include "include/base/cef_logging.h"
namespace base {
namespace internal {
namespace cef_internal {
LockImpl::LockImpl() {
#ifndef NDEBUG
@ -86,7 +86,7 @@ void LockImpl::Unlock() {
DCHECK_EQ(rv, 0) << ". " << strerror(rv);
}
} // namespace internal
} // namespace cef_internal
} // namespace base
#endif // defined(OS_POSIX)

View File

@ -5,7 +5,7 @@
#include "include/base/cef_weak_ptr.h"
namespace base {
namespace internal {
namespace cef_internal {
WeakReference::Flag::Flag() : is_valid_(true) {
// Flags only become bound when checked for validity, or invalidated,
@ -73,5 +73,5 @@ WeakPtrBase::~WeakPtrBase() {
WeakPtrBase::WeakPtrBase(const WeakReference& ref) : ref_(ref) {
}
} // namespace internal
} // namespace cef_internal
} // namespace base

View File

@ -143,22 +143,6 @@ int CEF_CALLBACK domdocument_has_selection(struct _cef_domdocument_t* self) {
return _retval;
}
struct _cef_domnode_t* CEF_CALLBACK domdocument_get_selection_start_node(
struct _cef_domdocument_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefDOMNode> _retval = CefDOMDocumentCppToC::Get(
self)->GetSelectionStartNode();
// Return type: refptr_same
return CefDOMNodeCppToC::Wrap(_retval);
}
int CEF_CALLBACK domdocument_get_selection_start_offset(
struct _cef_domdocument_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -174,22 +158,6 @@ int CEF_CALLBACK domdocument_get_selection_start_offset(
return _retval;
}
struct _cef_domnode_t* CEF_CALLBACK domdocument_get_selection_end_node(
struct _cef_domdocument_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefDOMNode> _retval = CefDOMDocumentCppToC::Get(
self)->GetSelectionEndNode();
// Return type: refptr_same
return CefDOMNodeCppToC::Wrap(_retval);
}
int CEF_CALLBACK domdocument_get_selection_end_offset(
struct _cef_domdocument_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -283,11 +251,8 @@ CefDOMDocumentCppToC::CefDOMDocumentCppToC(CefDOMDocument* cls)
struct_.struct_.get_element_by_id = domdocument_get_element_by_id;
struct_.struct_.get_focused_node = domdocument_get_focused_node;
struct_.struct_.has_selection = domdocument_has_selection;
struct_.struct_.get_selection_start_node =
domdocument_get_selection_start_node;
struct_.struct_.get_selection_start_offset =
domdocument_get_selection_start_offset;
struct_.struct_.get_selection_end_node = domdocument_get_selection_end_node;
struct_.struct_.get_selection_end_offset =
domdocument_get_selection_end_offset;
struct_.struct_.get_selection_as_markup = domdocument_get_selection_as_markup;

View File

@ -129,19 +129,6 @@ bool CefDOMDocumentCToCpp::HasSelection() {
return _retval?true:false;
}
CefRefPtr<CefDOMNode> CefDOMDocumentCToCpp::GetSelectionStartNode() {
if (CEF_MEMBER_MISSING(struct_, get_selection_start_node))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_domnode_t* _retval = struct_->get_selection_start_node(struct_);
// Return type: refptr_same
return CefDOMNodeCToCpp::Wrap(_retval);
}
int CefDOMDocumentCToCpp::GetSelectionStartOffset() {
if (CEF_MEMBER_MISSING(struct_, get_selection_start_offset))
return 0;
@ -155,19 +142,6 @@ int CefDOMDocumentCToCpp::GetSelectionStartOffset() {
return _retval;
}
CefRefPtr<CefDOMNode> CefDOMDocumentCToCpp::GetSelectionEndNode() {
if (CEF_MEMBER_MISSING(struct_, get_selection_end_node))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_domnode_t* _retval = struct_->get_selection_end_node(struct_);
// Return type: refptr_same
return CefDOMNodeCToCpp::Wrap(_retval);
}
int CefDOMDocumentCToCpp::GetSelectionEndOffset() {
if (CEF_MEMBER_MISSING(struct_, get_selection_end_offset))
return 0;

View File

@ -41,9 +41,7 @@ class CefDOMDocumentCToCpp
virtual CefRefPtr<CefDOMNode> GetElementById(const CefString& id) OVERRIDE;
virtual CefRefPtr<CefDOMNode> GetFocusedNode() OVERRIDE;
virtual bool HasSelection() OVERRIDE;
virtual CefRefPtr<CefDOMNode> GetSelectionStartNode() OVERRIDE;
virtual int GetSelectionStartOffset() OVERRIDE;
virtual CefRefPtr<CefDOMNode> GetSelectionEndNode() OVERRIDE;
virtual int GetSelectionEndOffset() OVERRIDE;
virtual CefString GetSelectionAsMarkup() OVERRIDE;
virtual CefString GetSelectionAsText() OVERRIDE;

View File

@ -1,272 +1,272 @@
# Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
#
# Shared macros.
#
# Append platform specific sources to a list of sources.
macro(APPEND_PLATFORM_SOURCES name_of_list)
if(OS_LINUX AND ${name_of_list}_LINUX)
list(APPEND ${name_of_list} ${${name_of_list}_LINUX})
endif()
if(OS_POSIX AND ${name_of_list}_POSIX)
list(APPEND ${name_of_list} ${${name_of_list}_POSIX})
endif()
if(OS_WINDOWS AND ${name_of_list}_WINDOWS)
list(APPEND ${name_of_list} ${${name_of_list}_WINDOWS})
endif()
if(OS_MACOSX AND ${name_of_list}_MACOSX)
list(APPEND ${name_of_list} ${${name_of_list}_MACOSX})
endif()
endmacro()
# Add a logical target that can be used to link the specified libraries into an
# executable target.
macro(ADD_LOGICAL_TARGET target debug_lib release_lib)
add_library(${target} ${CEF_LIBTYPE} IMPORTED)
set_target_properties(${target} PROPERTIES
IMPORTED_LOCATION "${release_lib}"
IMPORTED_LOCATION_DEBUG "${debug_lib}"
IMPORTED_LOCATION_RELEASE "${release_lib}"
)
endmacro()
# Determine the target output directory based on platform and generator.
macro(SET_CEF_TARGET_OUT_DIR)
if(${CMAKE_GENERATOR} STREQUAL "Ninja")
# Ninja does not create a subdirectory named after the configuration.
set(CEF_TARGET_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}")
elseif(OS_LINUX)
set(CEF_TARGET_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
else()
set(CEF_TARGET_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>")
endif()
endmacro()
# Copy a list of files from one directory to another. Relative files paths are maintained.
macro(COPY_FILES target file_list source_dir target_dir)
foreach(FILENAME ${file_list})
set(source_file ${source_dir}/${FILENAME})
set(target_file ${target_dir}/${FILENAME})
if(IS_DIRECTORY ${source_file})
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory "${source_file}" "${target_file}"
VERBATIM
)
else()
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${source_file}" "${target_file}"
VERBATIM
)
endif()
endforeach()
endmacro()
# Rename a directory replacing the target if it already exists.
macro(RENAME_DIRECTORY target source_dir target_dir)
add_custom_command(
TARGET ${target}
POST_BUILD
# Remove the target directory if it already exists.
COMMAND ${CMAKE_COMMAND} -E remove_directory "${target_dir}"
# Rename the source directory to target directory.
COMMAND ${CMAKE_COMMAND} -E rename "${source_dir}" "${target_dir}"
VERBATIM
)
endmacro()
#
# Linux macros.
#
if(OS_LINUX)
# Use pkg-config to find Linux libraries and update compiler/linker variables.
macro(FIND_LINUX_LIBRARIES libraries)
# Read pkg-config info into variables.
execute_process(COMMAND pkg-config --cflags ${libraries} OUTPUT_VARIABLE FLL_CFLAGS)
execute_process(COMMAND pkg-config --libs-only-L --libs-only-other ${libraries} OUTPUT_VARIABLE FLL_LDFLAGS)
execute_process(COMMAND pkg-config --libs-only-l ${libraries} OUTPUT_VARIABLE FLL_LIBS)
# Strip leading and trailing whitepspace.
STRING(STRIP "${FLL_CFLAGS}" FLL_CFLAGS)
STRING(STRIP "${FLL_LDFLAGS}" FLL_LDFLAGS)
STRING(STRIP "${FLL_LIBS}" FLL_LIBS)
# Update the variables.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FLL_CFLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLL_CFLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FLL_LDFLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${FLL_LDFLAGS}")
set(CEF_STANDARD_LIBS "${CEF_STANDARD_LIBS} ${FLL_LIBS}")
endmacro()
# Set SUID permissions on the specified executable.
macro(SET_LINUX_SUID_PERMISSIONS target executable)
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo ""
COMMAND ${CMAKE_COMMAND} -E echo "*** Run the following command manually to set SUID permissions ***"
COMMAND ${CMAKE_COMMAND} -E echo "EXE=\"${executable}\" && sudo -- chown root:root $EXE && sudo -- chmod 4755 $EXE"
COMMAND ${CMAKE_COMMAND} -E echo ""
VERBATIM
)
endmacro()
endif(OS_LINUX)
#
# Mac OS X macros.
#
if(OS_MACOSX)
# Set Xcode target properties.
function(SET_XCODE_TARGET_PROPERTIES target)
set_target_properties(${target} PROPERTIES
XCODE_ATTRIBUTE_ALWAYS_SEARCH_USER_PATHS NO
XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "gnu++11" # -std=gnu++11
XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME NO # -fno-objc-link-runtime
XCODE_ATTRIBUTE_CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS YES # -Wobjc-missing-property-synthesis
XCODE_ATTRIBUTE_COPY_PHASE_STRIP NO
XCODE_ATTRIBUTE_DEAD_CODE_STRIPPING[variant=Release] YES # -Wl,-dead_strip
XCODE_ATTRIBUTE_GCC_C_LANGUAGE_STANDARD "c99" # -std=c99
XCODE_ATTRIBUTE_GCC_CW_ASM_SYNTAX NO # No -fasm-blocks
XCODE_ATTRIBUTE_GCC_DYNAMIC_NO_PIC NO
XCODE_ATTRIBUTE_GCC_ENABLE_CPP_EXCEPTIONS NO # -fno-exceptions
XCODE_ATTRIBUTE_GCC_ENABLE_CPP_RTTI NO # -fno-rtti
XCODE_ATTRIBUTE_GCC_ENABLE_PASCAL_STRINGS NO # No -mpascal-strings
XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN YES # -fvisibility-inlines-hidden
XCODE_ATTRIBUTE_GCC_OBJC_CALL_CXX_CDTORS YES # -fobjc-call-cxx-cdtors
XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN YES # -fvisibility=hidden
XCODE_ATTRIBUTE_GCC_THREADSAFE_STATICS NO # -fno-threadsafe-statics
XCODE_ATTRIBUTE_GCC_TREAT_WARNINGS_AS_ERRORS YES # -Werror
XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0"
XCODE_ATTRIBUTE_GCC_WARN_ABOUT_MISSING_NEWLINE YES # -Wnewline-eof
XCODE_ATTRIBUTE_USE_HEADERMAP NO
OSX_ARCHITECTURES_DEBUG "${CMAKE_OSX_ARCHITECTURES}"
OSX_ARCHITECTURES_RELEASE "${CMAKE_OSX_ARCHITECTURES}"
)
endfunction()
# Override default add_library function.
function(add_library name)
_add_library(${name} ${ARGN})
SET_XCODE_TARGET_PROPERTIES(${name})
endfunction()
# Override default add_executable function.
function(add_executable name)
_add_executable(${name} ${ARGN})
SET_XCODE_TARGET_PROPERTIES(${name})
endfunction()
# Fix the framework link in the helper executable.
macro(FIX_MACOSX_HELPER_FRAMEWORK_LINK target app_path)
add_custom_command(TARGET ${target}
POST_BUILD
COMMAND install_name_tool -change "@executable_path/Chromium Embedded Framework"
"@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework"
"${app_path}/Contents/MacOS/${target}"
VERBATIM
)
endmacro()
# Fix the framework link in the main executable.
macro(FIX_MACOSX_MAIN_FRAMEWORK_LINK target app_path)
add_custom_command(TARGET ${target}
POST_BUILD
COMMAND install_name_tool -change "@executable_path/Chromium Embedded Framework"
"@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework"
"${app_path}/Contents/MacOS/${target}"
VERBATIM
)
endmacro()
# Make the other helper app bundles.
macro(MAKE_MACOSX_HELPERS target app_path)
add_custom_command(TARGET ${target}
POST_BUILD
# The exported variables need to be set for generators other than Xcode.
COMMAND export BUILT_PRODUCTS_DIR=${app_path} &&
export CONTENTS_FOLDER_PATH=/Contents &&
tools/make_more_helpers.sh "Frameworks" "${target}"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
VERBATIM
)
endmacro()
# Manually process and copy over resource files.
macro(COPY_MACOSX_RESOURCES resource_list prefix_list target source_dir app_path)
foreach(FILENAME ${resource_list})
# Remove one or more prefixes from the source paths.
set(TARGET_FILENAME "${FILENAME}")
foreach(PREFIX ${prefix_list})
string(REGEX REPLACE "^.*${PREFIX}" "" TARGET_FILENAME ${TARGET_FILENAME})
endforeach()
# Determine the absolute source and target paths.
set(TARGET_PATH "${app_path}/Contents/Resources/${TARGET_FILENAME}")
if(IS_ABSOLUTE ${FILENAME})
set(SOURCE_PATH ${FILENAME})
else()
set(SOURCE_PATH "${source_dir}/${FILENAME}")
endif()
if(${FILENAME} MATCHES ".xib$")
# Change the target file extension.
string(REGEX REPLACE ".xib$" ".nib" TARGET_PATH ${TARGET_PATH})
get_filename_component(TARGET_DIRECTORY ${TARGET_PATH} PATH)
add_custom_command(
TARGET ${target}
POST_BUILD
# Create the target directory.
COMMAND ${CMAKE_COMMAND} -E make_directory "${TARGET_DIRECTORY}"
# Compile the XIB file to a NIB.
COMMAND /usr/bin/ibtool --output-format binary1 --compile "${TARGET_PATH}" "${SOURCE_PATH}"
VERBATIM
)
elseif(NOT ${TARGET_FILENAME} STREQUAL "Info.plist")
# Copy the file as-is.
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "${SOURCE_PATH}" "${TARGET_PATH}"
VERBATIM
)
endif()
endforeach()
endmacro()
endif(OS_MACOSX)
#
# Windows macros.
#
if(OS_WINDOWS)
# Add custom manifest files to an executable target.
macro(ADD_WINDOWS_MANIFEST target)
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND "mt.exe" -nologo
-manifest \"${CMAKE_CURRENT_SOURCE_DIR}/${target}.exe.manifest\" \"${CMAKE_CURRENT_SOURCE_DIR}/compatibility.manifest\"
-outputresource:"${CEF_TARGET_OUT_DIR}/${target}.exe"\;\#1
COMMENT "Adding manifest..."
)
endmacro()
endif(OS_WINDOWS)
# Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
#
# Shared macros.
#
# Append platform specific sources to a list of sources.
macro(APPEND_PLATFORM_SOURCES name_of_list)
if(OS_LINUX AND ${name_of_list}_LINUX)
list(APPEND ${name_of_list} ${${name_of_list}_LINUX})
endif()
if(OS_POSIX AND ${name_of_list}_POSIX)
list(APPEND ${name_of_list} ${${name_of_list}_POSIX})
endif()
if(OS_WINDOWS AND ${name_of_list}_WINDOWS)
list(APPEND ${name_of_list} ${${name_of_list}_WINDOWS})
endif()
if(OS_MACOSX AND ${name_of_list}_MACOSX)
list(APPEND ${name_of_list} ${${name_of_list}_MACOSX})
endif()
endmacro()
# Add a logical target that can be used to link the specified libraries into an
# executable target.
macro(ADD_LOGICAL_TARGET target debug_lib release_lib)
add_library(${target} ${CEF_LIBTYPE} IMPORTED)
set_target_properties(${target} PROPERTIES
IMPORTED_LOCATION "${release_lib}"
IMPORTED_LOCATION_DEBUG "${debug_lib}"
IMPORTED_LOCATION_RELEASE "${release_lib}"
)
endmacro()
# Determine the target output directory based on platform and generator.
macro(SET_CEF_TARGET_OUT_DIR)
if(${CMAKE_GENERATOR} STREQUAL "Ninja")
# Ninja does not create a subdirectory named after the configuration.
set(CEF_TARGET_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}")
elseif(OS_LINUX)
set(CEF_TARGET_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
else()
set(CEF_TARGET_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>")
endif()
endmacro()
# Copy a list of files from one directory to another. Relative files paths are maintained.
macro(COPY_FILES target file_list source_dir target_dir)
foreach(FILENAME ${file_list})
set(source_file ${source_dir}/${FILENAME})
set(target_file ${target_dir}/${FILENAME})
if(IS_DIRECTORY ${source_file})
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory "${source_file}" "${target_file}"
VERBATIM
)
else()
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${source_file}" "${target_file}"
VERBATIM
)
endif()
endforeach()
endmacro()
# Rename a directory replacing the target if it already exists.
macro(RENAME_DIRECTORY target source_dir target_dir)
add_custom_command(
TARGET ${target}
POST_BUILD
# Remove the target directory if it already exists.
COMMAND ${CMAKE_COMMAND} -E remove_directory "${target_dir}"
# Rename the source directory to target directory.
COMMAND ${CMAKE_COMMAND} -E rename "${source_dir}" "${target_dir}"
VERBATIM
)
endmacro()
#
# Linux macros.
#
if(OS_LINUX)
# Use pkg-config to find Linux libraries and update compiler/linker variables.
macro(FIND_LINUX_LIBRARIES libraries)
# Read pkg-config info into variables.
execute_process(COMMAND pkg-config --cflags ${libraries} OUTPUT_VARIABLE FLL_CFLAGS)
execute_process(COMMAND pkg-config --libs-only-L --libs-only-other ${libraries} OUTPUT_VARIABLE FLL_LDFLAGS)
execute_process(COMMAND pkg-config --libs-only-l ${libraries} OUTPUT_VARIABLE FLL_LIBS)
# Strip leading and trailing whitepspace.
STRING(STRIP "${FLL_CFLAGS}" FLL_CFLAGS)
STRING(STRIP "${FLL_LDFLAGS}" FLL_LDFLAGS)
STRING(STRIP "${FLL_LIBS}" FLL_LIBS)
# Update the variables.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FLL_CFLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLL_CFLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FLL_LDFLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${FLL_LDFLAGS}")
set(CEF_STANDARD_LIBS "${CEF_STANDARD_LIBS} ${FLL_LIBS}")
endmacro()
# Set SUID permissions on the specified executable.
macro(SET_LINUX_SUID_PERMISSIONS target executable)
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo ""
COMMAND ${CMAKE_COMMAND} -E echo "*** Run the following command manually to set SUID permissions ***"
COMMAND ${CMAKE_COMMAND} -E echo "EXE=\"${executable}\" && sudo -- chown root:root $EXE && sudo -- chmod 4755 $EXE"
COMMAND ${CMAKE_COMMAND} -E echo ""
VERBATIM
)
endmacro()
endif(OS_LINUX)
#
# Mac OS X macros.
#
if(OS_MACOSX)
# Set Xcode target properties.
function(SET_XCODE_TARGET_PROPERTIES target)
set_target_properties(${target} PROPERTIES
XCODE_ATTRIBUTE_ALWAYS_SEARCH_USER_PATHS NO
XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "gnu++11" # -std=gnu++11
XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME NO # -fno-objc-link-runtime
XCODE_ATTRIBUTE_CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS YES # -Wobjc-missing-property-synthesis
XCODE_ATTRIBUTE_COPY_PHASE_STRIP NO
XCODE_ATTRIBUTE_DEAD_CODE_STRIPPING[variant=Release] YES # -Wl,-dead_strip
XCODE_ATTRIBUTE_GCC_C_LANGUAGE_STANDARD "c99" # -std=c99
XCODE_ATTRIBUTE_GCC_CW_ASM_SYNTAX NO # No -fasm-blocks
XCODE_ATTRIBUTE_GCC_DYNAMIC_NO_PIC NO
XCODE_ATTRIBUTE_GCC_ENABLE_CPP_EXCEPTIONS NO # -fno-exceptions
XCODE_ATTRIBUTE_GCC_ENABLE_CPP_RTTI NO # -fno-rtti
XCODE_ATTRIBUTE_GCC_ENABLE_PASCAL_STRINGS NO # No -mpascal-strings
XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN YES # -fvisibility-inlines-hidden
XCODE_ATTRIBUTE_GCC_OBJC_CALL_CXX_CDTORS YES # -fobjc-call-cxx-cdtors
XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN YES # -fvisibility=hidden
XCODE_ATTRIBUTE_GCC_THREADSAFE_STATICS NO # -fno-threadsafe-statics
XCODE_ATTRIBUTE_GCC_TREAT_WARNINGS_AS_ERRORS YES # -Werror
XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0"
XCODE_ATTRIBUTE_GCC_WARN_ABOUT_MISSING_NEWLINE YES # -Wnewline-eof
XCODE_ATTRIBUTE_USE_HEADERMAP NO
OSX_ARCHITECTURES_DEBUG "${CMAKE_OSX_ARCHITECTURES}"
OSX_ARCHITECTURES_RELEASE "${CMAKE_OSX_ARCHITECTURES}"
)
endfunction()
# Override default add_library function.
function(add_library name)
_add_library(${name} ${ARGN})
SET_XCODE_TARGET_PROPERTIES(${name})
endfunction()
# Override default add_executable function.
function(add_executable name)
_add_executable(${name} ${ARGN})
SET_XCODE_TARGET_PROPERTIES(${name})
endfunction()
# Fix the framework link in the helper executable.
macro(FIX_MACOSX_HELPER_FRAMEWORK_LINK target app_path)
add_custom_command(TARGET ${target}
POST_BUILD
COMMAND install_name_tool -change "@executable_path/Chromium Embedded Framework"
"@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework"
"${app_path}/Contents/MacOS/${target}"
VERBATIM
)
endmacro()
# Fix the framework link in the main executable.
macro(FIX_MACOSX_MAIN_FRAMEWORK_LINK target app_path)
add_custom_command(TARGET ${target}
POST_BUILD
COMMAND install_name_tool -change "@executable_path/Chromium Embedded Framework"
"@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework"
"${app_path}/Contents/MacOS/${target}"
VERBATIM
)
endmacro()
# Make the other helper app bundles.
macro(MAKE_MACOSX_HELPERS target app_path)
add_custom_command(TARGET ${target}
POST_BUILD
# The exported variables need to be set for generators other than Xcode.
COMMAND export BUILT_PRODUCTS_DIR=${app_path} &&
export CONTENTS_FOLDER_PATH=/Contents &&
tools/make_more_helpers.sh "Frameworks" "${target}"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
VERBATIM
)
endmacro()
# Manually process and copy over resource files.
macro(COPY_MACOSX_RESOURCES resource_list prefix_list target source_dir app_path)
foreach(FILENAME ${resource_list})
# Remove one or more prefixes from the source paths.
set(TARGET_FILENAME "${FILENAME}")
foreach(PREFIX ${prefix_list})
string(REGEX REPLACE "^.*${PREFIX}" "" TARGET_FILENAME ${TARGET_FILENAME})
endforeach()
# Determine the absolute source and target paths.
set(TARGET_PATH "${app_path}/Contents/Resources/${TARGET_FILENAME}")
if(IS_ABSOLUTE ${FILENAME})
set(SOURCE_PATH ${FILENAME})
else()
set(SOURCE_PATH "${source_dir}/${FILENAME}")
endif()
if(${FILENAME} MATCHES ".xib$")
# Change the target file extension.
string(REGEX REPLACE ".xib$" ".nib" TARGET_PATH ${TARGET_PATH})
get_filename_component(TARGET_DIRECTORY ${TARGET_PATH} PATH)
add_custom_command(
TARGET ${target}
POST_BUILD
# Create the target directory.
COMMAND ${CMAKE_COMMAND} -E make_directory "${TARGET_DIRECTORY}"
# Compile the XIB file to a NIB.
COMMAND /usr/bin/ibtool --output-format binary1 --compile "${TARGET_PATH}" "${SOURCE_PATH}"
VERBATIM
)
elseif(NOT ${TARGET_FILENAME} STREQUAL "Info.plist")
# Copy the file as-is.
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "${SOURCE_PATH}" "${TARGET_PATH}"
VERBATIM
)
endif()
endforeach()
endmacro()
endif(OS_MACOSX)
#
# Windows macros.
#
if(OS_WINDOWS)
# Add custom manifest files to an executable target.
macro(ADD_WINDOWS_MANIFEST target)
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND "mt.exe" -nologo
-manifest \"${CMAKE_CURRENT_SOURCE_DIR}/${target}.exe.manifest\" \"${CMAKE_CURRENT_SOURCE_DIR}/compatibility.manifest\"
-outputresource:"${CEF_TARGET_OUT_DIR}/${target}.exe"\;\#1
COMMENT "Adding manifest..."
)
endmacro()
endif(OS_WINDOWS)

View File

@ -14,12 +14,6 @@ patches = [
{
# Fix Xcode 4 build on OS X Lion.
# http://codereview.chromium.org/8086022/
#
# Disable Warning 4702 ("Unreachable code") for Windows VS builds.
# https://code.google.com/p/chromium/issues/detail?id=346399#c55
#
# Include build variables in custom environment files.
# https://code.google.com/p/chromium/issues/detail?id=313974#c6
'name': 'build',
'path': '../build/',
},
@ -99,12 +93,6 @@ patches = [
'name': 'ui_dragdrop_355390',
'path': '../ui/base/dragdrop/',
},
{
# Fix printing on Windows and Mac.
# https://codereview.chromium.org/719693002
'name': 'printing',
'path': '../',
},
{
# Fix AtExitManager assertion on SpellcheckServiceFactory destruction during
# Windows multi-threaded message loop shutdown.

View File

@ -1,8 +1,8 @@
diff --git web_contents_impl.cc web_contents_impl.cc
index 3119566..32c43dd 100644
index ca9112a..80e2b75 100644
--- web_contents_impl.cc
+++ web_contents_impl.cc
@@ -1153,22 +1153,29 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -1152,22 +1152,29 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
params.browser_context, params.site_instance, params.routing_id,
params.main_frame_routing_id);
@ -48,7 +48,7 @@ index 3119566..32c43dd 100644
}
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -1501,6 +1508,9 @@ void WebContentsImpl::CreateNewWindow(
@@ -1502,6 +1509,9 @@ void WebContentsImpl::CreateNewWindow(
static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace);
CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context));
@ -58,7 +58,7 @@ index 3119566..32c43dd 100644
if (delegate_ &&
!delegate_->ShouldCreateWebContents(this,
route_id,
@@ -1508,7 +1518,9 @@ void WebContentsImpl::CreateNewWindow(
@@ -1509,7 +1519,9 @@ void WebContentsImpl::CreateNewWindow(
params.frame_name,
params.target_url,
partition_id,
@ -69,7 +69,7 @@ index 3119566..32c43dd 100644
if (route_id != MSG_ROUTING_NONE &&
!RenderViewHost::FromID(render_process_id, route_id)) {
// If the embedder didn't create a WebContents for this route, we need to
@@ -1528,6 +1540,8 @@ void WebContentsImpl::CreateNewWindow(
@@ -1529,6 +1541,8 @@ void WebContentsImpl::CreateNewWindow(
create_params.main_frame_routing_id = main_frame_route_id;
create_params.opener = this;
create_params.opener_suppressed = params.opener_suppressed;

View File

@ -1,5 +1,5 @@
diff --git common.gypi common.gypi
index f97bf66..116c7bc 100644
index c899e14..435bfb5 100644
--- common.gypi
+++ common.gypi
@@ -9,6 +9,9 @@
@ -12,16 +12,6 @@ index f97bf66..116c7bc 100644
# Putting a variables dict inside another variables dict looks kind of
# weird. This is done so that 'host_arch', 'chromeos', etc are defined as
# variables within the outer variables dict here. This is necessary
@@ -5486,6 +5489,9 @@
4510, # Default constructor could not be generated
4512, # Assignment operator could not be generated
4610, # Object can never be instantiated
+ # Disable Warning 4702 ("Unreachable code")
+ # https://code.google.com/p/chromium/issues/detail?id=346399#c55
+ 4702,
],
'msvs_settings': {
'VCCLCompilerTool': {
diff --git mac/strip_save_dsym mac/strip_save_dsym
index c9cf226..0dedbe3 100755
--- mac/strip_save_dsym
@ -35,25 +25,3 @@ index c9cf226..0dedbe3 100755
stdout=subprocess.PIPE)
archs = []
diff --git toolchain/win/setup_toolchain.py toolchain/win/setup_toolchain.py
index 5e292ab..92ea3f4 100644
--- toolchain/win/setup_toolchain.py
+++ toolchain/win/setup_toolchain.py
@@ -25,6 +25,8 @@ def ExtractImportantEnvironment():
envvars_to_save = (
'goma_.*', # TODO(scottmg): This is ugly, but needed for goma.
'include', # Needed by midl compiler.
+ 'lib',
+ 'libpath',
'path',
'pathext',
'systemroot',
@@ -90,7 +92,7 @@ important_env_vars = ExtractImportantEnvironment()
path = important_env_vars["PATH"].split(";")
# Add 32-bit compiler path to the beginning and write the block.
-path32 = [os.path.join(vs_path, "VC\\BIN")] + \
+path32 = [os.path.join(vs_path, "VC\\BIN\\amd64_x86")] + \
[os.path.join(win_sdk_path, "bin\\x86")] + \
path
important_env_vars["PATH"] = ";".join(path32)

View File

@ -1,8 +1,8 @@
diff --git public/renderer/content_renderer_client.cc public/renderer/content_renderer_client.cc
index ca1b9fe..1868fc8 100644
index c4df640..6de25db 100644
--- public/renderer/content_renderer_client.cc
+++ public/renderer/content_renderer_client.cc
@@ -98,7 +98,6 @@ bool ContentRendererClient::AllowPopup() {
@@ -99,7 +99,6 @@ bool ContentRendererClient::AllowPopup() {
return false;
}
@ -10,7 +10,7 @@ index ca1b9fe..1868fc8 100644
bool ContentRendererClient::HandleNavigation(
RenderFrame* render_frame,
DocumentState* document_state,
@@ -110,7 +109,6 @@ bool ContentRendererClient::HandleNavigation(
@@ -111,7 +110,6 @@ bool ContentRendererClient::HandleNavigation(
bool is_redirect) {
return false;
}
@ -19,10 +19,10 @@ index ca1b9fe..1868fc8 100644
bool ContentRendererClient::ShouldFork(blink::WebFrame* frame,
const GURL& url,
diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h
index 7b79a5c..1a8784b 100644
index 9a6c695..c29b83a 100644
--- public/renderer/content_renderer_client.h
+++ public/renderer/content_renderer_client.h
@@ -193,7 +193,6 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -195,7 +195,6 @@ class CONTENT_EXPORT ContentRendererClient {
// Returns true if a popup window should be allowed.
virtual bool AllowPopup();
@ -30,7 +30,7 @@ index 7b79a5c..1a8784b 100644
// TODO(sgurun) This callback is deprecated and will be removed as soon
// as android webview completes implementation of a resource throttle based
// shouldoverrideurl implementation. See crbug.com/325351
@@ -208,7 +207,6 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -210,7 +209,6 @@ class CONTENT_EXPORT ContentRendererClient {
blink::WebNavigationType type,
blink::WebNavigationPolicy default_policy,
bool is_redirect);
@ -39,10 +39,10 @@ index 7b79a5c..1a8784b 100644
// Returns true if we should fork a new process for the given navigation.
// If |send_referrer| is set to false (which is the default), no referrer
diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc
index 9dfdf6b..da8622d 100644
index fa041b7..28b4a04 100644
--- renderer/render_frame_impl.cc
+++ renderer/render_frame_impl.cc
@@ -3714,7 +3714,6 @@ void RenderFrameImpl::OnCommitNavigation(
@@ -3748,7 +3748,6 @@ void RenderFrameImpl::OnCommitNavigation(
WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
RenderFrame* render_frame,
const NavigationPolicyInfo& info) {
@ -50,7 +50,7 @@ index 9dfdf6b..da8622d 100644
// The handlenavigation API is deprecated and will be removed once
// crbug.com/325351 is resolved.
if (info.urlRequest.url() != GURL(kSwappedOutURL) &&
@@ -3729,7 +3728,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
@@ -3763,7 +3762,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
info.isRedirect)) {
return blink::WebNavigationPolicyIgnore;
}

View File

@ -1,5 +1,5 @@
diff --git resource_ids resource_ids
index 4681b25..9b63284 100644
index 42cc710..0feaec2 100644
--- resource_ids
+++ resource_ids
@@ -14,6 +14,12 @@

View File

@ -1,8 +1,8 @@
diff --git gyp/generator/ninja.py gyp/generator/ninja.py
index cfb13fc..132bb8c 100644
index 5cda5c3..bad5ca3 100644
--- gyp/generator/ninja.py
+++ gyp/generator/ninja.py
@@ -742,7 +742,16 @@ class NinjaWriter:
@@ -743,7 +743,16 @@ class NinjaWriter(object):
for path in copy['files']:
# Normalize the path so trailing slashes don't confuse us.
path = os.path.normpath(path)

View File

@ -1,8 +1,8 @@
diff --git message_loop.cc message_loop.cc
index 01402d0..dd910bd 100644
index 2f4a03c..ea7d505 100644
--- message_loop.cc
+++ message_loop.cc
@@ -158,7 +158,6 @@ MessageLoop::MessageLoop(scoped_ptr<MessagePump> pump)
@@ -160,7 +160,6 @@ MessageLoop::MessageLoop(scoped_ptr<MessagePump> pump)
MessageLoop::~MessageLoop() {
DCHECK_EQ(this, current());

View File

@ -1,8 +1,8 @@
diff --git public/common/common_param_traits_macros.h public/common/common_param_traits_macros.h
index cb17472..9fac25e 100644
index 85e98ce..46b7fb3 100644
--- public/common/common_param_traits_macros.h
+++ public/common/common_param_traits_macros.h
@@ -177,6 +177,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
@@ -186,6 +186,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes)
IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale)
IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled)
@ -11,23 +11,23 @@ index cb17472..9fac25e 100644
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
diff --git public/common/web_preferences.cc public/common/web_preferences.cc
index dbe1629..c14ac82 100644
index 17bf9dc..b76213c 100644
--- public/common/web_preferences.cc
+++ public/common/web_preferences.cc
@@ -150,6 +150,7 @@ WebPreferences::WebPreferences()
pinch_overlay_scrollbar_thickness(0),
@@ -178,6 +178,7 @@ WebPreferences::WebPreferences()
rubber_banding_on_compositor_thread(false),
use_solid_color_scrollbars(false),
navigate_on_drag_drop(true),
+ base_background_color(0xFFFFFFFF), // Color::white
v8_cache_options(V8_CACHE_OPTIONS_OFF),
v8_cache_options(V8_CACHE_OPTIONS_DEFAULT),
v8_script_streaming_enabled(false),
v8_script_streaming_mode(V8_SCRIPT_STREAMING_MODE_ALL),
diff --git public/common/web_preferences.h public/common/web_preferences.h
index 057174f..a76d7a7 100644
index c850133..1cfb3cc 100644
--- public/common/web_preferences.h
+++ public/common/web_preferences.h
@@ -152,6 +152,7 @@ struct CONTENT_EXPORT WebPreferences {
int pinch_overlay_scrollbar_thickness;
@@ -165,6 +165,7 @@ struct CONTENT_EXPORT WebPreferences {
bool rubber_banding_on_compositor_thread;
bool use_solid_color_scrollbars;
bool navigate_on_drag_drop;
+ uint32_t base_background_color;
@ -35,10 +35,10 @@ index 057174f..a76d7a7 100644
bool v8_script_streaming_enabled;
V8ScriptStreamingMode v8_script_streaming_mode;
diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc
index 56a719e..d61c1cb 100644
index 61f4c88..6772f2d 100644
--- renderer/render_view_impl.cc
+++ renderer/render_view_impl.cc
@@ -963,6 +963,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
@@ -974,6 +974,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
settings->setJavaEnabled(prefs.java_enabled);

View File

@ -1,38 +0,0 @@
diff --git chrome/renderer/printing/print_web_view_helper_mac.mm chrome/renderer/printing/print_web_view_helper_mac.mm
index ffde22c..6c776ce 100644
--- chrome/renderer/printing/print_web_view_helper_mac.mm
+++ chrome/renderer/printing/print_web_view_helper_mac.mm
@@ -127,12 +127,14 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
skia::SetIsPreviewMetafile(*canvas, is_preview);
+#if defined(ENABLE_PRINT_PREVIEW)
if (params.display_header_footer) {
PrintHeaderAndFooter(static_cast<blink::WebCanvas*>(canvas),
page_number + 1,
print_preview_context_.total_page_count(), *frame,
scale_factor, page_layout_in_points, params);
}
+#endif // ENABLE_PRINT_PREVIEW
RenderPageContent(frame, page_number, canvas_area, content_area,
scale_factor, static_cast<blink::WebCanvas*>(canvas));
}
diff --git chrome/renderer/printing/print_web_view_helper_pdf_win.cc chrome/renderer/printing/print_web_view_helper_pdf_win.cc
index d9554d7..9ca18a7 100644
--- chrome/renderer/printing/print_web_view_helper_pdf_win.cc
+++ chrome/renderer/printing/print_web_view_helper_pdf_win.cc
@@ -187,12 +187,14 @@ void PrintWebViewHelper::PrintPageInternal(
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
+#if defined(ENABLE_PRINT_PREVIEW)
if (params.params.display_header_footer) {
// |page_number| is 0-based, so 1 is added.
PrintHeaderAndFooter(canvas, params.page_number + 1,
print_preview_context_.total_page_count(), *frame,
scale_factor, page_layout_in_points, params.params);
}
+#endif // ENABLE_PRINT_PREVIEW
float webkit_scale_factor =
RenderPageContent(frame, params.page_number, canvas_area, content_area,

View File

@ -1,5 +1,5 @@
diff --git content_browser_client.cc content_browser_client.cc
index 728d822..cbbd248 100644
index c5c672f..dd84884 100644
--- content_browser_client.cc
+++ content_browser_client.cc
@@ -273,6 +273,10 @@ bool ContentBrowserClient::IsFastShutdownPossible() {
@ -14,10 +14,10 @@ index 728d822..cbbd248 100644
return base::FilePath();
}
diff --git content_browser_client.h content_browser_client.h
index 5a27d98..74184f1 100644
index 0934c9a..035ac1b 100644
--- content_browser_client.h
+++ content_browser_client.h
@@ -28,6 +28,7 @@
@@ -29,6 +29,7 @@
#include "net/url_request/url_request_interceptor.h"
#include "net/url_request/url_request_job_factory.h"
#include "storage/browser/fileapi/file_system_context.h"
@ -25,7 +25,7 @@ index 5a27d98..74184f1 100644
#include "third_party/WebKit/public/platform/WebNotificationPermission.h"
#include "ui/base/window_open_disposition.h"
@@ -507,6 +508,9 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -514,6 +515,9 @@ class CONTENT_EXPORT ContentBrowserClient {
// Clears browser cookies.
virtual void ClearCookies(RenderViewHost* rvh) {}
@ -89,7 +89,7 @@ index 5478a37..d34c1da 100644
// Creates a new WebContents.
diff --git web_contents_delegate.cc web_contents_delegate.cc
index f264df7..bded79a 100644
index eefb8ab..b4646f8 100644
--- web_contents_delegate.cc
+++ web_contents_delegate.cc
@@ -136,7 +136,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
@ -104,7 +104,7 @@ index f264df7..bded79a 100644
}
diff --git web_contents_delegate.h web_contents_delegate.h
index bcd5caf..35b8934 100644
index 17bed7f..64181d0 100644
--- web_contents_delegate.h
+++ web_contents_delegate.h
@@ -36,9 +36,11 @@ class DownloadItem;

View File

@ -1,10 +1,10 @@
diff --git spellcheck_factory.cc spellcheck_factory.cc
index 8df78f4..909840e 100644
index 7d7e1df..b623657 100644
--- spellcheck_factory.cc
+++ spellcheck_factory.cc
@@ -14,6 +14,13 @@
#include "components/user_prefs/user_prefs.h"
@@ -15,6 +15,13 @@
#include "content/public/browser/render_process_host.h"
#include "ui/base/l10n/l10n_util.h"
+namespace {
+
@ -16,7 +16,7 @@ index 8df78f4..909840e 100644
// static
SpellcheckService* SpellcheckServiceFactory::GetForContext(
content::BrowserContext* context) {
@@ -36,7 +43,7 @@ SpellcheckService* SpellcheckServiceFactory::GetForRenderProcessId(
@@ -37,7 +44,7 @@ SpellcheckService* SpellcheckServiceFactory::GetForRenderProcessId(
// static
SpellcheckServiceFactory* SpellcheckServiceFactory::GetInstance() {

View File

@ -1,5 +1,5 @@
diff --git core/frame/FrameView.cpp core/frame/FrameView.cpp
index 8a77e1c..06e6c47 100644
index d8b6105..33abf9d 100644
--- core/frame/FrameView.cpp
+++ core/frame/FrameView.cpp
@@ -145,8 +145,10 @@ FrameView::FrameView(LocalFrame* frame)

View File

@ -12,7 +12,7 @@ index a8e088c..838b6a0 100644
return host ? host->GetAcceleratedWidget() : NULL;
}
diff --git desktop_aura/desktop_window_tree_host_win.cc desktop_aura/desktop_window_tree_host_win.cc
index 8fac698..11dcd60 100644
index 3752373..f588160 100644
--- desktop_aura/desktop_window_tree_host_win.cc
+++ desktop_aura/desktop_window_tree_host_win.cc
@@ -131,7 +131,9 @@ void DesktopWindowTreeHostWin::Init(aura::Window* content_window,
@ -43,7 +43,7 @@ index 8fac698..11dcd60 100644
if (input_method)
input_method->OnBlur();
diff --git desktop_aura/desktop_window_tree_host_x11.cc desktop_aura/desktop_window_tree_host_x11.cc
index 3c99281..e6c56b7 100644
index dd8aa40..5d2a63d 100644
--- desktop_aura/desktop_window_tree_host_x11.cc
+++ desktop_aura/desktop_window_tree_host_x11.cc
@@ -150,7 +150,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
@ -118,7 +118,7 @@ index 3c99281..e6c56b7 100644
bounds_.x(), bounds_.y(),
bounds_.width(), bounds_.height(),
0, // border width
@@ -1695,6 +1709,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
@@ -1696,6 +1710,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
}
break;
}

View File

@ -1,5 +1,5 @@
diff --git ThemeMac.mm ThemeMac.mm
index 5f2596f..8ecf698 100644
index a35aaea..c049569 100644
--- ThemeMac.mm
+++ ThemeMac.mm
@@ -490,7 +490,7 @@ static void paintButton(ControlPart part, ControlStates states, GraphicsContext*

View File

@ -1,8 +1,8 @@
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
index e0dc3d4..4789bc7 100644
index d98ab12..57c2e70 100644
--- Source/web/ChromeClientImpl.cpp
+++ Source/web/ChromeClientImpl.cpp
@@ -724,7 +724,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
@@ -726,7 +726,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame& frame, PopupMenuClient* client) const
{
@ -12,10 +12,10 @@ index e0dc3d4..4789bc7 100644
return adoptRefWillBeNoop(new PopupMenuChromium(frame, client));
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
index 722513b..a36ca46 100644
index 3626eac..91b1d66 100644
--- Source/web/WebViewImpl.cpp
+++ Source/web/WebViewImpl.cpp
@@ -385,6 +385,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
@@ -386,6 +386,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
, m_fakePageScaleAnimationPageScaleFactor(0)
, m_fakePageScaleAnimationUseAnchor(false)
, m_contextMenuAllowed(false)
@ -23,7 +23,7 @@ index 722513b..a36ca46 100644
, m_doingDragAndDrop(false)
, m_ignoreInputEvents(false)
, m_compositorDeviceScaleFactorOverride(0)
@@ -3971,9 +3972,14 @@ void WebViewImpl::deviceOrPageScaleFactorChanged()
@@ -3986,9 +3987,14 @@ void WebViewImpl::deviceOrPageScaleFactorChanged()
m_page->inspectorController().deviceOrPageScaleFactorChanged();
}
@ -40,10 +40,10 @@ index 722513b..a36ca46 100644
void WebViewImpl::startDragging(LocalFrame* frame,
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
index e3b2985..13a6ee0 100644
index 8229f02..d22bb85 100644
--- Source/web/WebViewImpl.h
+++ Source/web/WebViewImpl.h
@@ -373,7 +373,8 @@ public:
@@ -380,7 +380,8 @@ public:
// Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default).
@ -53,7 +53,7 @@ index e3b2985..13a6ee0 100644
bool contextMenuAllowed() const
{
@@ -662,6 +663,8 @@ private:
@@ -672,6 +673,8 @@ private:
bool m_contextMenuAllowed;
@ -63,10 +63,10 @@ index e3b2985..13a6ee0 100644
bool m_ignoreInputEvents;
diff --git public/web/WebView.h public/web/WebView.h
index 8ff8487..f65d350 100644
index e6c4924..6df09db 100644
--- public/web/WebView.h
+++ public/web/WebView.h
@@ -405,6 +405,7 @@ public:
@@ -407,6 +407,7 @@ public:
// Sets whether select popup menus should be rendered by the browser.
BLINK_EXPORT static void setUseExternalPopupMenus(bool);

View File

@ -1,174 +1,174 @@
# Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
#
# Source files.
#
# cefclient sources.
{{
'prefix': 'cefclient',
'set': 'CEFCLIENT_SRCS',
'includes': [
'cefclient_sources_common',
'cefclient_bundle_resources_common',
'cefclient_sources_win:WINDOWS',
'cefclient_sources_mac:MACOSX',
'cefclient_sources_linux:LINUX',
],
}}
# cefclient helper sources.
{{
'prefix': 'cefclient_helper',
'includes': [
'cefclient_sources_mac_helper:MACOSX',
],
}}
# cefclient resources.
{{
'prefix': 'cefclient_resources',
'set': 'CEFCLIENT_RESOURCES_SRCS',
'includes': [
'cefclient_bundle_resources_common',
'cefclient_bundle_resources_mac:MACOSX',
],
}}
#
# Shared configuration.
#
# Target executable names.
set(CEF_TARGET "cefclient")
if(OS_MACOSX)
set(CEF_HELPER_TARGET "cefclient Helper")
endif()
# Logical target used to link the libcef library.
ADD_LOGICAL_TARGET("libcef_lib" "${CEF_LIB_DEBUG}" "${CEF_LIB_RELEASE}")
# Determine the target output directory.
SET_CEF_TARGET_OUT_DIR()
#
# Linux configuration.
#
if(OS_LINUX)
# Find required libraries and update compiler/linker variables.
FIND_LINUX_LIBRARIES("gmodule-2.0 gtk+-2.0 gthread-2.0 gtk+-unix-print-2.0 gtkglext-1.0")
# Executable target.
add_executable(${CEF_TARGET} ${CEFCLIENT_SRCS})
add_dependencies(${CEF_TARGET} libcef_dll_wrapper)
target_link_libraries(${CEF_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS})
# Set rpath so that libraries can be placed next to the executable.
set_target_properties(${CEF_TARGET} PROPERTIES INSTALL_RPATH "$ORIGIN")
set_target_properties(${CEF_TARGET} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
set_target_properties(${CEF_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CEF_TARGET_OUT_DIR})
# Copy CEF binary and resource files to the target output directory.
COPY_FILES("${CEF_TARGET}" "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "${CEF_TARGET_OUT_DIR}")
COPY_FILES("${CEF_TARGET}" "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "${CEF_TARGET_OUT_DIR}")
# Copy cefclient resource files to the target output directory.
COPY_FILES("${CEF_TARGET}" "${CEFCLIENT_RESOURCES_SRCS}" "${CMAKE_CURRENT_SOURCE_DIR}" "${CEF_TARGET_OUT_DIR}")
# Rename the "res" directory to "files".
RENAME_DIRECTORY("${CEF_TARGET}" "${CEF_TARGET_OUT_DIR}/res" "${CEF_TARGET_OUT_DIR}/files")
# Set SUID permissions on the chrome-sandbox target.
SET_LINUX_SUID_PERMISSIONS("${CEF_TARGET}" "${CEF_TARGET_OUT_DIR}/chrome-sandbox")
endif()
#
# Mac OS X configuration.
#
if(OS_MACOSX)
# Output paths for the app bundles.
set(CEF_APP "${CEF_TARGET_OUT_DIR}/${CEF_TARGET}.app")
set(CEF_HELPER_APP "${CEF_TARGET_OUT_DIR}/${CEF_HELPER_TARGET}.app")
# Variable referenced from Info.plist files.
set(PRODUCT_NAME "${CEF_TARGET}")
# Helper executable target.
add_executable(${CEF_HELPER_TARGET} MACOSX_BUNDLE ${CEFCLIENT_HELPER_SRCS})
add_dependencies(${CEF_HELPER_TARGET} libcef_dll_wrapper)
target_link_libraries(${CEF_HELPER_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS})
set_target_properties(${CEF_HELPER_TARGET} PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/mac/helper-Info.plist
)
# Fix the framework link in the helper executable.
FIX_MACOSX_HELPER_FRAMEWORK_LINK(${CEF_HELPER_TARGET} ${CEF_HELPER_APP})
# Main executable target.
add_executable(${CEF_TARGET} MACOSX_BUNDLE ${CEFCLIENT_RESOURCES_SRCS} ${CEFCLIENT_SRCS})
add_dependencies(${CEF_TARGET} libcef_dll_wrapper "${CEF_HELPER_TARGET}")
target_link_libraries(${CEF_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS} "-framework OpenGL")
set_target_properties(${CEF_TARGET} PROPERTIES
RESOURCE "${CEFCLIENT_RESOURCES_SRCS}"
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/mac/Info.plist
)
# Copy files into the main app bundle.
add_custom_command(
TARGET ${CEF_TARGET}
POST_BUILD
# Copy the helper app bundle into the Frameworks directory.
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CEF_HELPER_APP}"
"${CEF_APP}/Contents/Frameworks/${CEF_HELPER_TARGET}.app"
# Copy the CEF framework into the Frameworks directory.
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CEF_BINARY_DIR}/Chromium Embedded Framework.framework"
"${CEF_APP}/Contents/Frameworks/Chromium Embedded Framework.framework"
VERBATIM
)
# Fix the framework link in the main executable.
FIX_MACOSX_MAIN_FRAMEWORK_LINK(${CEF_TARGET} ${CEF_APP})
# Make the other helper app bundles.
MAKE_MACOSX_HELPERS(${CEF_TARGET} ${CEF_APP})
if(NOT ${CMAKE_GENERATOR} STREQUAL "Xcode")
# Manually process and copy over resource files.
# The Xcode generator handles this via the set_target_properties RESOURCE directive.
set(PREFIXES "mac/" "res/") # Remove these prefixes from input file paths.
COPY_MACOSX_RESOURCES("${CEFCLIENT_RESOURCES_SRCS}" "${PREFIXES}" "${CEF_TARGET}" "${CMAKE_CURRENT_SOURCE_DIR}" "${CEF_APP}")
endif()
endif()
#
# Windows configuration.
#
if(OS_WINDOWS)
# Executable target.
add_executable(${CEF_TARGET} WIN32 ${CEFCLIENT_SRCS})
add_dependencies(${CEF_TARGET} libcef_dll_wrapper)
target_link_libraries(${CEF_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS} "glu32.lib" "opengl32.lib")
if(USE_SANDBOX)
# Logical target used to link the cef_sandbox library.
ADD_LOGICAL_TARGET("cef_sandbox_lib" "${CEF_SANDBOX_LIB_DEBUG}" "${CEF_SANDBOX_LIB_RELEASE}")
target_link_libraries(${CEF_TARGET} cef_sandbox_lib ${CEF_SANDBOX_STANDARD_LIBS})
endif()
# Add the custom manifest files to the executable.
ADD_WINDOWS_MANIFEST("${CEF_TARGET}")
# Copy CEF binary and resource files to the target output directory.
COPY_FILES("${CEF_TARGET}" "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "${CEF_TARGET_OUT_DIR}")
COPY_FILES("${CEF_TARGET}" "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "${CEF_TARGET_OUT_DIR}")
endif()
# Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
#
# Source files.
#
# cefclient sources.
{{
'prefix': 'cefclient',
'set': 'CEFCLIENT_SRCS',
'includes': [
'cefclient_sources_common',
'cefclient_bundle_resources_common',
'cefclient_sources_win:WINDOWS',
'cefclient_sources_mac:MACOSX',
'cefclient_sources_linux:LINUX',
],
}}
# cefclient helper sources.
{{
'prefix': 'cefclient_helper',
'includes': [
'cefclient_sources_mac_helper:MACOSX',
],
}}
# cefclient resources.
{{
'prefix': 'cefclient_resources',
'set': 'CEFCLIENT_RESOURCES_SRCS',
'includes': [
'cefclient_bundle_resources_common',
'cefclient_bundle_resources_mac:MACOSX',
],
}}
#
# Shared configuration.
#
# Target executable names.
set(CEF_TARGET "cefclient")
if(OS_MACOSX)
set(CEF_HELPER_TARGET "cefclient Helper")
endif()
# Logical target used to link the libcef library.
ADD_LOGICAL_TARGET("libcef_lib" "${CEF_LIB_DEBUG}" "${CEF_LIB_RELEASE}")
# Determine the target output directory.
SET_CEF_TARGET_OUT_DIR()
#
# Linux configuration.
#
if(OS_LINUX)
# Find required libraries and update compiler/linker variables.
FIND_LINUX_LIBRARIES("gmodule-2.0 gtk+-2.0 gthread-2.0 gtk+-unix-print-2.0 gtkglext-1.0")
# Executable target.
add_executable(${CEF_TARGET} ${CEFCLIENT_SRCS})
add_dependencies(${CEF_TARGET} libcef_dll_wrapper)
target_link_libraries(${CEF_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS})
# Set rpath so that libraries can be placed next to the executable.
set_target_properties(${CEF_TARGET} PROPERTIES INSTALL_RPATH "$ORIGIN")
set_target_properties(${CEF_TARGET} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
set_target_properties(${CEF_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CEF_TARGET_OUT_DIR})
# Copy CEF binary and resource files to the target output directory.
COPY_FILES("${CEF_TARGET}" "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "${CEF_TARGET_OUT_DIR}")
COPY_FILES("${CEF_TARGET}" "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "${CEF_TARGET_OUT_DIR}")
# Copy cefclient resource files to the target output directory.
COPY_FILES("${CEF_TARGET}" "${CEFCLIENT_RESOURCES_SRCS}" "${CMAKE_CURRENT_SOURCE_DIR}" "${CEF_TARGET_OUT_DIR}")
# Rename the "res" directory to "files".
RENAME_DIRECTORY("${CEF_TARGET}" "${CEF_TARGET_OUT_DIR}/res" "${CEF_TARGET_OUT_DIR}/files")
# Set SUID permissions on the chrome-sandbox target.
SET_LINUX_SUID_PERMISSIONS("${CEF_TARGET}" "${CEF_TARGET_OUT_DIR}/chrome-sandbox")
endif()
#
# Mac OS X configuration.
#
if(OS_MACOSX)
# Output paths for the app bundles.
set(CEF_APP "${CEF_TARGET_OUT_DIR}/${CEF_TARGET}.app")
set(CEF_HELPER_APP "${CEF_TARGET_OUT_DIR}/${CEF_HELPER_TARGET}.app")
# Variable referenced from Info.plist files.
set(PRODUCT_NAME "${CEF_TARGET}")
# Helper executable target.
add_executable(${CEF_HELPER_TARGET} MACOSX_BUNDLE ${CEFCLIENT_HELPER_SRCS})
add_dependencies(${CEF_HELPER_TARGET} libcef_dll_wrapper)
target_link_libraries(${CEF_HELPER_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS})
set_target_properties(${CEF_HELPER_TARGET} PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/mac/helper-Info.plist
)
# Fix the framework link in the helper executable.
FIX_MACOSX_HELPER_FRAMEWORK_LINK(${CEF_HELPER_TARGET} ${CEF_HELPER_APP})
# Main executable target.
add_executable(${CEF_TARGET} MACOSX_BUNDLE ${CEFCLIENT_RESOURCES_SRCS} ${CEFCLIENT_SRCS})
add_dependencies(${CEF_TARGET} libcef_dll_wrapper "${CEF_HELPER_TARGET}")
target_link_libraries(${CEF_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS} "-framework OpenGL")
set_target_properties(${CEF_TARGET} PROPERTIES
RESOURCE "${CEFCLIENT_RESOURCES_SRCS}"
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/mac/Info.plist
)
# Copy files into the main app bundle.
add_custom_command(
TARGET ${CEF_TARGET}
POST_BUILD
# Copy the helper app bundle into the Frameworks directory.
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CEF_HELPER_APP}"
"${CEF_APP}/Contents/Frameworks/${CEF_HELPER_TARGET}.app"
# Copy the CEF framework into the Frameworks directory.
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CEF_BINARY_DIR}/Chromium Embedded Framework.framework"
"${CEF_APP}/Contents/Frameworks/Chromium Embedded Framework.framework"
VERBATIM
)
# Fix the framework link in the main executable.
FIX_MACOSX_MAIN_FRAMEWORK_LINK(${CEF_TARGET} ${CEF_APP})
# Make the other helper app bundles.
MAKE_MACOSX_HELPERS(${CEF_TARGET} ${CEF_APP})
if(NOT ${CMAKE_GENERATOR} STREQUAL "Xcode")
# Manually process and copy over resource files.
# The Xcode generator handles this via the set_target_properties RESOURCE directive.
set(PREFIXES "mac/" "res/") # Remove these prefixes from input file paths.
COPY_MACOSX_RESOURCES("${CEFCLIENT_RESOURCES_SRCS}" "${PREFIXES}" "${CEF_TARGET}" "${CMAKE_CURRENT_SOURCE_DIR}" "${CEF_APP}")
endif()
endif()
#
# Windows configuration.
#
if(OS_WINDOWS)
# Executable target.
add_executable(${CEF_TARGET} WIN32 ${CEFCLIENT_SRCS})
add_dependencies(${CEF_TARGET} libcef_dll_wrapper)
target_link_libraries(${CEF_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS} "glu32.lib" "opengl32.lib")
if(USE_SANDBOX)
# Logical target used to link the cef_sandbox library.
ADD_LOGICAL_TARGET("cef_sandbox_lib" "${CEF_SANDBOX_LIB_DEBUG}" "${CEF_SANDBOX_LIB_RELEASE}")
target_link_libraries(${CEF_TARGET} cef_sandbox_lib ${CEF_SANDBOX_STANDARD_LIBS})
endif()
# Add the custom manifest files to the executable.
ADD_WINDOWS_MANIFEST("${CEF_TARGET}")
# Copy CEF binary and resource files to the target output directory.
COPY_FILES("${CEF_TARGET}" "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "${CEF_TARGET_OUT_DIR}")
COPY_FILES("${CEF_TARGET}" "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "${CEF_TARGET_OUT_DIR}")
endif()

View File

@ -1,164 +1,164 @@
# Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
#
# Source files.
#
# cefsimple sources.
{{
'prefix': 'cefsimple',
'set': 'CEFSIMPLE_SRCS',
'includes': [
'cefsimple_sources_common',
'cefsimple_sources_win:WINDOWS',
'cefsimple_sources_mac:MACOSX',
'cefsimple_sources_linux:LINUX',
],
}}
# cefsimple helper sources.
{{
'prefix': 'cefsimple_helper',
'includes': [
'cefsimple_sources_mac_helper:MACOSX',
],
}}
# cefsimple resources.
{{
'prefix': 'cefsimple_resources',
'set': 'CEFSIMPLE_RESOURCES_SRCS',
'includes': [
'cefsimple_bundle_resources_mac:MACOSX',
],
}}
#
# Shared configuration.
#
# Target executable names.
set(CEF_TARGET "cefsimple")
if(OS_MACOSX)
set(CEF_HELPER_TARGET "cefsimple Helper")
endif()
# Logical target used to link the libcef library.
ADD_LOGICAL_TARGET("libcef_lib" "${CEF_LIB_DEBUG}" "${CEF_LIB_RELEASE}")
# Determine the target output directory.
SET_CEF_TARGET_OUT_DIR()
#
# Linux configuration.
#
if(OS_LINUX)
# Executable target.
add_executable(${CEF_TARGET} ${CEFSIMPLE_SRCS})
add_dependencies(${CEF_TARGET} libcef_dll_wrapper)
target_link_libraries(${CEF_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS})
# Set rpath so that libraries can be placed next to the executable.
set_target_properties(${CEF_TARGET} PROPERTIES INSTALL_RPATH "$ORIGIN")
set_target_properties(${CEF_TARGET} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
set_target_properties(${CEF_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CEF_TARGET_OUT_DIR})
# Copy binary and resource files to the target output directory.
COPY_FILES("${CEF_TARGET}" "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "${CEF_TARGET_OUT_DIR}")
COPY_FILES("${CEF_TARGET}" "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "${CEF_TARGET_OUT_DIR}")
# Set SUID permissions on the chrome-sandbox target.
SET_LINUX_SUID_PERMISSIONS("${CEF_TARGET}" "${CEF_TARGET_OUT_DIR}/chrome-sandbox")
endif()
#
# Mac OS X configuration.
#
if(OS_MACOSX)
# Output paths for the app bundles.
set(CEF_APP "${CEF_TARGET_OUT_DIR}/${CEF_TARGET}.app")
set(CEF_HELPER_APP "${CEF_TARGET_OUT_DIR}/${CEF_HELPER_TARGET}.app")
# Variable referenced from Info.plist files.
set(PRODUCT_NAME "${CEF_TARGET}")
# Helper executable target.
add_executable(${CEF_HELPER_TARGET} MACOSX_BUNDLE ${CEFSIMPLE_HELPER_SRCS})
add_dependencies(${CEF_HELPER_TARGET} libcef_dll_wrapper)
target_link_libraries(${CEF_HELPER_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS})
set_target_properties(${CEF_HELPER_TARGET} PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/mac/helper-Info.plist
)
# Fix the framework link in the helper executable.
FIX_MACOSX_HELPER_FRAMEWORK_LINK(${CEF_HELPER_TARGET} ${CEF_HELPER_APP})
# Main executable target.
add_executable(${CEF_TARGET} MACOSX_BUNDLE ${CEFSIMPLE_RESOURCES_SRCS} ${CEFSIMPLE_SRCS})
add_dependencies(${CEF_TARGET} libcef_dll_wrapper "${CEF_HELPER_TARGET}")
target_link_libraries(${CEF_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS})
set_target_properties(${CEF_TARGET} PROPERTIES
RESOURCE "${CEFSIMPLE_RESOURCES_SRCS}"
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/mac/Info.plist
)
# Copy files into the main app bundle.
add_custom_command(
TARGET ${CEF_TARGET}
POST_BUILD
# Copy the helper app bundle into the Frameworks directory.
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CEF_HELPER_APP}"
"${CEF_APP}/Contents/Frameworks/${CEF_HELPER_TARGET}.app"
# Copy the CEF framework into the Frameworks directory.
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CEF_BINARY_DIR}/Chromium Embedded Framework.framework"
"${CEF_APP}/Contents/Frameworks/Chromium Embedded Framework.framework"
VERBATIM
)
# Fix the framework link in the main executable.
FIX_MACOSX_MAIN_FRAMEWORK_LINK(${CEF_TARGET} ${CEF_APP})
# Make the other helper app bundles.
MAKE_MACOSX_HELPERS(${CEF_TARGET} ${CEF_APP})
if(NOT ${CMAKE_GENERATOR} STREQUAL "Xcode")
# Manually process and copy over resource files.
# The Xcode generator handles this via the set_target_properties RESOURCE directive.
set(PREFIXES "mac/") # Remove these prefixes from input file paths.
COPY_MACOSX_RESOURCES("${CEFSIMPLE_RESOURCES_SRCS}" "${PREFIXES}" "${CEF_TARGET}" "${CMAKE_CURRENT_SOURCE_DIR}" "${CEF_APP}")
endif()
endif()
#
# Windows configuration.
#
if(OS_WINDOWS)
# Executable target.
add_executable(${CEF_TARGET} WIN32 ${CEFSIMPLE_SRCS})
add_dependencies(${CEF_TARGET} libcef_dll_wrapper)
target_link_libraries(${CEF_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS})
if(USE_SANDBOX)
# Logical target used to link the cef_sandbox library.
ADD_LOGICAL_TARGET("cef_sandbox_lib" "${CEF_SANDBOX_LIB_DEBUG}" "${CEF_SANDBOX_LIB_RELEASE}")
target_link_libraries(${CEF_TARGET} cef_sandbox_lib ${CEF_SANDBOX_STANDARD_LIBS})
endif()
# Add the custom manifest files to the executable.
ADD_WINDOWS_MANIFEST("${CEF_TARGET}")
# Copy binary and resource files to the target output directory.
COPY_FILES("${CEF_TARGET}" "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "${CEF_TARGET_OUT_DIR}")
COPY_FILES("${CEF_TARGET}" "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "${CEF_TARGET_OUT_DIR}")
endif()
# Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
#
# Source files.
#
# cefsimple sources.
{{
'prefix': 'cefsimple',
'set': 'CEFSIMPLE_SRCS',
'includes': [
'cefsimple_sources_common',
'cefsimple_sources_win:WINDOWS',
'cefsimple_sources_mac:MACOSX',
'cefsimple_sources_linux:LINUX',
],
}}
# cefsimple helper sources.
{{
'prefix': 'cefsimple_helper',
'includes': [
'cefsimple_sources_mac_helper:MACOSX',
],
}}
# cefsimple resources.
{{
'prefix': 'cefsimple_resources',
'set': 'CEFSIMPLE_RESOURCES_SRCS',
'includes': [
'cefsimple_bundle_resources_mac:MACOSX',
],
}}
#
# Shared configuration.
#
# Target executable names.
set(CEF_TARGET "cefsimple")
if(OS_MACOSX)
set(CEF_HELPER_TARGET "cefsimple Helper")
endif()
# Logical target used to link the libcef library.
ADD_LOGICAL_TARGET("libcef_lib" "${CEF_LIB_DEBUG}" "${CEF_LIB_RELEASE}")
# Determine the target output directory.
SET_CEF_TARGET_OUT_DIR()
#
# Linux configuration.
#
if(OS_LINUX)
# Executable target.
add_executable(${CEF_TARGET} ${CEFSIMPLE_SRCS})
add_dependencies(${CEF_TARGET} libcef_dll_wrapper)
target_link_libraries(${CEF_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS})
# Set rpath so that libraries can be placed next to the executable.
set_target_properties(${CEF_TARGET} PROPERTIES INSTALL_RPATH "$ORIGIN")
set_target_properties(${CEF_TARGET} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
set_target_properties(${CEF_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CEF_TARGET_OUT_DIR})
# Copy binary and resource files to the target output directory.
COPY_FILES("${CEF_TARGET}" "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "${CEF_TARGET_OUT_DIR}")
COPY_FILES("${CEF_TARGET}" "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "${CEF_TARGET_OUT_DIR}")
# Set SUID permissions on the chrome-sandbox target.
SET_LINUX_SUID_PERMISSIONS("${CEF_TARGET}" "${CEF_TARGET_OUT_DIR}/chrome-sandbox")
endif()
#
# Mac OS X configuration.
#
if(OS_MACOSX)
# Output paths for the app bundles.
set(CEF_APP "${CEF_TARGET_OUT_DIR}/${CEF_TARGET}.app")
set(CEF_HELPER_APP "${CEF_TARGET_OUT_DIR}/${CEF_HELPER_TARGET}.app")
# Variable referenced from Info.plist files.
set(PRODUCT_NAME "${CEF_TARGET}")
# Helper executable target.
add_executable(${CEF_HELPER_TARGET} MACOSX_BUNDLE ${CEFSIMPLE_HELPER_SRCS})
add_dependencies(${CEF_HELPER_TARGET} libcef_dll_wrapper)
target_link_libraries(${CEF_HELPER_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS})
set_target_properties(${CEF_HELPER_TARGET} PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/mac/helper-Info.plist
)
# Fix the framework link in the helper executable.
FIX_MACOSX_HELPER_FRAMEWORK_LINK(${CEF_HELPER_TARGET} ${CEF_HELPER_APP})
# Main executable target.
add_executable(${CEF_TARGET} MACOSX_BUNDLE ${CEFSIMPLE_RESOURCES_SRCS} ${CEFSIMPLE_SRCS})
add_dependencies(${CEF_TARGET} libcef_dll_wrapper "${CEF_HELPER_TARGET}")
target_link_libraries(${CEF_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS})
set_target_properties(${CEF_TARGET} PROPERTIES
RESOURCE "${CEFSIMPLE_RESOURCES_SRCS}"
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/mac/Info.plist
)
# Copy files into the main app bundle.
add_custom_command(
TARGET ${CEF_TARGET}
POST_BUILD
# Copy the helper app bundle into the Frameworks directory.
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CEF_HELPER_APP}"
"${CEF_APP}/Contents/Frameworks/${CEF_HELPER_TARGET}.app"
# Copy the CEF framework into the Frameworks directory.
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CEF_BINARY_DIR}/Chromium Embedded Framework.framework"
"${CEF_APP}/Contents/Frameworks/Chromium Embedded Framework.framework"
VERBATIM
)
# Fix the framework link in the main executable.
FIX_MACOSX_MAIN_FRAMEWORK_LINK(${CEF_TARGET} ${CEF_APP})
# Make the other helper app bundles.
MAKE_MACOSX_HELPERS(${CEF_TARGET} ${CEF_APP})
if(NOT ${CMAKE_GENERATOR} STREQUAL "Xcode")
# Manually process and copy over resource files.
# The Xcode generator handles this via the set_target_properties RESOURCE directive.
set(PREFIXES "mac/") # Remove these prefixes from input file paths.
COPY_MACOSX_RESOURCES("${CEFSIMPLE_RESOURCES_SRCS}" "${PREFIXES}" "${CEF_TARGET}" "${CMAKE_CURRENT_SOURCE_DIR}" "${CEF_APP}")
endif()
endif()
#
# Windows configuration.
#
if(OS_WINDOWS)
# Executable target.
add_executable(${CEF_TARGET} WIN32 ${CEFSIMPLE_SRCS})
add_dependencies(${CEF_TARGET} libcef_dll_wrapper)
target_link_libraries(${CEF_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS})
if(USE_SANDBOX)
# Logical target used to link the cef_sandbox library.
ADD_LOGICAL_TARGET("cef_sandbox_lib" "${CEF_SANDBOX_LIB_DEBUG}" "${CEF_SANDBOX_LIB_RELEASE}")
target_link_libraries(${CEF_TARGET} cef_sandbox_lib ${CEF_SANDBOX_STANDARD_LIBS})
endif()
# Add the custom manifest files to the executable.
ADD_WINDOWS_MANIFEST("${CEF_TARGET}")
# Copy binary and resource files to the target output directory.
COPY_FILES("${CEF_TARGET}" "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "${CEF_TARGET_OUT_DIR}")
COPY_FILES("${CEF_TARGET}" "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "${CEF_TARGET_OUT_DIR}")
endif()

View File

@ -1867,7 +1867,8 @@ class V8RendererTest : public ClientApp::RenderDelegate,
void DevToolsLoadHook(CefRefPtr<CefBrowser> browser) {
EXPECT_TRUE(browser->IsPopup());
CefRefPtr<CefV8Context> context = browser->GetMainFrame()->GetV8Context();
CefRefPtr<CefFrame> frame = browser->GetMainFrame();
CefRefPtr<CefV8Context> context = frame->GetV8Context();
static const char* kFuncName = "DevToolsLoaded";
class Handler : public CefV8Handler {
@ -1905,28 +1906,13 @@ class V8RendererTest : public ClientApp::RenderDelegate,
kFuncName, func, V8_PROPERTY_ATTRIBUTE_NONE));
EXPECT_TRUE(context->Exit());
// Call DevToolsLoaded() when the DevTools window has completed loading.
// If the loading is already complete call DevToolsLoaded() immediately.
// There is no good indicator that |InspectorFrontendHost.loadCompleted| has
// already been called so we depend on potentially fragile loading behavior:
// WebInspector.Main._createAppUI calls InspectorFrontendHost.loadCompleted
// and then (indirectly) calls InspectorBackend.setConnection which sets
// InspectorBackend._connection.
std::string jsCode = "(function() {"
" if (InspectorBackend._connection) {"
" window.DevToolsLoaded();"
" } else {"
" var oldLoadCompleted = InspectorFrontendHost.loadCompleted;"
" InspectorFrontendHost.loadCompleted = function() {"
" oldLoadCompleted.call(InspectorFrontendHost);"
" window.DevToolsLoaded();"
" };"
" }"
"})();";
CefRefPtr<CefV8Value> retval;
CefRefPtr<CefV8Exception> exception;
EXPECT_TRUE(context->Eval(CefString(jsCode), retval, exception));
// Dismiss the DevTools window after 500ms. It would be better to hook the
// DevTools JS to receive notification of when loading is complete but that
// is no longer possible.
CefPostDelayedTask(TID_RENDERER,
base::Bind(&CefFrame::ExecuteJavaScript, frame.get(),
"window.DevToolsLoaded()", frame->GetURL(), 0),
500);
}
void DevToolsLoaded(CefRefPtr<CefBrowser> browser) {

View File

@ -235,6 +235,8 @@
'Resources/devtools_resources.pak',
'Resources/icudtl.dat',
'Resources/locales/',
'Resources/natives_blob.bin',
'Resources/snapshot_blob.bin',
'$(BUILDTYPE)/chrome-sandbox',
'$(BUILDTYPE)/libcef.so',
'$(BUILDTYPE)/libffmpegsumo.so',
@ -464,6 +466,8 @@
'Resources/devtools_resources.pak',
'Resources/icudtl.dat',
'Resources/locales/',
'Resources/natives_blob.bin',
'Resources/snapshot_blob.bin',
'$(BUILDTYPE)/chrome-sandbox',
'$(BUILDTYPE)/libcef.so',
'$(BUILDTYPE)/libffmpegsumo.so',

View File

@ -14,6 +14,10 @@ Required components:
* Unicode support
icudtl.dat
* V8 initial snapshot
natives_blob.bin
snapshot_blob.bin
Optional components:
* Localized resources

View File

@ -24,6 +24,7 @@ cefclient.app/
devtools_resources.pak <=^
crash_inspector, crash_report_sender <= breakpad support
icudtl.dat <= unicode support
natives_blob.bin, snapshot_blob.bin <= V8 initial snapshot
en.lproj/, ... <= locale-specific resources and strings
Info.plist
cefclient Helper.app/
@ -75,6 +76,10 @@ Required components:
* Unicode support
Chromium Embedded Framework.framework/Resources/icudtl.dat
* V8 initial snapshot
Chromium Embedded Framework.framework/Resources/natives_blob.bin
Chromium Embedded Framework.framework/Resources/snapshot_blob.bin
Optional components:
* Localized resources

View File

@ -85,8 +85,7 @@ if bool(int(os.environ.get('WIN_CUSTOM_TOOLCHAIN', '0'))):
# build output directory.
# When using the default toolchain this is done by GenerateEnvironmentFiles
# in src/tools/gyp/pylib/gyp/msvs_emulation.py.
setup_script = \
os.path.join(src_dir, 'build/toolchain/win/setup_toolchain.py')
setup_script = os.path.join(cef_dir, 'tools/setup_toolchain.py')
win_tool_script = os.path.join(src_dir, 'tools/gyp/pylib/gyp/win_tool.py')
out_dirs = ['Debug', 'Debug_x64', 'Release', 'Release_x64']
for out_dir in out_dirs:

View File

@ -660,6 +660,8 @@ elif platform == 'linux':
copy_file(os.path.join(build_dir, 'cef_200_percent.pak'), dst_dir, options.quiet)
copy_file(os.path.join(build_dir, 'devtools_resources.pak'), dst_dir, options.quiet)
copy_file(os.path.join(build_dir, 'icudtl.dat'), dst_dir, options.quiet)
copy_file(os.path.join(build_dir, 'natives_blob.bin'), dst_dir, options.quiet)
copy_file(os.path.join(build_dir, 'snapshot_blob.bin'), dst_dir, options.quiet)
copy_dir(os.path.join(build_dir, 'locales'), os.path.join(dst_dir, 'locales'), options.quiet)
if mode == 'standard':

112
tools/setup_toolchain.py Normal file
View File

@ -0,0 +1,112 @@
# Copyright (c) 2013 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.
import errno
import os
import re
import subprocess
import sys
"""
Copies the given "win tool" (which the toolchain uses to wrap compiler
invocations) and the environment blocks for the 32-bit and 64-bit builds on
Windows to the build directory.
The arguments are the visual studio install location and the location of the
win tool. The script assumes that the root build directory is the current dir
and the files will be written to the current directory.
"""
def ExtractImportantEnvironment():
"""Extracts environment variables required for the toolchain from the
current environment."""
# This list should be kept synchronized with _ExtractImportantEnvironment from
# tools/gyp/pylib/gyp/msvs_emulation.py.
envvars_to_save = (
'goma_.*', # TODO(scottmg): This is ugly, but needed for goma.
'include', # Needed by midl compiler.
'lib',
'libpath',
'path',
'pathext',
'systemroot',
'temp',
'tmp',
)
result = {}
for envvar in envvars_to_save:
if envvar in os.environ:
envvar = envvar.lower()
if envvar == 'path':
# Our own rules (for running gyp-win-tool) and other actions in
# Chromium rely on python being in the path. Add the path to this
# python here so that if it's not in the path when ninja is run
# later, python will still be found.
result[envvar.upper()] = os.path.dirname(sys.executable) + \
os.pathsep + os.environ[envvar]
else:
result[envvar.upper()] = os.environ[envvar]
for required in ('SYSTEMROOT', 'TEMP', 'TMP'):
if required not in result:
raise Exception('Environment variable "%s" '
'required to be set to valid path' % required)
return result
def FormatAsEnvironmentBlock(envvar_dict):
"""Format as an 'environment block' directly suitable for CreateProcess.
Briefly this is a list of key=value\0, terminated by an additional \0. See
CreateProcess documentation for more details."""
block = ''
nul = '\0'
for key, value in envvar_dict.iteritems():
block += key + '=' + value + nul
block += nul
return block
def CopyTool(source_path):
"""Copies the given tool to the current directory, including a warning not
to edit it."""
with open(source_path) as source_file:
tool_source = source_file.readlines()
# Add header and write it out to the current directory (which should be the
# root build dir).
with open("gyp-win-tool", 'w') as tool_file:
tool_file.write(''.join([tool_source[0],
'# Generated by setup_toolchain.py do not edit.\n']
+ tool_source[1:]))
if len(sys.argv) != 4:
print('Usage setup_toolchain.py '
'<visual studio path> <win tool path> <win sdk path>')
sys.exit(2)
vs_path = sys.argv[1]
tool_source = sys.argv[2]
win_sdk_path = sys.argv[3]
CopyTool(tool_source)
important_env_vars = ExtractImportantEnvironment()
path = important_env_vars["PATH"].split(";")
# Add 32-bit compiler path to the beginning and write the block.
path32 = [os.path.join(vs_path, "VC\\BIN\\amd64_x86")] + \
[os.path.join(win_sdk_path, "bin\\x86")] + \
path
important_env_vars["PATH"] = ";".join(path32)
environ = FormatAsEnvironmentBlock(important_env_vars)
with open('environment.x86', 'wb') as env_file:
env_file.write(environ)
# Add 64-bit compiler path to the beginning and write the block.
path64 = [os.path.join(vs_path, "VC\\BIN\\amd64")] + \
[os.path.join(win_sdk_path, "bin\\x64")] + \
path
important_env_vars["PATH"] = ";".join(path64)
environ = FormatAsEnvironmentBlock(important_env_vars)
with open('environment.x64', 'wb') as env_file:
env_file.write(environ)