/clang-analyze.out
-/dependencies64/boost/stage/lib/libboost_wave-vc120-mt-gd-1_57.lib
+/dependencies64/cef/bin/linux/libcef.so
/build
#pragma once
+#include <boost/thread/lock_guard.hpp>
+
namespace caspar {
template<typename T, typename F>
#include "../diagnostics/call_context.h"
#include <common/env.h>
+#include <common/os/filesystem.h>
#include <boost/thread/mutex.hpp>
#include <boost/thread/lock_guard.hpp>
{
auto p = path(basepath.wstring() + file_extension);
- if (exists(p))
+ if (find_case_insensitive(p.wstring()))
return rec;
}
}
-// Copyright (c) 2008-2014 Marshall A. Greenblatt. Portions Copyright (c)
+// Copyright (c) 2008-2013 Marshall A. Greenblatt. Portions Copyright (c)
// 2006-2009 Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
-Chromium Embedded Framework (CEF) Standard Binary Distribution for Windows
+Chromium Embedded Framework (CEF) Standard Binary Distribution for Linux
-------------------------------------------------------------------------------
-Date: April 30, 2015
+Date: October 13, 2014
-CEF Version: 3.2378.1268.g4715a16
-CEF URL: https://bitbucket.org/chromiumembedded/cef.git
- @4715a1644e292e191d3840b59a74f821be91daec
+CEF Version: 3.1750.1805
+CEF URL: https://chromiumembedded@bitbucket.org/chromiumembedded/branches-1750-cef3.git@1805
-Chromium Verison: 44.0.2378.0
-Chromium URL: https://chromium.googlesource.com/chromium/src.git
- @c03558c9998c74e25c302a1f5e9e164b572b9373
+Chromium Verison: 33.0.1750.170
+Chromium URL: https://chromium.googlesource.com/chromium/src.git@7120fdb1f88ea2e8b81641aee3fec6c8fa256541
This distribution contains all components necessary to build and distribute an
-application using CEF on the Windows platform. Please see the LICENSING
+application using CEF on the Linux platform. Please see the LICENSING
section of this document for licensing terms and conditions.
using the files in this distribution. This application demonstrates
the minimal functionality required to create a browser window.
-Debug Contains libcef.dll, libcef.lib and other components required to
- build and run the debug version of CEF-based applications. By
- default these files should be placed in the same directory as the
- executable and will be copied there as part of the build process.
+Debug Contains libcef.so and other components required to run the debug
+ version of CEF-based applications. By default these files should be
+ placed in the same directory as the executable and will be copied
+ there as part of the build process.
include Contains all required CEF header files.
libcef_dll Contains the source code for the libcef_dll_wrapper static library
that all applications using the CEF C++ API must link against.
-Release Contains libcef.dll, libcef.lib and other components required to
- build and run the release version of CEF-based applications. By
- default these files should be placed in the same directory as the
- executable and will be copied there as part of the build process.
+Release Contains libcef.so and other components required to run the release
+ version of CEF-based applications. By default these files should be
+ placed in the same directory as the executable and will be copied
+ there as part of the build process.
-Resources Contains resources required by libcef.dll. By default these files
- should be placed in the same directory as libcef.dll. By default
- these files should be placed in the same directory as libcef.dll
- and will be copied there as part of the build process.
+Resources Contains resources required by libcef.so. By default these files
+ should be placed in the same directory as libcef.so and will be
+ copied there as part of the build process.
USAGE
-----
-Building using CMake:
- CMake can be used to generate project files in many different formats. See
- usage instructions at the top of the CMakeLists.txt file.
+Run 'build.sh Debug' to build the cefclient target in Debug mode.
Please visit the CEF Website for additional usage information.
-https://bitbucket.org/chromiumembedded/cef/
+http://code.google.com/p/chromiumembedded
REDISTRIBUTION
Required components:
* CEF core library
- libcef.dll
-
-* Unicode support
- icudtl.dat
+ libcef.so
Optional components:
* Localized resources
locales/
Note: Contains localized strings for WebKit UI controls. A .pak file is loaded
- from this folder based on the CefSettings.locale value. Only configured
- locales need to be distributed. If no locale is configured the default locale
- of "en-US" will be used. Locale file loading can be disabled completely using
- CefSettings.pack_loading_disabled. The locales folder path can be customized
- using CefSettings.locales_dir_path.
+ from this folder based on the value of environment variables which are read
+ with the following precedence order: LANGUAGE, LC_ALL, LC_MESSAGES and LANG.
+ Only configured locales need to be distributed. If no locale is configured the
+ default locale of "en-US" will be used. Locale file loading can be disabled
+ completely using CefSettings.pack_loading_disabled. The locales folder path
+ can be customized using CefSettings.locales_dir_path.
* Other resources
cef.pak
- cef_100_percent.pak
- cef_200_percent.pak
devtools_resources.pak
Note: Contains WebKit image and inspector resources. Pack file loading can be
disabled completely using CefSettings.pack_loading_disabled. The resources
directory path can be customized using CefSettings.resources_dir_path.
* FFmpeg audio and video support
- ffmpegsumo.dll
+ libffmpegsumo.so
Note: Without this component HTML5 audio and video will not function.
-* Angle and Direct3D support
- d3dcompiler_43.dll (required for Windows XP)
- d3dcompiler_47.dll (required for Windows Vista and newer)
- libEGL.dll
- libGLESv2.dll
- Note: Without these components HTML5 accelerated content like 2D canvas, 3D
- CSS and WebGL will not function.
-
-* Windows Vista 64-bit sandbox support (32-bit distributions only)
- wow_helper.exe
- Note: Without this component the 32-bit build of CEF will not run on 64-bit
- Vista machines with the sandbox enabled.
-
LICENSING
---------
--- /dev/null
+/lib/x86_64-linux-gnu/libudev.so.1
\ No newline at end of file
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This is a low level implementation of atomic semantics for reference
-// counting. Please use cef_ref_counted.h directly instead.
-//
-// The Chromium implementation includes annotations to avoid some false
-// positives when using data race detection tools. Annotations are not
-// currently supported by the CEF implementation.
-
-#ifndef CEF_INCLUDE_BASE_CEF_ATOMIC_REF_COUNT_H_
-#define CEF_INCLUDE_BASE_CEF_ATOMIC_REF_COUNT_H_
-#pragma once
-
-#if defined(BASE_ATOMIC_REF_COUNT_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/atomic_ref_count.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include "include/base/cef_atomicops.h"
-
-// Annotations are not currently supported.
-#define ANNOTATE_HAPPENS_BEFORE(obj) /* empty */
-#define ANNOTATE_HAPPENS_AFTER(obj) /* empty */
-
-namespace base {
-
-typedef subtle::Atomic32 AtomicRefCount;
-
-// Increment a reference count by "increment", which must exceed 0.
-inline void AtomicRefCountIncN(volatile AtomicRefCount *ptr,
- AtomicRefCount increment) {
- subtle::NoBarrier_AtomicIncrement(ptr, increment);
-}
-
-// Decrement a reference count by "decrement", which must exceed 0,
-// and return whether the result is non-zero.
-// Insert barriers to ensure that state written before the reference count
-// became zero will be visible to a thread that has just made the count zero.
-inline bool AtomicRefCountDecN(volatile AtomicRefCount *ptr,
- AtomicRefCount decrement) {
- ANNOTATE_HAPPENS_BEFORE(ptr);
- bool res = (subtle::Barrier_AtomicIncrement(ptr, -decrement) != 0);
- if (!res) {
- ANNOTATE_HAPPENS_AFTER(ptr);
- }
- return res;
-}
-
-// Increment a reference count by 1.
-inline void AtomicRefCountInc(volatile AtomicRefCount *ptr) {
- base::AtomicRefCountIncN(ptr, 1);
-}
-
-// Decrement a reference count by 1 and return whether the result is non-zero.
-// Insert barriers to ensure that state written before the reference count
-// became zero will be visible to a thread that has just made the count zero.
-inline bool AtomicRefCountDec(volatile AtomicRefCount *ptr) {
- return base::AtomicRefCountDecN(ptr, 1);
-}
-
-// Return whether the reference count is one. If the reference count is used
-// in the conventional way, a refrerence count of 1 implies that the current
-// thread owns the reference and no other thread shares it. This call performs
-// the test for a reference count of one, and performs the memory barrier
-// needed for the owning thread to act on the object, knowing that it has
-// exclusive access to the object.
-inline bool AtomicRefCountIsOne(volatile AtomicRefCount *ptr) {
- bool res = (subtle::Acquire_Load(ptr) == 1);
- if (res) {
- ANNOTATE_HAPPENS_AFTER(ptr);
- }
- return res;
-}
-
-// Return whether the reference count is zero. With conventional object
-// referencing counting, the object will be destroyed, so the reference count
-// should never be zero. Hence this is generally used for a debug check.
-inline bool AtomicRefCountIsZero(volatile AtomicRefCount *ptr) {
- bool res = (subtle::Acquire_Load(ptr) == 0);
- if (res) {
- ANNOTATE_HAPPENS_AFTER(ptr);
- }
- return res;
-}
-
-} // namespace base
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_ATOMIC_REF_COUNT_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// For atomic operations on reference counts, see cef_atomic_ref_count.h.
-
-// The routines exported by this module are subtle. If you use them, even if
-// you get the code right, it will depend on careful reasoning about atomicity
-// and memory ordering; it will be less readable, and harder to maintain. If
-// you plan to use these routines, you should have a good reason, such as solid
-// evidence that performance would otherwise suffer, or there being no
-// alternative. You should assume only properties explicitly guaranteed by the
-// specifications in this file. You are almost certainly _not_ writing code
-// just for the x86; if you assume x86 semantics, x86 hardware bugs and
-// implementations on other archtectures will cause your code to break. If you
-// do not know what you are doing, avoid these routines, and use a Mutex.
-//
-// It is incorrect to make direct assignments to/from an atomic variable.
-// You should use one of the Load or Store routines. The NoBarrier
-// versions are provided when no barriers are needed:
-// NoBarrier_Store()
-// NoBarrier_Load()
-// Although there are currently no compiler enforcement, you are encouraged
-// to use these.
-//
-
-#ifndef CEF_INCLUDE_BASE_CEF_ATOMICOPS_H_
-#define CEF_INCLUDE_BASE_CEF_ATOMICOPS_H_
-#pragma once
-
-#if defined(BASE_ATOMICOPS_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/atomicops.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include <stdint.h>
-
-#include "include/base/cef_build.h"
-
-#if defined(OS_WIN) && defined(ARCH_CPU_64_BITS)
-// windows.h #defines this (only on x64). This causes problems because the
-// public API also uses MemoryBarrier at the public name for this fence. So, on
-// X64, undef it, and call its documented
-// (http://msdn.microsoft.com/en-us/library/windows/desktop/ms684208.aspx)
-// implementation directly.
-#undef MemoryBarrier
-#endif
-
-namespace base {
-namespace subtle {
-
-typedef int32_t Atomic32;
-#ifdef ARCH_CPU_64_BITS
-// We need to be able to go between Atomic64 and AtomicWord implicitly. This
-// means Atomic64 and AtomicWord should be the same type on 64-bit.
-#if defined(__ILP32__) || defined(OS_NACL)
-// NaCl's intptr_t is not actually 64-bits on 64-bit!
-// http://code.google.com/p/nativeclient/issues/detail?id=1162
-typedef int64_t Atomic64;
-#else
-typedef intptr_t Atomic64;
-#endif
-#endif
-
-// Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or
-// Atomic64 routines below, depending on your architecture.
-typedef intptr_t AtomicWord;
-
-// Atomically execute:
-// result = *ptr;
-// if (*ptr == old_value)
-// *ptr = new_value;
-// return result;
-//
-// I.e., replace "*ptr" with "new_value" if "*ptr" used to be "old_value".
-// Always return the old value of "*ptr"
-//
-// This routine implies no memory barriers.
-Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value);
-
-// Atomically store new_value into *ptr, returning the previous value held in
-// *ptr. This routine implies no memory barriers.
-Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr, Atomic32 new_value);
-
-// Atomically increment *ptr by "increment". Returns the new value of
-// *ptr with the increment applied. This routine implies no memory barriers.
-Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr, Atomic32 increment);
-
-Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
- Atomic32 increment);
-
-// These following lower-level operations are typically useful only to people
-// implementing higher-level synchronization operations like spinlocks,
-// mutexes, and condition-variables. They combine CompareAndSwap(), a load, or
-// a store with appropriate memory-ordering instructions. "Acquire" operations
-// ensure that no later memory access can be reordered ahead of the operation.
-// "Release" operations ensure that no previous memory access can be reordered
-// after the operation. "Barrier" operations have both "Acquire" and "Release"
-// semantics. A MemoryBarrier() has "Barrier" semantics, but does no memory
-// access.
-Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value);
-Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value);
-
-void MemoryBarrier();
-void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value);
-void Acquire_Store(volatile Atomic32* ptr, Atomic32 value);
-void Release_Store(volatile Atomic32* ptr, Atomic32 value);
-
-Atomic32 NoBarrier_Load(volatile const Atomic32* ptr);
-Atomic32 Acquire_Load(volatile const Atomic32* ptr);
-Atomic32 Release_Load(volatile const Atomic32* ptr);
-
-// 64-bit atomic operations (only available on 64-bit processors).
-#ifdef ARCH_CPU_64_BITS
-Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value);
-Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr, Atomic64 new_value);
-Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr, Atomic64 increment);
-Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr, Atomic64 increment);
-
-Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value);
-Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value);
-void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value);
-void Acquire_Store(volatile Atomic64* ptr, Atomic64 value);
-void Release_Store(volatile Atomic64* ptr, Atomic64 value);
-Atomic64 NoBarrier_Load(volatile const Atomic64* ptr);
-Atomic64 Acquire_Load(volatile const Atomic64* ptr);
-Atomic64 Release_Load(volatile const Atomic64* ptr);
-#endif // ARCH_CPU_64_BITS
-
-} // namespace subtle
-} // namespace base
-
-// Include our platform specific implementation.
-#if defined(OS_WIN) && defined(COMPILER_MSVC) && defined(ARCH_CPU_X86_FAMILY)
-#include "include/base/internal/cef_atomicops_x86_msvc.h"
-#elif defined(OS_MACOSX)
-#include "include/base/internal/cef_atomicops_mac.h"
-#elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY)
-#include "include/base/internal/cef_atomicops_x86_gcc.h"
-#else
-#error "Atomic operations are not supported on your platform"
-#endif
-
-// On some platforms we need additional declarations to make
-// AtomicWord compatible with our other Atomic* types.
-#if defined(OS_MACOSX) || defined(OS_OPENBSD)
-#include "include/base/internal/cef_atomicops_atomicword_compat.h"
-#endif
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_ATOMICOPS_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef CEF_INCLUDE_BASE_CEF_BASICTYPES_H_
-#define CEF_INCLUDE_BASE_CEF_BASICTYPES_H_
-#pragma once
-
-#if defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/basictypes.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include <limits.h> // For UINT_MAX
-#include <stddef.h> // For size_t
-
-#include "include/base/cef_build.h"
-
-// The NSPR system headers define 64-bit as |long| when possible, except on
-// Mac OS X. In order to not have typedef mismatches, we do the same on LP64.
-//
-// On Mac OS X, |long long| is used for 64-bit types for compatibility with
-// <inttypes.h> format macros even in the LP64 model.
-#if defined(__LP64__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
-typedef long int64; // NOLINT(runtime/int)
-typedef unsigned long uint64; // NOLINT(runtime/int)
-#else
-typedef long long int64; // NOLINT(runtime/int)
-typedef unsigned long long uint64; // NOLINT(runtime/int)
-#endif
-
-// TODO: Remove these type guards. These are to avoid conflicts with
-// obsolete/protypes.h in the Gecko SDK.
-#ifndef _INT32
-#define _INT32
-typedef int int32;
-#endif
-
-// TODO: Remove these type guards. These are to avoid conflicts with
-// obsolete/protypes.h in the Gecko SDK.
-#ifndef _UINT32
-#define _UINT32
-typedef unsigned int uint32;
-#endif
-
-// UTF-16 character type
-#ifndef char16
-#if defined(WIN32)
-typedef wchar_t char16;
-#else
-typedef unsigned short char16;
-#endif
-#endif
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_BASICTYPES_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef CEF_INCLUDE_BASE_CEF_BIND_H_
-#define CEF_INCLUDE_BASE_CEF_BIND_H_
-#pragma once
-
-#if defined(BASE_BIND_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/bind.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include "include/base/internal/cef_bind_internal.h"
-#include "include/base/internal/cef_callback_internal.h"
-
-// -----------------------------------------------------------------------------
-// Usage documentation
-// -----------------------------------------------------------------------------
-//
-// See base/cef_callback.h for documentation.
-//
-//
-// -----------------------------------------------------------------------------
-// Implementation notes
-// -----------------------------------------------------------------------------
-//
-// If you're reading the implementation, before proceeding further, you should
-// read the top comment of base/bind_internal.h for a definition of common
-// terms and concepts.
-//
-// RETURN TYPES
-//
-// Though Bind()'s result is meant to be stored in a Callback<> type, it
-// cannot actually return the exact type without requiring a large amount
-// of extra template specializations. The problem is that in order to
-// discern the correct specialization of Callback<>, Bind would need to
-// unwrap the function signature to determine the signature's arity, and
-// whether or not it is a method.
-//
-// Each unique combination of (arity, function_type, num_prebound) where
-// function_type is one of {function, method, const_method} would require
-// one specialization. We eventually have to do a similar number of
-// specializations anyways in the implementation (see the Invoker<>,
-// classes). However, it is avoidable in Bind if we return the result
-// via an indirection like we do below.
-//
-// TODO(ajwong): We might be able to avoid this now, but need to test.
-//
-// It is possible to move most of the COMPILE_ASSERT asserts into BindState<>,
-// but it feels a little nicer to have the asserts here so people do not
-// need to crack open bind_internal.h. On the other hand, it makes Bind()
-// harder to read.
-
-namespace base {
-
-template <typename Functor>
-base::Callback<
- 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 cef_internal::FunctorTraits<Functor>::RunnableType RunnableType;
- typedef typename cef_internal::FunctorTraits<Functor>::RunType RunType;
-
- typedef cef_internal::BindState<RunnableType, RunType, void()> BindState;
-
-
- return Callback<typename BindState::UnboundRunType>(
- new BindState(cef_internal::MakeRunnable(functor)));
-}
-
-template <typename Functor, typename P1>
-base::Callback<
- 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 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 cef_internal::FunctionTraits<typename RunnableType::RunType>
- BoundFunctorTraits;
-
- // Do not allow binding a non-const reference parameter. Non-const reference
- // parameters are disallowed by the Google style guide. Also, binding a
- // non-const reference parameter can make for subtle bugs because the
- // invoked function will receive a reference to the stored copy of the
- // argument and not the original.
- COMPILE_ASSERT(
- !(is_non_const_reference<typename BoundFunctorTraits::A1Type>::value ),
- do_not_bind_functions_with_nonconst_ref);
-
- // For methods, we need to be careful for parameter 1. We do not require
- // a scoped_refptr because BindState<> itself takes care of AddRef() for
- // methods. We also disallow binding of an array as the method's target
- // object.
- COMPILE_ASSERT(
- cef_internal::HasIsMethodTag<RunnableType>::value ||
- !cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
- p1_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||
- !is_array<P1>::value,
- first_bound_argument_to_method_cannot_be_array);
- typedef cef_internal::BindState<RunnableType, RunType,
- void(typename cef_internal::CallbackParamTraits<P1>::StorageType)> BindState;
-
-
- return Callback<typename BindState::UnboundRunType>(
- new BindState(cef_internal::MakeRunnable(functor), p1));
-}
-
-template <typename Functor, typename P1, typename P2>
-base::Callback<
- 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 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 cef_internal::FunctionTraits<typename RunnableType::RunType>
- BoundFunctorTraits;
-
- // Do not allow binding a non-const reference parameter. Non-const reference
- // parameters are disallowed by the Google style guide. Also, binding a
- // non-const reference parameter can make for subtle bugs because the
- // invoked function will receive a reference to the stored copy of the
- // argument and not the original.
- COMPILE_ASSERT(
- !(is_non_const_reference<typename BoundFunctorTraits::A1Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A2Type>::value ),
- do_not_bind_functions_with_nonconst_ref);
-
- // For methods, we need to be careful for parameter 1. We do not require
- // a scoped_refptr because BindState<> itself takes care of AddRef() for
- // methods. We also disallow binding of an array as the method's target
- // object.
- COMPILE_ASSERT(
- cef_internal::HasIsMethodTag<RunnableType>::value ||
- !cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
- p1_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||
- !is_array<P1>::value,
- first_bound_argument_to_method_cannot_be_array);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
- p2_is_refcounted_type_and_needs_scoped_refptr);
- 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(cef_internal::MakeRunnable(functor), p1, p2));
-}
-
-template <typename Functor, typename P1, typename P2, typename P3>
-base::Callback<
- 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 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 cef_internal::FunctionTraits<typename RunnableType::RunType>
- BoundFunctorTraits;
-
- // Do not allow binding a non-const reference parameter. Non-const reference
- // parameters are disallowed by the Google style guide. Also, binding a
- // non-const reference parameter can make for subtle bugs because the
- // invoked function will receive a reference to the stored copy of the
- // argument and not the original.
- COMPILE_ASSERT(
- !(is_non_const_reference<typename BoundFunctorTraits::A1Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A2Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A3Type>::value ),
- do_not_bind_functions_with_nonconst_ref);
-
- // For methods, we need to be careful for parameter 1. We do not require
- // a scoped_refptr because BindState<> itself takes care of AddRef() for
- // methods. We also disallow binding of an array as the method's target
- // object.
- COMPILE_ASSERT(
- cef_internal::HasIsMethodTag<RunnableType>::value ||
- !cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
- p1_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||
- !is_array<P1>::value,
- first_bound_argument_to_method_cannot_be_array);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
- p2_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,
- p3_is_refcounted_type_and_needs_scoped_refptr);
- 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(cef_internal::MakeRunnable(functor), p1, p2, p3));
-}
-
-template <typename Functor, typename P1, typename P2, typename P3, typename P4>
-base::Callback<
- 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 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 cef_internal::FunctionTraits<typename RunnableType::RunType>
- BoundFunctorTraits;
-
- // Do not allow binding a non-const reference parameter. Non-const reference
- // parameters are disallowed by the Google style guide. Also, binding a
- // non-const reference parameter can make for subtle bugs because the
- // invoked function will receive a reference to the stored copy of the
- // argument and not the original.
- COMPILE_ASSERT(
- !(is_non_const_reference<typename BoundFunctorTraits::A1Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A2Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A3Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A4Type>::value ),
- do_not_bind_functions_with_nonconst_ref);
-
- // For methods, we need to be careful for parameter 1. We do not require
- // a scoped_refptr because BindState<> itself takes care of AddRef() for
- // methods. We also disallow binding of an array as the method's target
- // object.
- COMPILE_ASSERT(
- cef_internal::HasIsMethodTag<RunnableType>::value ||
- !cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
- p1_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||
- !is_array<P1>::value,
- first_bound_argument_to_method_cannot_be_array);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
- p2_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,
- p3_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P4>::value,
- p4_is_refcounted_type_and_needs_scoped_refptr);
- 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(cef_internal::MakeRunnable(functor), p1, p2, p3, p4));
-}
-
-template <typename Functor, typename P1, typename P2, typename P3, typename P4,
- typename P5>
-base::Callback<
- 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 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 cef_internal::FunctionTraits<typename RunnableType::RunType>
- BoundFunctorTraits;
-
- // Do not allow binding a non-const reference parameter. Non-const reference
- // parameters are disallowed by the Google style guide. Also, binding a
- // non-const reference parameter can make for subtle bugs because the
- // invoked function will receive a reference to the stored copy of the
- // argument and not the original.
- COMPILE_ASSERT(
- !(is_non_const_reference<typename BoundFunctorTraits::A1Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A2Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A3Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A4Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A5Type>::value ),
- do_not_bind_functions_with_nonconst_ref);
-
- // For methods, we need to be careful for parameter 1. We do not require
- // a scoped_refptr because BindState<> itself takes care of AddRef() for
- // methods. We also disallow binding of an array as the method's target
- // object.
- COMPILE_ASSERT(
- cef_internal::HasIsMethodTag<RunnableType>::value ||
- !cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
- p1_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||
- !is_array<P1>::value,
- first_bound_argument_to_method_cannot_be_array);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
- p2_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,
- p3_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P4>::value,
- p4_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P5>::value,
- p5_is_refcounted_type_and_needs_scoped_refptr);
- 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(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 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 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 cef_internal::FunctionTraits<typename RunnableType::RunType>
- BoundFunctorTraits;
-
- // Do not allow binding a non-const reference parameter. Non-const reference
- // parameters are disallowed by the Google style guide. Also, binding a
- // non-const reference parameter can make for subtle bugs because the
- // invoked function will receive a reference to the stored copy of the
- // argument and not the original.
- COMPILE_ASSERT(
- !(is_non_const_reference<typename BoundFunctorTraits::A1Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A2Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A3Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A4Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A5Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A6Type>::value ),
- do_not_bind_functions_with_nonconst_ref);
-
- // For methods, we need to be careful for parameter 1. We do not require
- // a scoped_refptr because BindState<> itself takes care of AddRef() for
- // methods. We also disallow binding of an array as the method's target
- // object.
- COMPILE_ASSERT(
- cef_internal::HasIsMethodTag<RunnableType>::value ||
- !cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
- p1_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||
- !is_array<P1>::value,
- first_bound_argument_to_method_cannot_be_array);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
- p2_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,
- p3_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P4>::value,
- p4_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P5>::value,
- p5_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P6>::value,
- p6_is_refcounted_type_and_needs_scoped_refptr);
- 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(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 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 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 cef_internal::FunctionTraits<typename RunnableType::RunType>
- BoundFunctorTraits;
-
- // Do not allow binding a non-const reference parameter. Non-const reference
- // parameters are disallowed by the Google style guide. Also, binding a
- // non-const reference parameter can make for subtle bugs because the
- // invoked function will receive a reference to the stored copy of the
- // argument and not the original.
- COMPILE_ASSERT(
- !(is_non_const_reference<typename BoundFunctorTraits::A1Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A2Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A3Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A4Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A5Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A6Type>::value ||
- is_non_const_reference<typename BoundFunctorTraits::A7Type>::value ),
- do_not_bind_functions_with_nonconst_ref);
-
- // For methods, we need to be careful for parameter 1. We do not require
- // a scoped_refptr because BindState<> itself takes care of AddRef() for
- // methods. We also disallow binding of an array as the method's target
- // object.
- COMPILE_ASSERT(
- cef_internal::HasIsMethodTag<RunnableType>::value ||
- !cef_internal::NeedsScopedRefptrButGetsRawPtr<P1>::value,
- p1_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::HasIsMethodTag<RunnableType>::value ||
- !is_array<P1>::value,
- first_bound_argument_to_method_cannot_be_array);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P2>::value,
- p2_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P3>::value,
- p3_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P4>::value,
- p4_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P5>::value,
- p5_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P6>::value,
- p6_is_refcounted_type_and_needs_scoped_refptr);
- COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr<P7>::value,
- p7_is_refcounted_type_and_needs_scoped_refptr);
- 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(cef_internal::MakeRunnable(functor), p1, p2, p3, p4, p5, p6,
- p7));
-}
-
-} // namespace base
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_BIND_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This defines a set of argument wrappers and related factory methods that
-// can be used specify the refcounting and reference semantics of arguments
-// that are bound by the Bind() function in base/bind.h.
-//
-// It also defines a set of simple functions and utilities that people want
-// when using Callback<> and Bind().
-//
-//
-// ARGUMENT BINDING WRAPPERS
-//
-// The wrapper functions are base::Unretained(), base::Owned(), base::Passed(),
-// base::ConstRef(), and base::IgnoreResult().
-//
-// Unretained() allows Bind() to bind a non-refcounted class, and to disable
-// refcounting on arguments that are refcounted objects.
-//
-// Owned() transfers ownership of an object to the Callback resulting from
-// bind; the object will be deleted when the Callback is deleted.
-//
-// Passed() is for transferring movable-but-not-copyable types (eg. scoped_ptr)
-// through a Callback. Logically, this signifies a destructive transfer of
-// the state of the argument into the target function. Invoking
-// Callback::Run() twice on a Callback that was created with a Passed()
-// argument will CHECK() because the first invocation would have already
-// transferred ownership to the target function.
-//
-// ConstRef() allows binding a constant reference to an argument rather
-// than a copy.
-//
-// IgnoreResult() is used to adapt a function or Callback with a return type to
-// one with a void return. This is most useful if you have a function with,
-// say, a pesky ignorable bool return that you want to use with PostTask or
-// something else that expect a Callback with a void return.
-//
-// EXAMPLE OF Unretained():
-//
-// class Foo {
-// public:
-// void func() { cout << "Foo:f" << endl; }
-// };
-//
-// // In some function somewhere.
-// Foo foo;
-// Closure foo_callback =
-// Bind(&Foo::func, Unretained(&foo));
-// foo_callback.Run(); // Prints "Foo:f".
-//
-// Without the Unretained() wrapper on |&foo|, the above call would fail
-// to compile because Foo does not support the AddRef() and Release() methods.
-//
-//
-// EXAMPLE OF Owned():
-//
-// void foo(int* arg) { cout << *arg << endl }
-//
-// int* pn = new int(1);
-// Closure foo_callback = Bind(&foo, Owned(pn));
-//
-// foo_callback.Run(); // Prints "1"
-// foo_callback.Run(); // Prints "1"
-// *n = 2;
-// foo_callback.Run(); // Prints "2"
-//
-// foo_callback.Reset(); // |pn| is deleted. Also will happen when
-// // |foo_callback| goes out of scope.
-//
-// Without Owned(), someone would have to know to delete |pn| when the last
-// reference to the Callback is deleted.
-//
-//
-// EXAMPLE OF ConstRef():
-//
-// void foo(int arg) { cout << arg << endl }
-//
-// int n = 1;
-// Closure no_ref = Bind(&foo, n);
-// Closure has_ref = Bind(&foo, ConstRef(n));
-//
-// no_ref.Run(); // Prints "1"
-// has_ref.Run(); // Prints "1"
-//
-// n = 2;
-// no_ref.Run(); // Prints "1"
-// has_ref.Run(); // Prints "2"
-//
-// Note that because ConstRef() takes a reference on |n|, |n| must outlive all
-// its bound callbacks.
-//
-//
-// EXAMPLE OF IgnoreResult():
-//
-// int DoSomething(int arg) { cout << arg << endl; }
-//
-// // Assign to a Callback with a void return type.
-// Callback<void(int)> cb = Bind(IgnoreResult(&DoSomething));
-// cb->Run(1); // Prints "1".
-//
-// // Prints "1" on |ml|.
-// ml->PostTask(FROM_HERE, Bind(IgnoreResult(&DoSomething), 1);
-//
-//
-// EXAMPLE OF Passed():
-//
-// void TakesOwnership(scoped_ptr<Foo> arg) { }
-// scoped_ptr<Foo> CreateFoo() { return scoped_ptr<Foo>(new Foo()); }
-//
-// scoped_ptr<Foo> f(new Foo());
-//
-// // |cb| is given ownership of Foo(). |f| is now NULL.
-// // You can use f.Pass() in place of &f, but it's more verbose.
-// Closure cb = Bind(&TakesOwnership, Passed(&f));
-//
-// // Run was never called so |cb| still owns Foo() and deletes
-// // it on Reset().
-// cb.Reset();
-//
-// // |cb| is given a new Foo created by CreateFoo().
-// cb = Bind(&TakesOwnership, Passed(CreateFoo()));
-//
-// // |arg| in TakesOwnership() is given ownership of Foo(). |cb|
-// // no longer owns Foo() and, if reset, would not delete Foo().
-// cb.Run(); // Foo() is now transferred to |arg| and deleted.
-// cb.Run(); // This CHECK()s since Foo() already been used once.
-//
-// Passed() is particularly useful with PostTask() when you are transferring
-// ownership of an argument into a task, but don't necessarily know if the
-// task will always be executed. This can happen if the task is cancellable
-// or if it is posted to a MessageLoopProxy.
-//
-//
-// SIMPLE FUNCTIONS AND UTILITIES.
-//
-// DoNothing() - Useful for creating a Closure that does nothing when called.
-// DeletePointer<T>() - Useful for creating a Closure that will delete a
-// pointer when invoked. Only use this when necessary.
-// In most cases MessageLoop::DeleteSoon() is a better
-// fit.
-
-#ifndef CEF_INCLUDE_BASE_CEF_BIND_HELPERS_H_
-#define CEF_INCLUDE_BASE_CEF_BIND_HELPERS_H_
-#pragma once
-
-#if defined(BASE_BIND_HELPERS_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/bind_helpers.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include "include/base/cef_basictypes.h"
-#include "include/base/cef_callback.h"
-#include "include/base/cef_template_util.h"
-#include "include/base/cef_weak_ptr.h"
-
-namespace base {
-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
-// signature.
-//
-// http://en.wikipedia.org/wiki/Substitution_failure_is_not_an_error
-// http://stackoverflow.com/questions/257288/is-it-possible-to-write-a-c-template-to-check-for-a-functions-existence
-// http://stackoverflow.com/questions/4358584/sfinae-approach-comparison
-// http://stackoverflow.com/questions/1966362/sfinae-to-check-for-inherited-member-functions
-//
-// The last link in particular show the method used below.
-//
-// For SFINAE to work with inherited methods, we need to pull some extra tricks
-// with multiple inheritance. In the more standard formulation, the overloads
-// of Check would be:
-//
-// template <typename C>
-// Yes NotTheCheckWeWant(Helper<&C::TargetFunc>*);
-//
-// template <typename C>
-// No NotTheCheckWeWant(...);
-//
-// static const bool value = sizeof(NotTheCheckWeWant<T>(0)) == sizeof(Yes);
-//
-// The problem here is that template resolution will not match
-// C::TargetFunc if TargetFunc does not exist directly in C. That is, if
-// TargetFunc in inherited from an ancestor, &C::TargetFunc will not match,
-// |value| will be false. This formulation only checks for whether or
-// not TargetFunc exist directly in the class being introspected.
-//
-// To get around this, we play a dirty trick with multiple inheritance.
-// First, We create a class BaseMixin that declares each function that we
-// want to probe for. Then we create a class Base that inherits from both T
-// (the class we wish to probe) and BaseMixin. Note that the function
-// signature in BaseMixin does not need to match the signature of the function
-// we are probing for; thus it's easiest to just use void(void).
-//
-// Now, if TargetFunc exists somewhere in T, then &Base::TargetFunc has an
-// ambiguous resolution between BaseMixin and T. This lets us write the
-// following:
-//
-// template <typename C>
-// No GoodCheck(Helper<&C::TargetFunc>*);
-//
-// template <typename C>
-// Yes GoodCheck(...);
-//
-// static const bool value = sizeof(GoodCheck<Base>(0)) == sizeof(Yes);
-//
-// Notice here that the variadic version of GoodCheck() returns Yes here
-// instead of No like the previous one. Also notice that we calculate |value|
-// by specializing GoodCheck() on Base instead of T.
-//
-// We've reversed the roles of the variadic, and Helper overloads.
-// GoodCheck(Helper<&C::TargetFunc>*), when C = Base, fails to be a valid
-// substitution if T::TargetFunc exists. Thus GoodCheck<Base>(0) will resolve
-// to the variadic version if T has TargetFunc. If T::TargetFunc does not
-// exist, then &C::TargetFunc is not ambiguous, and the overload resolution
-// will prefer GoodCheck(Helper<&C::TargetFunc>*).
-//
-// This method of SFINAE will correctly probe for inherited names, but it cannot
-// typecheck those names. It's still a good enough sanity check though.
-//
-// Works on gcc-4.2, gcc-4.4, and Visual Studio 2008.
-//
-// TODO(ajwong): Move to ref_counted.h or template_util.h when we've vetted
-// this works well.
-//
-// TODO(ajwong): Make this check for Release() as well.
-// See http://crbug.com/82038.
-template <typename T>
-class SupportsAddRefAndRelease {
- typedef char Yes[1];
- typedef char No[2];
-
- struct BaseMixin {
- void AddRef();
- };
-
-// MSVC warns when you try to use Base if T has a private destructor, the
-// common pattern for refcounted types. It does this even though no attempt to
-// instantiate Base is made. We disable the warning for this definition.
-#if defined(OS_WIN)
-#pragma warning(push)
-#pragma warning(disable:4624)
-#endif
- struct Base : public T, public BaseMixin {
- };
-#if defined(OS_WIN)
-#pragma warning(pop)
-#endif
-
- template <void(BaseMixin::*)(void)> struct Helper {};
-
- template <typename C>
- static No& Check(Helper<&C::AddRef>*);
-
- template <typename >
- static Yes& Check(...);
-
- public:
- static const bool value = sizeof(Check<Base>(0)) == sizeof(Yes);
-};
-
-// Helpers to assert that arguments of a recounted type are bound with a
-// scoped_refptr.
-template <bool IsClasstype, typename T>
-struct UnsafeBindtoRefCountedArgHelper : false_type {
-};
-
-template <typename T>
-struct UnsafeBindtoRefCountedArgHelper<true, T>
- : integral_constant<bool, SupportsAddRefAndRelease<T>::value> {
-};
-
-template <typename T>
-struct UnsafeBindtoRefCountedArg : false_type {
-};
-
-template <typename T>
-struct UnsafeBindtoRefCountedArg<T*>
- : UnsafeBindtoRefCountedArgHelper<is_class<T>::value, T> {
-};
-
-template <typename T>
-class HasIsMethodTag {
- typedef char Yes[1];
- typedef char No[2];
-
- template <typename U>
- static Yes& Check(typename U::IsMethod*);
-
- template <typename U>
- static No& Check(...);
-
- public:
- static const bool value = sizeof(Check<T>(0)) == sizeof(Yes);
-};
-
-template <typename T>
-class UnretainedWrapper {
- public:
- explicit UnretainedWrapper(T* o) : ptr_(o) {}
- T* get() const { return ptr_; }
- private:
- T* ptr_;
-};
-
-template <typename T>
-class ConstRefWrapper {
- public:
- explicit ConstRefWrapper(const T& o) : ptr_(&o) {}
- const T& get() const { return *ptr_; }
- private:
- const T* ptr_;
-};
-
-template <typename T>
-struct IgnoreResultHelper {
- explicit IgnoreResultHelper(T functor) : functor_(functor) {}
-
- T functor_;
-};
-
-template <typename T>
-struct IgnoreResultHelper<Callback<T> > {
- explicit IgnoreResultHelper(const Callback<T>& functor) : functor_(functor) {}
-
- const Callback<T>& functor_;
-};
-
-// An alternate implementation is to avoid the destructive copy, and instead
-// specialize ParamTraits<> for OwnedWrapper<> to change the StorageType to
-// a class that is essentially a scoped_ptr<>.
-//
-// The current implementation has the benefit though of leaving ParamTraits<>
-// fully in callback_internal.h as well as avoiding type conversions during
-// storage.
-template <typename T>
-class OwnedWrapper {
- public:
- explicit OwnedWrapper(T* o) : ptr_(o) {}
- ~OwnedWrapper() { delete ptr_; }
- T* get() const { return ptr_; }
- OwnedWrapper(const OwnedWrapper& other) {
- ptr_ = other.ptr_;
- other.ptr_ = NULL;
- }
-
- private:
- mutable T* ptr_;
-};
-
-// PassedWrapper is a copyable adapter for a scoper that ignores const.
-//
-// It is needed to get around the fact that Bind() takes a const reference to
-// all its arguments. Because Bind() takes a const reference to avoid
-// unnecessary copies, it is incompatible with movable-but-not-copyable
-// types; doing a destructive "move" of the type into Bind() would violate
-// the const correctness.
-//
-// This conundrum cannot be solved without either C++11 rvalue references or
-// a O(2^n) blowup of Bind() templates to handle each combination of regular
-// types and movable-but-not-copyable types. Thus we introduce a wrapper type
-// that is copyable to transmit the correct type information down into
-// BindState<>. Ignoring const in this type makes sense because it is only
-// created when we are explicitly trying to do a destructive move.
-//
-// Two notes:
-// 1) PassedWrapper supports any type that has a "Pass()" function.
-// This is intentional. The whitelisting of which specific types we
-// support is maintained by CallbackParamTraits<>.
-// 2) is_valid_ is distinct from NULL because it is valid to bind a "NULL"
-// scoper to a Callback and allow the Callback to execute once.
-template <typename T>
-class PassedWrapper {
- public:
- explicit PassedWrapper(T scoper) : is_valid_(true), scoper_(scoper.Pass()) {}
- PassedWrapper(const PassedWrapper& other)
- : is_valid_(other.is_valid_), scoper_(other.scoper_.Pass()) {
- }
- T Pass() const {
- CHECK(is_valid_);
- is_valid_ = false;
- return scoper_.Pass();
- }
-
- private:
- mutable bool is_valid_;
- mutable T scoper_;
-};
-
-// Unwrap the stored parameters for the wrappers above.
-template <typename T>
-struct UnwrapTraits {
- typedef const T& ForwardType;
- static ForwardType Unwrap(const T& o) { return o; }
-};
-
-template <typename T>
-struct UnwrapTraits<UnretainedWrapper<T> > {
- typedef T* ForwardType;
- static ForwardType Unwrap(UnretainedWrapper<T> unretained) {
- return unretained.get();
- }
-};
-
-template <typename T>
-struct UnwrapTraits<ConstRefWrapper<T> > {
- typedef const T& ForwardType;
- static ForwardType Unwrap(ConstRefWrapper<T> const_ref) {
- return const_ref.get();
- }
-};
-
-template <typename T>
-struct UnwrapTraits<scoped_refptr<T> > {
- typedef T* ForwardType;
- static ForwardType Unwrap(const scoped_refptr<T>& o) { return o.get(); }
-};
-
-template <typename T>
-struct UnwrapTraits<WeakPtr<T> > {
- typedef const WeakPtr<T>& ForwardType;
- static ForwardType Unwrap(const WeakPtr<T>& o) { return o; }
-};
-
-template <typename T>
-struct UnwrapTraits<OwnedWrapper<T> > {
- typedef T* ForwardType;
- static ForwardType Unwrap(const OwnedWrapper<T>& o) {
- return o.get();
- }
-};
-
-template <typename T>
-struct UnwrapTraits<PassedWrapper<T> > {
- typedef T ForwardType;
- static T Unwrap(PassedWrapper<T>& o) {
- return o.Pass();
- }
-};
-
-// Utility for handling different refcounting semantics in the Bind()
-// function.
-template <bool is_method, typename T>
-struct MaybeRefcount;
-
-template <typename T>
-struct MaybeRefcount<false, T> {
- static void AddRef(const T&) {}
- static void Release(const T&) {}
-};
-
-template <typename T, size_t n>
-struct MaybeRefcount<false, T[n]> {
- static void AddRef(const T*) {}
- static void Release(const T*) {}
-};
-
-template <typename T>
-struct MaybeRefcount<true, T> {
- static void AddRef(const T&) {}
- static void Release(const T&) {}
-};
-
-template <typename T>
-struct MaybeRefcount<true, T*> {
- static void AddRef(T* o) { o->AddRef(); }
- static void Release(T* o) { o->Release(); }
-};
-
-// No need to additionally AddRef() and Release() since we are storing a
-// scoped_refptr<> inside the storage object already.
-template <typename T>
-struct MaybeRefcount<true, scoped_refptr<T> > {
- static void AddRef(const scoped_refptr<T>& o) {}
- static void Release(const scoped_refptr<T>& o) {}
-};
-
-template <typename T>
-struct MaybeRefcount<true, const T*> {
- static void AddRef(const T* o) { o->AddRef(); }
- static void Release(const T* o) { o->Release(); }
-};
-
-// IsWeakMethod is a helper that determine if we are binding a WeakPtr<> to a
-// method. It is used internally by Bind() to select the correct
-// InvokeHelper that will no-op itself in the event the WeakPtr<> for
-// the target object is invalidated.
-//
-// P1 should be the type of the object that will be received of the method.
-template <bool IsMethod, typename P1>
-struct IsWeakMethod : public false_type {};
-
-template <typename T>
-struct IsWeakMethod<true, WeakPtr<T> > : public true_type {};
-
-template <typename T>
-struct IsWeakMethod<true, ConstRefWrapper<WeakPtr<T> > > : public true_type {};
-
-} // namespace cef_internal
-
-template <typename T>
-static inline cef_internal::UnretainedWrapper<T> Unretained(T* o) {
- return cef_internal::UnretainedWrapper<T>(o);
-}
-
-template <typename T>
-static inline cef_internal::ConstRefWrapper<T> ConstRef(const T& o) {
- return cef_internal::ConstRefWrapper<T>(o);
-}
-
-template <typename T>
-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
-// is best suited for use with the return value of a function. The second
-// takes a pointer to the scoper and is just syntactic sugar to avoid having
-// to write Passed(scoper.Pass()).
-template <typename T>
-static inline cef_internal::PassedWrapper<T> Passed(T scoper) {
- return cef_internal::PassedWrapper<T>(scoper.Pass());
-}
-template <typename T>
-static inline cef_internal::PassedWrapper<T> Passed(T* scoper) {
- return cef_internal::PassedWrapper<T>(scoper->Pass());
-}
-
-template <typename T>
-static inline cef_internal::IgnoreResultHelper<T> IgnoreResult(T data) {
- return cef_internal::IgnoreResultHelper<T>(data);
-}
-
-template <typename T>
-static inline cef_internal::IgnoreResultHelper<Callback<T> >
-IgnoreResult(const Callback<T>& data) {
- return cef_internal::IgnoreResultHelper<Callback<T> >(data);
-}
-
-void DoNothing();
-
-template<typename T>
-void DeletePointer(T* obj) {
- delete obj;
-}
-
-} // namespace base
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_BIND_HELPERS_H_
+++ /dev/null
-// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-#ifndef CEF_INCLUDE_BASE_CEF_BUILD_H_
-#define CEF_INCLUDE_BASE_CEF_BUILD_H_
-#pragma once
-
-#if defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/compiler_specific.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#if defined(_WIN32)
-#ifndef OS_WIN
-#define OS_WIN 1
-#endif
-#elif defined(__APPLE__)
-#ifndef OS_MACOSX
-#define OS_MACOSX 1
-#endif
-#elif defined(__linux__)
-#ifndef OS_LINUX
-#define OS_LINUX 1
-#endif
-#else
-#error Please add support for your platform in cef_build.h
-#endif
-
-// For access to standard POSIXish features, use OS_POSIX instead of a
-// more specific macro.
-#if defined(OS_MACOSX) || defined(OS_LINUX)
-#ifndef OS_POSIX
-#define OS_POSIX 1
-#endif
-#endif
-
-// Compiler detection.
-#if defined(__GNUC__)
-#ifndef COMPILER_GCC
-#define COMPILER_GCC 1
-#endif
-#elif defined(_MSC_VER)
-#ifndef COMPILER_MSVC
-#define COMPILER_MSVC 1
-#endif
-#else
-#error Please add support for your compiler in cef_build.h
-#endif
-
-// Processor architecture detection. For more info on what's defined, see:
-// http://msdn.microsoft.com/en-us/library/b0084kay.aspx
-// http://www.agner.org/optimize/calling_conventions.pdf
-// or with gcc, run: "echo | gcc -E -dM -"
-#if defined(_M_X64) || defined(__x86_64__)
-#define ARCH_CPU_X86_FAMILY 1
-#define ARCH_CPU_X86_64 1
-#define ARCH_CPU_64_BITS 1
-#define ARCH_CPU_LITTLE_ENDIAN 1
-#elif defined(_M_IX86) || defined(__i386__)
-#define ARCH_CPU_X86_FAMILY 1
-#define ARCH_CPU_X86 1
-#define ARCH_CPU_32_BITS 1
-#define ARCH_CPU_LITTLE_ENDIAN 1
-#elif defined(__ARMEL__)
-#define ARCH_CPU_ARM_FAMILY 1
-#define ARCH_CPU_ARMEL 1
-#define ARCH_CPU_32_BITS 1
-#define ARCH_CPU_LITTLE_ENDIAN 1
-#elif defined(__aarch64__)
-#define ARCH_CPU_ARM_FAMILY 1
-#define ARCH_CPU_ARM64 1
-#define ARCH_CPU_64_BITS 1
-#define ARCH_CPU_LITTLE_ENDIAN 1
-#elif defined(__pnacl__)
-#define ARCH_CPU_32_BITS 1
-#define ARCH_CPU_LITTLE_ENDIAN 1
-#elif defined(__MIPSEL__)
-#define ARCH_CPU_MIPS_FAMILY 1
-#define ARCH_CPU_MIPSEL 1
-#define ARCH_CPU_32_BITS 1
-#define ARCH_CPU_LITTLE_ENDIAN 1
-#else
-#error Please add support for your architecture in cef_build.h
-#endif
-
-// Type detection for wchar_t.
-#if defined(OS_WIN)
-#define WCHAR_T_IS_UTF16
-#elif defined(OS_POSIX) && defined(COMPILER_GCC) && \
- defined(__WCHAR_MAX__) && \
- (__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
-#define WCHAR_T_IS_UTF32
-#elif defined(OS_POSIX) && defined(COMPILER_GCC) && \
- defined(__WCHAR_MAX__) && \
- (__WCHAR_MAX__ == 0x7fff || __WCHAR_MAX__ == 0xffff)
-// On Posix, we'll detect short wchar_t, but projects aren't guaranteed to
-// compile in this mode (in particular, Chrome doesn't). This is intended for
-// other projects using base who manage their own dependencies and make sure
-// short wchar works for them.
-#define WCHAR_T_IS_UTF16
-#else
-#error Please add support for your compiler in cef_build.h
-#endif
-
-// Annotate a virtual method indicating it must be overriding a virtual
-// method in the parent class.
-// Use like:
-// virtual void foo() OVERRIDE;
-#ifndef OVERRIDE
-#if defined(__clang__) || defined(COMPILER_MSVC)
-#define OVERRIDE override
-#elif defined(COMPILER_GCC) && __cplusplus >= 201103 && \
- (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40700
-// GCC 4.7 supports explicit virtual overrides when C++11 support is enabled.
-#define OVERRIDE override
-#else
-#define OVERRIDE
-#endif
-#endif // OVERRIDE
-
-// Annotate a function indicating the caller must examine the return value.
-// Use like:
-// int foo() WARN_UNUSED_RESULT;
-// To explicitly ignore a result, see |ignore_result()| in <base/basictypes.h>.
-#ifndef WARN_UNUSED_RESULT
-#if defined(COMPILER_GCC)
-#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
-#else
-#define WARN_UNUSED_RESULT
-#endif
-#endif // WARN_UNUSED_RESULT
-
-// Annotate a typedef or function indicating it's ok if it's not used.
-// Use like:
-// typedef Foo Bar ALLOW_UNUSED_TYPE;
-#ifndef ALLOW_UNUSED_TYPE
-#if defined(COMPILER_GCC)
-#define ALLOW_UNUSED_TYPE __attribute__((unused))
-#else
-#define ALLOW_UNUSED_TYPE
-#endif
-#endif // ALLOW_UNUSED_TYPE
-
-// Annotate a variable indicating it's ok if the variable is not used.
-// (Typically used to silence a compiler warning when the assignment
-// is important for some other reason.)
-// Use like:
-// int x = ...;
-// ALLOW_UNUSED_LOCAL(x);
-#ifndef ALLOW_UNUSED_LOCAL
-#define ALLOW_UNUSED_LOCAL(x) false ? (void)x : (void)0
-#endif
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_BUILD_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef CEF_INCLUDE_BASE_CEF_CALLBACK_H_
-#define CEF_INCLUDE_BASE_CEF_CALLBACK_H_
-#pragma once
-
-#if defined(BASE_CALLBACK_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/callback.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include "include/base/internal/cef_callback_internal.h"
-#include "include/base/cef_callback_forward.h"
-#include "include/base/cef_template_util.h"
-
-// NOTE: Header files that do not require the full definition of Callback or
-// Closure should #include "base/cef_callback_forward.h" instead of this file.
-
-// -----------------------------------------------------------------------------
-// Introduction
-// -----------------------------------------------------------------------------
-//
-// The templated Callback class is a generalized function object. Together
-// with the Bind() function in bind.h, they provide a type-safe method for
-// performing partial application of functions.
-//
-// Partial application (or "currying") is the process of binding a subset of
-// a function's arguments to produce another function that takes fewer
-// arguments. This can be used to pass around a unit of delayed execution,
-// much like lexical closures are used in other languages. For example, it
-// is used in Chromium code to schedule tasks on different MessageLoops.
-//
-// A callback with no unbound input parameters (base::Callback<void(void)>)
-// is called a base::Closure. Note that this is NOT the same as what other
-// languages refer to as a closure -- it does not retain a reference to its
-// enclosing environment.
-//
-// MEMORY MANAGEMENT AND PASSING
-//
-// The Callback objects themselves should be passed by const-reference, and
-// stored by copy. They internally store their state via a refcounted class
-// and thus do not need to be deleted.
-//
-// The reason to pass via a const-reference is to avoid unnecessary
-// AddRef/Release pairs to the internal state.
-//
-//
-// -----------------------------------------------------------------------------
-// Quick reference for basic stuff
-// -----------------------------------------------------------------------------
-//
-// BINDING A BARE FUNCTION
-//
-// int Return5() { return 5; }
-// base::Callback<int(void)> func_cb = base::Bind(&Return5);
-// LOG(INFO) << func_cb.Run(); // Prints 5.
-//
-// BINDING A CLASS METHOD
-//
-// The first argument to bind is the member function to call, the second is
-// the object on which to call it.
-//
-// class Ref : public base::RefCountedThreadSafe<Ref> {
-// public:
-// int Foo() { return 3; }
-// void PrintBye() { LOG(INFO) << "bye."; }
-// };
-// scoped_refptr<Ref> ref = new Ref();
-// base::Callback<void(void)> ref_cb = base::Bind(&Ref::Foo, ref);
-// LOG(INFO) << ref_cb.Run(); // Prints out 3.
-//
-// By default the object must support RefCounted or you will get a compiler
-// error. If you're passing between threads, be sure it's
-// RefCountedThreadSafe! See "Advanced binding of member functions" below if
-// you don't want to use reference counting.
-//
-// RUNNING A CALLBACK
-//
-// Callbacks can be run with their "Run" method, which has the same
-// signature as the template argument to the callback.
-//
-// void DoSomething(const base::Callback<void(int, std::string)>& callback) {
-// callback.Run(5, "hello");
-// }
-//
-// Callbacks can be run more than once (they don't get deleted or marked when
-// run). However, this precludes using base::Passed (see below).
-//
-// void DoSomething(const base::Callback<double(double)>& callback) {
-// double myresult = callback.Run(3.14159);
-// myresult += callback.Run(2.71828);
-// }
-//
-// PASSING UNBOUND INPUT PARAMETERS
-//
-// Unbound parameters are specified at the time a callback is Run(). They are
-// specified in the Callback template type:
-//
-// void MyFunc(int i, const std::string& str) {}
-// base::Callback<void(int, const std::string&)> cb = base::Bind(&MyFunc);
-// cb.Run(23, "hello, world");
-//
-// PASSING BOUND INPUT PARAMETERS
-//
-// Bound parameters are specified when you create thee callback as arguments
-// to Bind(). They will be passed to the function and the Run()ner of the
-// callback doesn't see those values or even know that the function it's
-// calling.
-//
-// void MyFunc(int i, const std::string& str) {}
-// base::Callback<void(void)> cb = base::Bind(&MyFunc, 23, "hello world");
-// cb.Run();
-//
-// A callback with no unbound input parameters (base::Callback<void(void)>)
-// is called a base::Closure. So we could have also written:
-//
-// base::Closure cb = base::Bind(&MyFunc, 23, "hello world");
-//
-// When calling member functions, bound parameters just go after the object
-// pointer.
-//
-// base::Closure cb = base::Bind(&MyClass::MyFunc, this, 23, "hello world");
-//
-// PARTIAL BINDING OF PARAMETERS
-//
-// You can specify some parameters when you create the callback, and specify
-// the rest when you execute the callback.
-//
-// void MyFunc(int i, const std::string& str) {}
-// base::Callback<void(const std::string&)> cb = base::Bind(&MyFunc, 23);
-// cb.Run("hello world");
-//
-// When calling a function bound parameters are first, followed by unbound
-// parameters.
-//
-//
-// -----------------------------------------------------------------------------
-// Quick reference for advanced binding
-// -----------------------------------------------------------------------------
-//
-// BINDING A CLASS METHOD WITH WEAK POINTERS
-//
-// base::Bind(&MyClass::Foo, GetWeakPtr());
-//
-// The callback will not be run if the object has already been destroyed.
-// DANGER: weak pointers are not threadsafe, so don't use this
-// when passing between threads!
-//
-// BINDING A CLASS METHOD WITH MANUAL LIFETIME MANAGEMENT
-//
-// base::Bind(&MyClass::Foo, base::Unretained(this));
-//
-// This disables all lifetime management on the object. You're responsible
-// for making sure the object is alive at the time of the call. You break it,
-// you own it!
-//
-// BINDING A CLASS METHOD AND HAVING THE CALLBACK OWN THE CLASS
-//
-// MyClass* myclass = new MyClass;
-// base::Bind(&MyClass::Foo, base::Owned(myclass));
-//
-// The object will be deleted when the callback is destroyed, even if it's
-// not run (like if you post a task during shutdown). Potentially useful for
-// "fire and forget" cases.
-//
-// IGNORING RETURN VALUES
-//
-// Sometimes you want to call a function that returns a value in a callback
-// that doesn't expect a return value.
-//
-// int DoSomething(int arg) { cout << arg << endl; }
-// base::Callback<void<int>) cb =
-// base::Bind(base::IgnoreResult(&DoSomething));
-//
-//
-// -----------------------------------------------------------------------------
-// Quick reference for binding parameters to Bind()
-// -----------------------------------------------------------------------------
-//
-// Bound parameters are specified as arguments to Bind() and are passed to the
-// function. A callback with no parameters or no unbound parameters is called a
-// Closure (base::Callback<void(void)> and base::Closure are the same thing).
-//
-// PASSING PARAMETERS OWNED BY THE CALLBACK
-//
-// void Foo(int* arg) { cout << *arg << endl; }
-// int* pn = new int(1);
-// base::Closure foo_callback = base::Bind(&foo, base::Owned(pn));
-//
-// The parameter will be deleted when the callback is destroyed, even if it's
-// not run (like if you post a task during shutdown).
-//
-// PASSING PARAMETERS AS A scoped_ptr
-//
-// void TakesOwnership(scoped_ptr<Foo> arg) {}
-// scoped_ptr<Foo> f(new Foo);
-// // f becomes null during the following call.
-// base::Closure cb = base::Bind(&TakesOwnership, base::Passed(&f));
-//
-// Ownership of the parameter will be with the callback until the it is run,
-// when ownership is passed to the callback function. This means the callback
-// can only be run once. If the callback is never run, it will delete the
-// object when it's destroyed.
-//
-// PASSING PARAMETERS AS A scoped_refptr
-//
-// void TakesOneRef(scoped_refptr<Foo> arg) {}
-// scoped_refptr<Foo> f(new Foo)
-// base::Closure cb = base::Bind(&TakesOneRef, f);
-//
-// This should "just work." The closure will take a reference as long as it
-// is alive, and another reference will be taken for the called function.
-//
-// PASSING PARAMETERS BY REFERENCE
-//
-// Const references are *copied* unless ConstRef is used. Example:
-//
-// void foo(const int& arg) { printf("%d %p\n", arg, &arg); }
-// int n = 1;
-// base::Closure has_copy = base::Bind(&foo, n);
-// base::Closure has_ref = base::Bind(&foo, base::ConstRef(n));
-// n = 2;
-// foo(n); // Prints "2 0xaaaaaaaaaaaa"
-// has_copy.Run(); // Prints "1 0xbbbbbbbbbbbb"
-// has_ref.Run(); // Prints "2 0xaaaaaaaaaaaa"
-//
-// Normally parameters are copied in the closure. DANGER: ConstRef stores a
-// const reference instead, referencing the original parameter. This means
-// that you must ensure the object outlives the callback!
-//
-//
-// -----------------------------------------------------------------------------
-// Implementation notes
-// -----------------------------------------------------------------------------
-//
-// WHERE IS THIS DESIGN FROM:
-//
-// The design Callback and Bind is heavily influenced by C++'s
-// tr1::function/tr1::bind, and by the "Google Callback" system used inside
-// Google.
-//
-//
-// HOW THE IMPLEMENTATION WORKS:
-//
-// There are three main components to the system:
-// 1) The Callback classes.
-// 2) The Bind() functions.
-// 3) The arguments wrappers (e.g., Unretained() and ConstRef()).
-//
-// The Callback classes represent a generic function pointer. Internally,
-// it stores a refcounted piece of state that represents the target function
-// and all its bound parameters. Each Callback specialization has a templated
-// constructor that takes an BindState<>*. In the context of the constructor,
-// the static type of this BindState<> pointer uniquely identifies the
-// function it is representing, all its bound parameters, and a Run() method
-// that is capable of invoking the target.
-//
-// Callback's constructor takes the BindState<>* that has the full static type
-// and erases the target function type as well as the types of the bound
-// parameters. It does this by storing a pointer to the specific Run()
-// function, and upcasting the state of BindState<>* to a
-// BindStateBase*. This is safe as long as this BindStateBase pointer
-// is only used with the stored Run() pointer.
-//
-// To BindState<> objects are created inside the Bind() functions.
-// These functions, along with a set of internal templates, are responsible for
-//
-// - Unwrapping the function signature into return type, and parameters
-// - Determining the number of parameters that are bound
-// - Creating the BindState storing the bound parameters
-// - Performing compile-time asserts to avoid error-prone behavior
-// - Returning an Callback<> with an arity matching the number of unbound
-// parameters and that knows the correct refcounting semantics for the
-// target object if we are binding a method.
-//
-// The Bind functions do the above using type-inference, and template
-// specializations.
-//
-// By default Bind() will store copies of all bound parameters, and attempt
-// to refcount a target object if the function being bound is a class method.
-// These copies are created even if the function takes parameters as const
-// references. (Binding to non-const references is forbidden, see bind.h.)
-//
-// To change this behavior, we introduce a set of argument wrappers
-// (e.g., Unretained(), and ConstRef()). These are simple container templates
-// that are passed by value, and wrap a pointer to argument. See the
-// file-level comment in base/bind_helpers.h for more info.
-//
-// These types are passed to the Unwrap() functions, and the MaybeRefcount()
-// functions respectively to modify the behavior of Bind(). The Unwrap()
-// and MaybeRefcount() functions change behavior by doing partial
-// specialization based on whether or not a parameter is a wrapper type.
-//
-// ConstRef() is similar to tr1::cref. Unretained() is specific to Chromium.
-//
-//
-// WHY NOT TR1 FUNCTION/BIND?
-//
-// Direct use of tr1::function and tr1::bind was considered, but ultimately
-// rejected because of the number of copy constructors invocations involved
-// in the binding of arguments during construction, and the forwarding of
-// arguments during invocation. These copies will no longer be an issue in
-// C++0x because C++0x will support rvalue reference allowing for the compiler
-// to avoid these copies. However, waiting for C++0x is not an option.
-//
-// Measured with valgrind on gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5), the
-// tr1::bind call itself will invoke a non-trivial copy constructor three times
-// for each bound parameter. Also, each when passing a tr1::function, each
-// bound argument will be copied again.
-//
-// In addition to the copies taken at binding and invocation, copying a
-// tr1::function causes a copy to be made of all the bound parameters and
-// state.
-//
-// Furthermore, in Chromium, it is desirable for the Callback to take a
-// reference on a target object when representing a class method call. This
-// is not supported by tr1.
-//
-// Lastly, tr1::function and tr1::bind has a more general and flexible API.
-// This includes things like argument reordering by use of
-// tr1::bind::placeholder, support for non-const reference parameters, and some
-// limited amount of subtyping of the tr1::function object (e.g.,
-// tr1::function<int(int)> is convertible to tr1::function<void(int)>).
-//
-// These are not features that are required in Chromium. Some of them, such as
-// allowing for reference parameters, and subtyping of functions, may actually
-// become a source of errors. Removing support for these features actually
-// allows for a simpler implementation, and a terser Currying API.
-//
-//
-// WHY NOT GOOGLE CALLBACKS?
-//
-// The Google callback system also does not support refcounting. Furthermore,
-// its implementation has a number of strange edge cases with respect to type
-// conversion of its arguments. In particular, the argument's constness must
-// at times match exactly the function signature, or the type-inference might
-// break. Given the above, writing a custom solution was easier.
-//
-//
-// MISSING FUNCTIONALITY
-// - Invoking the return of Bind. Bind(&foo).Run() does not work;
-// - Binding arrays to functions that take a non-const pointer.
-// Example:
-// void Foo(const char* ptr);
-// void Bar(char* ptr);
-// Bind(&Foo, "test");
-// Bind(&Bar, "test"); // This fails because ptr is not const.
-
-namespace base {
-
-// First, we forward declare the Callback class template. This informs the
-// compiler that the template only has 1 type parameter which is the function
-// signature that the Callback is representing.
-//
-// After this, create template specializations for 0-7 parameters. Note that
-// even though the template typelist grows, the specialization still
-// only has one type: the function signature.
-//
-// If you are thinking of forward declaring Callback in your own header file,
-// please include "base/callback_forward.h" instead.
-template <typename Sig>
-class Callback;
-
-namespace cef_internal {
-template <typename Runnable, typename RunType, typename BoundArgsType>
-struct BindState;
-} // namespace cef_internal
-
-template <typename R>
-class Callback<R(void)> : public cef_internal::CallbackBase {
- public:
- typedef R(RunType)();
-
- Callback() : CallbackBase(NULL) { }
-
- // 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(cef_internal::BindState<Runnable, BindRunType,
- BoundArgsType>* bind_state)
- : CallbackBase(bind_state) {
-
- // Force the assignment to a local variable of PolymorphicInvoke
- // so the compiler will typecheck that the passed in Run() method has
- // the correct type.
- PolymorphicInvoke invoke_func =
- &cef_internal::BindState<Runnable, BindRunType, BoundArgsType>
- ::InvokerType::Run;
- polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);
- }
-
- bool Equals(const Callback& other) const {
- return CallbackBase::Equals(other);
- }
-
- R Run() const {
- PolymorphicInvoke f =
- reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
-
- return f(bind_state_.get());
- }
-
- private:
- typedef R(*PolymorphicInvoke)(
- cef_internal::BindStateBase*);
-
-};
-
-template <typename R, typename A1>
-class Callback<R(A1)> : public cef_internal::CallbackBase {
- public:
- typedef R(RunType)(A1);
-
- Callback() : CallbackBase(NULL) { }
-
- // 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(cef_internal::BindState<Runnable, BindRunType,
- BoundArgsType>* bind_state)
- : CallbackBase(bind_state) {
-
- // Force the assignment to a local variable of PolymorphicInvoke
- // so the compiler will typecheck that the passed in Run() method has
- // the correct type.
- PolymorphicInvoke invoke_func =
- &cef_internal::BindState<Runnable, BindRunType, BoundArgsType>
- ::InvokerType::Run;
- polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);
- }
-
- bool Equals(const Callback& other) const {
- return CallbackBase::Equals(other);
- }
-
- R Run(typename cef_internal::CallbackParamTraits<A1>::ForwardType a1) const {
- PolymorphicInvoke f =
- reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
-
- return f(bind_state_.get(), cef_internal::CallbackForward(a1));
- }
-
- private:
- typedef R(*PolymorphicInvoke)(
- cef_internal::BindStateBase*,
- typename cef_internal::CallbackParamTraits<A1>::ForwardType);
-
-};
-
-template <typename R, typename A1, typename A2>
-class Callback<R(A1, A2)> : public cef_internal::CallbackBase {
- public:
- typedef R(RunType)(A1, A2);
-
- Callback() : CallbackBase(NULL) { }
-
- // 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(cef_internal::BindState<Runnable, BindRunType,
- BoundArgsType>* bind_state)
- : CallbackBase(bind_state) {
-
- // Force the assignment to a local variable of PolymorphicInvoke
- // so the compiler will typecheck that the passed in Run() method has
- // the correct type.
- PolymorphicInvoke invoke_func =
- &cef_internal::BindState<Runnable, BindRunType, BoundArgsType>
- ::InvokerType::Run;
- polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);
- }
-
- bool Equals(const Callback& other) const {
- return CallbackBase::Equals(other);
- }
-
- 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(), cef_internal::CallbackForward(a1),
- cef_internal::CallbackForward(a2));
- }
-
- private:
- typedef R(*PolymorphicInvoke)(
- 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 cef_internal::CallbackBase {
- public:
- typedef R(RunType)(A1, A2, A3);
-
- Callback() : CallbackBase(NULL) { }
-
- // 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(cef_internal::BindState<Runnable, BindRunType,
- BoundArgsType>* bind_state)
- : CallbackBase(bind_state) {
-
- // Force the assignment to a local variable of PolymorphicInvoke
- // so the compiler will typecheck that the passed in Run() method has
- // the correct type.
- PolymorphicInvoke invoke_func =
- &cef_internal::BindState<Runnable, BindRunType, BoundArgsType>
- ::InvokerType::Run;
- polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);
- }
-
- bool Equals(const Callback& other) const {
- return CallbackBase::Equals(other);
- }
-
- 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(), cef_internal::CallbackForward(a1),
- cef_internal::CallbackForward(a2),
- cef_internal::CallbackForward(a3));
- }
-
- private:
- typedef R(*PolymorphicInvoke)(
- 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 cef_internal::CallbackBase {
- public:
- typedef R(RunType)(A1, A2, A3, A4);
-
- Callback() : CallbackBase(NULL) { }
-
- // 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(cef_internal::BindState<Runnable, BindRunType,
- BoundArgsType>* bind_state)
- : CallbackBase(bind_state) {
-
- // Force the assignment to a local variable of PolymorphicInvoke
- // so the compiler will typecheck that the passed in Run() method has
- // the correct type.
- PolymorphicInvoke invoke_func =
- &cef_internal::BindState<Runnable, BindRunType, BoundArgsType>
- ::InvokerType::Run;
- polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);
- }
-
- bool Equals(const Callback& other) const {
- return CallbackBase::Equals(other);
- }
-
- 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(), cef_internal::CallbackForward(a1),
- cef_internal::CallbackForward(a2),
- cef_internal::CallbackForward(a3),
- cef_internal::CallbackForward(a4));
- }
-
- private:
- typedef R(*PolymorphicInvoke)(
- 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 cef_internal::CallbackBase {
- public:
- typedef R(RunType)(A1, A2, A3, A4, A5);
-
- Callback() : CallbackBase(NULL) { }
-
- // 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(cef_internal::BindState<Runnable, BindRunType,
- BoundArgsType>* bind_state)
- : CallbackBase(bind_state) {
-
- // Force the assignment to a local variable of PolymorphicInvoke
- // so the compiler will typecheck that the passed in Run() method has
- // the correct type.
- PolymorphicInvoke invoke_func =
- &cef_internal::BindState<Runnable, BindRunType, BoundArgsType>
- ::InvokerType::Run;
- polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);
- }
-
- bool Equals(const Callback& other) const {
- return CallbackBase::Equals(other);
- }
-
- 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(), cef_internal::CallbackForward(a1),
- cef_internal::CallbackForward(a2),
- cef_internal::CallbackForward(a3),
- cef_internal::CallbackForward(a4),
- cef_internal::CallbackForward(a5));
- }
-
- private:
- typedef R(*PolymorphicInvoke)(
- 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 cef_internal::CallbackBase {
- public:
- typedef R(RunType)(A1, A2, A3, A4, A5, A6);
-
- Callback() : CallbackBase(NULL) { }
-
- // 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(cef_internal::BindState<Runnable, BindRunType,
- BoundArgsType>* bind_state)
- : CallbackBase(bind_state) {
-
- // Force the assignment to a local variable of PolymorphicInvoke
- // so the compiler will typecheck that the passed in Run() method has
- // the correct type.
- PolymorphicInvoke invoke_func =
- &cef_internal::BindState<Runnable, BindRunType, BoundArgsType>
- ::InvokerType::Run;
- polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);
- }
-
- bool Equals(const Callback& other) const {
- return CallbackBase::Equals(other);
- }
-
- 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(), 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)(
- 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 cef_internal::CallbackBase {
- public:
- typedef R(RunType)(A1, A2, A3, A4, A5, A6, A7);
-
- Callback() : CallbackBase(NULL) { }
-
- // 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(cef_internal::BindState<Runnable, BindRunType,
- BoundArgsType>* bind_state)
- : CallbackBase(bind_state) {
-
- // Force the assignment to a local variable of PolymorphicInvoke
- // so the compiler will typecheck that the passed in Run() method has
- // the correct type.
- PolymorphicInvoke invoke_func =
- &cef_internal::BindState<Runnable, BindRunType, BoundArgsType>
- ::InvokerType::Run;
- polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func);
- }
-
- bool Equals(const Callback& other) const {
- return CallbackBase::Equals(other);
- }
-
- 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(), 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)(
- 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);
-
-};
-
-
-// Syntactic sugar to make Callbacks<void(void)> easier to declare since it
-// will be used in a lot of APIs with delayed execution.
-typedef Callback<void(void)> Closure;
-
-} // namespace base
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_CALLBACK_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_
-#define INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_
-#pragma once
-
-#if defined(BASE_CALLBACK_FORWARD_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/callback_forward.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-namespace base {
-
-template <typename Sig>
-class Callback;
-
-typedef Callback<void(void)> Closure;
-
-} // namespace base
-
-#endif // !!BUILDING_CEF_SHARED
-
-#endif // INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This defines helpful methods for dealing with Callbacks. Because Callbacks
-// are implemented using templates, with a class per callback signature, adding
-// methods to Callback<> itself is unattractive (lots of extra code gets
-// generated). Instead, consider adding methods here.
-//
-// ResetAndReturn(&cb) is like cb.Reset() but allows executing a callback (via a
-// copy) after the original callback is Reset(). This can be handy if Run()
-// reads/writes the variable holding the Callback.
-
-#ifndef CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_
-#define CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_
-#pragma once
-
-#if defined(BASE_CALLBACK_HELPERS_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/callback_helpers.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include "include/base/cef_basictypes.h"
-#include "include/base/cef_build.h"
-#include "include/base/cef_callback.h"
-#include "include/base/cef_macros.h"
-
-namespace base {
-
-template <typename Sig>
-base::Callback<Sig> ResetAndReturn(base::Callback<Sig>* cb) {
- base::Callback<Sig> ret(*cb);
- cb->Reset();
- return ret;
-}
-
-// ScopedClosureRunner is akin to scoped_ptr for Closures. It ensures that the
-// Closure is executed and deleted no matter how the current scope exits.
-class ScopedClosureRunner {
- public:
- ScopedClosureRunner();
- explicit ScopedClosureRunner(const Closure& closure);
- ~ScopedClosureRunner();
-
- void Reset();
- void Reset(const Closure& closure);
- Closure Release() WARN_UNUSED_RESULT;
-
- private:
- Closure closure_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedClosureRunner);
-};
-
-} // namespace base
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2013
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef CEF_INCLUDE_BASE_CEF_CALLBACK_LIST_H_
-#define CEF_INCLUDE_BASE_CEF_CALLBACK_LIST_H_
-#pragma once
-
-#if defined(BASE_CALLBACK_LIST_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/callback_list.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include <list>
-
-#include "include/base/cef_basictypes.h"
-#include "include/base/cef_callback.h"
-#include "include/base/internal/cef_callback_internal.h"
-#include "include/base/cef_build.h"
-#include "include/base/cef_logging.h"
-#include "include/base/cef_macros.h"
-#include "include/base/cef_scoped_ptr.h"
-
-// OVERVIEW:
-//
-// A container for a list of callbacks. Unlike a normal STL vector or list,
-// this container can be modified during iteration without invalidating the
-// iterator. It safely handles the case of a callback removing itself
-// or another callback from the list while callbacks are being run.
-//
-// TYPICAL USAGE:
-//
-// class MyWidget {
-// public:
-// ...
-//
-// typedef base::Callback<void(const Foo&)> OnFooCallback;
-//
-// scoped_ptr<base::CallbackList<void(const Foo&)>::Subscription>
-// RegisterCallback(const OnFooCallback& cb) {
-// return callback_list_.Add(cb);
-// }
-//
-// private:
-// void NotifyFoo(const Foo& foo) {
-// callback_list_.Notify(foo);
-// }
-//
-// base::CallbackList<void(const Foo&)> callback_list_;
-//
-// DISALLOW_COPY_AND_ASSIGN(MyWidget);
-// };
-//
-//
-// class MyWidgetListener {
-// public:
-// MyWidgetListener::MyWidgetListener() {
-// foo_subscription_ = MyWidget::GetCurrent()->RegisterCallback(
-// base::Bind(&MyWidgetListener::OnFoo, this)));
-// }
-//
-// MyWidgetListener::~MyWidgetListener() {
-// // Subscription gets deleted automatically and will deregister
-// // the callback in the process.
-// }
-//
-// private:
-// void OnFoo(const Foo& foo) {
-// // Do something.
-// }
-//
-// scoped_ptr<base::CallbackList<void(const Foo&)>::Subscription>
-// foo_subscription_;
-//
-// DISALLOW_COPY_AND_ASSIGN(MyWidgetListener);
-// };
-
-namespace base {
-
-namespace cef_internal {
-
-template <typename CallbackType>
-class CallbackListBase {
- public:
- class Subscription {
- public:
- Subscription(CallbackListBase<CallbackType>* list,
- typename std::list<CallbackType>::iterator iter)
- : list_(list),
- iter_(iter) {
- }
-
- ~Subscription() {
- if (list_->active_iterator_count_) {
- iter_->Reset();
- } else {
- list_->callbacks_.erase(iter_);
- if (!list_->removal_callback_.is_null())
- list_->removal_callback_.Run();
- }
- }
-
- private:
- CallbackListBase<CallbackType>* list_;
- typename std::list<CallbackType>::iterator iter_;
-
- DISALLOW_COPY_AND_ASSIGN(Subscription);
- };
-
- // Add a callback to the list. The callback will remain registered until the
- // returned Subscription is destroyed, which must occur before the
- // CallbackList is destroyed.
- scoped_ptr<Subscription> Add(const CallbackType& cb) WARN_UNUSED_RESULT {
- DCHECK(!cb.is_null());
- return scoped_ptr<Subscription>(
- new Subscription(this, callbacks_.insert(callbacks_.end(), cb)));
- }
-
- // Sets a callback which will be run when a subscription list is changed.
- void set_removal_callback(const Closure& callback) {
- removal_callback_ = callback;
- }
-
- // Returns true if there are no subscriptions. This is only valid to call when
- // not looping through the list.
- bool empty() {
- DCHECK_EQ(0, active_iterator_count_);
- return callbacks_.empty();
- }
-
- protected:
- // An iterator class that can be used to access the list of callbacks.
- class Iterator {
- public:
- explicit Iterator(CallbackListBase<CallbackType>* list)
- : list_(list),
- list_iter_(list_->callbacks_.begin()) {
- ++list_->active_iterator_count_;
- }
-
- Iterator(const Iterator& iter)
- : list_(iter.list_),
- list_iter_(iter.list_iter_) {
- ++list_->active_iterator_count_;
- }
-
- ~Iterator() {
- if (list_ && --list_->active_iterator_count_ == 0) {
- list_->Compact();
- }
- }
-
- CallbackType* GetNext() {
- while ((list_iter_ != list_->callbacks_.end()) && list_iter_->is_null())
- ++list_iter_;
-
- CallbackType* cb = NULL;
- if (list_iter_ != list_->callbacks_.end()) {
- cb = &(*list_iter_);
- ++list_iter_;
- }
- return cb;
- }
-
- private:
- CallbackListBase<CallbackType>* list_;
- typename std::list<CallbackType>::iterator list_iter_;
- };
-
- CallbackListBase() : active_iterator_count_(0) {}
-
- ~CallbackListBase() {
- DCHECK_EQ(0, active_iterator_count_);
- DCHECK_EQ(0U, callbacks_.size());
- }
-
- // Returns an instance of a CallbackListBase::Iterator which can be used
- // to run callbacks.
- Iterator GetIterator() {
- return Iterator(this);
- }
-
- // Compact the list: remove any entries which were NULLed out during
- // iteration.
- void Compact() {
- typename std::list<CallbackType>::iterator it = callbacks_.begin();
- bool updated = false;
- while (it != callbacks_.end()) {
- if ((*it).is_null()) {
- updated = true;
- it = callbacks_.erase(it);
- } else {
- ++it;
- }
-
- if (updated && !removal_callback_.is_null())
- removal_callback_.Run();
- }
- }
-
- private:
- std::list<CallbackType> callbacks_;
- int active_iterator_count_;
- Closure removal_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(CallbackListBase);
-};
-
-} // namespace cef_internal
-
-template <typename Sig> class CallbackList;
-
-template <>
-class CallbackList<void(void)>
- : public cef_internal::CallbackListBase<Callback<void(void)> > {
- public:
- typedef Callback<void(void)> CallbackType;
-
- CallbackList() {}
-
- void Notify() {
- cef_internal::CallbackListBase<CallbackType>::Iterator it =
- this->GetIterator();
- CallbackType* cb;
- while ((cb = it.GetNext()) != NULL) {
- cb->Run();
- }
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CallbackList);
-};
-
-template <typename A1>
-class CallbackList<void(A1)>
- : public cef_internal::CallbackListBase<Callback<void(A1)> > {
- public:
- typedef Callback<void(A1)> CallbackType;
-
- CallbackList() {}
-
- 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) {
- cb->Run(a1);
- }
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CallbackList);
-};
-
-template <typename A1, typename A2>
-class CallbackList<void(A1, A2)>
- : public cef_internal::CallbackListBase<Callback<void(A1, A2)> > {
- public:
- typedef Callback<void(A1, A2)> CallbackType;
-
- CallbackList() {}
-
- 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) {
- cb->Run(a1, a2);
- }
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CallbackList);
-};
-
-template <typename A1, typename A2, typename A3>
-class CallbackList<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 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) {
- cb->Run(a1, a2, a3);
- }
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CallbackList);
-};
-
-template <typename A1, typename A2, typename A3, typename A4>
-class CallbackList<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 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) {
- cb->Run(a1, a2, a3, a4);
- }
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CallbackList);
-};
-
-template <typename A1, typename A2, typename A3, typename A4, typename A5>
-class CallbackList<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 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) {
- cb->Run(a1, a2, a3, a4, a5);
- }
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CallbackList);
-};
-
-template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6>
-class CallbackList<void(A1, A2, A3, A4, A5, A6)>
- : 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 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) {
- cb->Run(a1, a2, a3, a4, a5, a6);
- }
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CallbackList);
-};
-
-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 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 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) {
- cb->Run(a1, a2, a3, a4, a5, a6, a7);
- }
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CallbackList);
-};
-
-} // namespace base
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_CALLBACK_LIST_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// CancelableCallback is a wrapper around base::Callback that allows
-// cancellation of a callback. CancelableCallback takes a reference on the
-// wrapped callback until this object is destroyed or Reset()/Cancel() are
-// called.
-//
-// NOTE:
-//
-// Calling CancelableCallback::Cancel() brings the object back to its natural,
-// default-constructed state, i.e., CancelableCallback::callback() will return
-// a null callback.
-//
-// THREAD-SAFETY:
-//
-// CancelableCallback objects must be created on, posted to, cancelled on, and
-// destroyed on the same thread.
-//
-//
-// EXAMPLE USAGE:
-//
-// In the following example, the test is verifying that RunIntensiveTest()
-// Quit()s the message loop within 4 seconds. The cancelable callback is posted
-// to the message loop, the intensive test runs, the message loop is run,
-// then the callback is cancelled.
-//
-// void TimeoutCallback(const std::string& timeout_message) {
-// FAIL() << timeout_message;
-// MessageLoop::current()->QuitWhenIdle();
-// }
-//
-// CancelableClosure timeout(base::Bind(&TimeoutCallback, "Test timed out."));
-// MessageLoop::current()->PostDelayedTask(FROM_HERE, timeout.callback(),
-// 4000) // 4 seconds to run.
-// RunIntensiveTest();
-// MessageLoop::current()->Run();
-// timeout.Cancel(); // Hopefully this is hit before the timeout callback runs.
-//
-
-#ifndef CEF_INCLUDE_BASE_CEF_CANCELABLE_CALLBACK_H_
-#define CEF_INCLUDE_BASE_CEF_CANCELABLE_CALLBACK_H_
-#pragma once
-
-#if defined(BASE_CANCELABLE_CALLBACK_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/cancelable_callback.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include "include/base/cef_bind.h"
-#include "include/base/cef_callback.h"
-#include "include/base/cef_build.h"
-#include "include/base/cef_logging.h"
-#include "include/base/cef_macros.h"
-#include "include/base/cef_weak_ptr.h"
-#include "include/base/internal/cef_callback_internal.h"
-
-namespace base {
-
-template <typename Sig>
-class CancelableCallback;
-
-template <>
-class CancelableCallback<void(void)> {
- public:
- CancelableCallback() : weak_factory_(this) {}
-
- // |callback| must not be null.
- explicit CancelableCallback(const base::Callback<void(void)>& callback)
- : weak_factory_(this),
- callback_(callback) {
- DCHECK(!callback.is_null());
- InitializeForwarder();
- }
-
- ~CancelableCallback() {}
-
- // Cancels and drops the reference to the wrapped callback.
- void Cancel() {
- weak_factory_.InvalidateWeakPtrs();
- forwarder_.Reset();
- callback_.Reset();
- }
-
- // Returns true if the wrapped callback has been cancelled.
- bool IsCancelled() const {
- return callback_.is_null();
- }
-
- // Sets |callback| as the closure that may be cancelled. |callback| may not
- // be null. Outstanding and any previously wrapped callbacks are cancelled.
- void Reset(const base::Callback<void(void)>& callback) {
- DCHECK(!callback.is_null());
-
- // Outstanding tasks (e.g., posted to a message loop) must not be called.
- Cancel();
-
- // |forwarder_| is no longer valid after Cancel(), so re-bind.
- InitializeForwarder();
-
- callback_ = callback;
- }
-
- // Returns a callback that can be disabled by calling Cancel().
- const base::Callback<void(void)>& callback() const {
- return forwarder_;
- }
-
- private:
- void Forward() {
- callback_.Run();
- }
-
- // Helper method to bind |forwarder_| using a weak pointer from
- // |weak_factory_|.
- void InitializeForwarder() {
- forwarder_ = base::Bind(&CancelableCallback<void(void)>::Forward,
- weak_factory_.GetWeakPtr());
- }
-
- // Used to ensure Forward() is not run when this object is destroyed.
- base::WeakPtrFactory<CancelableCallback<void(void)> > weak_factory_;
-
- // The wrapper closure.
- base::Callback<void(void)> forwarder_;
-
- // The stored closure that may be cancelled.
- base::Callback<void(void)> callback_;
-
- DISALLOW_COPY_AND_ASSIGN(CancelableCallback);
-};
-
-template <typename A1>
-class CancelableCallback<void(A1)> {
- public:
- CancelableCallback() : weak_factory_(this) {}
-
- // |callback| must not be null.
- explicit CancelableCallback(const base::Callback<void(A1)>& callback)
- : weak_factory_(this),
- callback_(callback) {
- DCHECK(!callback.is_null());
- InitializeForwarder();
- }
-
- ~CancelableCallback() {}
-
- // Cancels and drops the reference to the wrapped callback.
- void Cancel() {
- weak_factory_.InvalidateWeakPtrs();
- forwarder_.Reset();
- callback_.Reset();
- }
-
- // Returns true if the wrapped callback has been cancelled.
- bool IsCancelled() const {
- return callback_.is_null();
- }
-
- // Sets |callback| as the closure that may be cancelled. |callback| may not
- // be null. Outstanding and any previously wrapped callbacks are cancelled.
- void Reset(const base::Callback<void(A1)>& callback) {
- DCHECK(!callback.is_null());
-
- // Outstanding tasks (e.g., posted to a message loop) must not be called.
- Cancel();
-
- // |forwarder_| is no longer valid after Cancel(), so re-bind.
- InitializeForwarder();
-
- callback_ = callback;
- }
-
- // Returns a callback that can be disabled by calling Cancel().
- const base::Callback<void(A1)>& callback() const {
- return forwarder_;
- }
-
- private:
- void Forward(A1 a1) const {
- callback_.Run(a1);
- }
-
- // Helper method to bind |forwarder_| using a weak pointer from
- // |weak_factory_|.
- void InitializeForwarder() {
- forwarder_ = base::Bind(&CancelableCallback<void(A1)>::Forward,
- weak_factory_.GetWeakPtr());
- }
-
- // Used to ensure Forward() is not run when this object is destroyed.
- base::WeakPtrFactory<CancelableCallback<void(A1)> > weak_factory_;
-
- // The wrapper closure.
- base::Callback<void(A1)> forwarder_;
-
- // The stored closure that may be cancelled.
- base::Callback<void(A1)> callback_;
-
- DISALLOW_COPY_AND_ASSIGN(CancelableCallback);
-};
-
-template <typename A1, typename A2>
-class CancelableCallback<void(A1, A2)> {
- public:
- CancelableCallback() : weak_factory_(this) {}
-
- // |callback| must not be null.
- explicit CancelableCallback(const base::Callback<void(A1, A2)>& callback)
- : weak_factory_(this),
- callback_(callback) {
- DCHECK(!callback.is_null());
- InitializeForwarder();
- }
-
- ~CancelableCallback() {}
-
- // Cancels and drops the reference to the wrapped callback.
- void Cancel() {
- weak_factory_.InvalidateWeakPtrs();
- forwarder_.Reset();
- callback_.Reset();
- }
-
- // Returns true if the wrapped callback has been cancelled.
- bool IsCancelled() const {
- return callback_.is_null();
- }
-
- // Sets |callback| as the closure that may be cancelled. |callback| may not
- // be null. Outstanding and any previously wrapped callbacks are cancelled.
- void Reset(const base::Callback<void(A1, A2)>& callback) {
- DCHECK(!callback.is_null());
-
- // Outstanding tasks (e.g., posted to a message loop) must not be called.
- Cancel();
-
- // |forwarder_| is no longer valid after Cancel(), so re-bind.
- InitializeForwarder();
-
- callback_ = callback;
- }
-
- // Returns a callback that can be disabled by calling Cancel().
- const base::Callback<void(A1, A2)>& callback() const {
- return forwarder_;
- }
-
- private:
- void Forward(A1 a1, A2 a2) const {
- callback_.Run(a1, a2);
- }
-
- // Helper method to bind |forwarder_| using a weak pointer from
- // |weak_factory_|.
- void InitializeForwarder() {
- forwarder_ = base::Bind(&CancelableCallback<void(A1, A2)>::Forward,
- weak_factory_.GetWeakPtr());
- }
-
- // Used to ensure Forward() is not run when this object is destroyed.
- base::WeakPtrFactory<CancelableCallback<void(A1, A2)> > weak_factory_;
-
- // The wrapper closure.
- base::Callback<void(A1, A2)> forwarder_;
-
- // The stored closure that may be cancelled.
- base::Callback<void(A1, A2)> callback_;
-
- DISALLOW_COPY_AND_ASSIGN(CancelableCallback);
-};
-
-typedef CancelableCallback<void(void)> CancelableClosure;
-
-} // namespace base
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_CANCELABLE_CALLBACK_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef CEF_INCLUDE_BASE_CEF_LOCK_H_
-#define CEF_INCLUDE_BASE_CEF_LOCK_H_
-#pragma once
-
-#if defined(BASE_SYNCHRONIZATION_LOCK_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/synchronization/lock.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include "include/base/cef_macros.h"
-#include "include/base/cef_platform_thread.h"
-#include "include/base/internal/cef_lock_impl.h"
-
-namespace base {
-
-// A convenient wrapper for an OS specific critical section. The only real
-// intelligence in this class is in debug mode for the support for the
-// AssertAcquired() method.
-class Lock {
- public:
-#if defined(NDEBUG) // Optimized wrapper implementation
- Lock() : lock_() {}
- ~Lock() {}
- void Acquire() { lock_.Lock(); }
- void Release() { lock_.Unlock(); }
-
- // If the lock is not held, take it and return true. If the lock is already
- // held by another thread, immediately return false. This must not be called
- // by a thread already holding the lock (what happens is undefined and an
- // assertion may fail).
- bool Try() { return lock_.Try(); }
-
- // Null implementation if not debug.
- void AssertAcquired() const {}
-#else
- Lock();
- ~Lock();
-
- // NOTE: Although windows critical sections support recursive locks, we do not
- // allow this, and we will commonly fire a DCHECK() if a thread attempts to
- // acquire the lock a second time (while already holding it).
- void Acquire() {
- lock_.Lock();
- CheckUnheldAndMark();
- }
- void Release() {
- CheckHeldAndUnmark();
- lock_.Unlock();
- }
-
- bool Try() {
- bool rv = lock_.Try();
- if (rv) {
- CheckUnheldAndMark();
- }
- return rv;
- }
-
- void AssertAcquired() const;
-#endif // NDEBUG
-
- private:
-#if !defined(NDEBUG)
- // Members and routines taking care of locks assertions.
- // Note that this checks for recursive locks and allows them
- // if the variable is set. This is allowed by the underlying implementation
- // on windows but not on Posix, so we're doing unneeded checks on Posix.
- // It's worth it to share the code.
- void CheckHeldAndUnmark();
- void CheckUnheldAndMark();
-
- // All private data is implicitly protected by lock_.
- // Be VERY careful to only access members under that lock.
- base::PlatformThreadRef owning_thread_ref_;
-#endif // NDEBUG
-
- // Platform specific underlying lock implementation.
- cef_internal::LockImpl lock_;
-
- DISALLOW_COPY_AND_ASSIGN(Lock);
-};
-
-// A helper class that acquires the given Lock while the AutoLock is in scope.
-class AutoLock {
- public:
- struct AlreadyAcquired {};
-
- explicit AutoLock(Lock& lock) : lock_(lock) {
- lock_.Acquire();
- }
-
- AutoLock(Lock& lock, const AlreadyAcquired&) : lock_(lock) {
- lock_.AssertAcquired();
- }
-
- ~AutoLock() {
- lock_.AssertAcquired();
- lock_.Release();
- }
-
- private:
- Lock& lock_;
- DISALLOW_COPY_AND_ASSIGN(AutoLock);
-};
-
-// AutoUnlock is a helper that will Release() the |lock| argument in the
-// constructor, and re-Acquire() it in the destructor.
-class AutoUnlock {
- public:
- explicit AutoUnlock(Lock& lock) : lock_(lock) {
- // We require our caller to have the lock.
- lock_.AssertAcquired();
- lock_.Release();
- }
-
- ~AutoUnlock() {
- lock_.Acquire();
- }
-
- private:
- Lock& lock_;
- DISALLOW_COPY_AND_ASSIGN(AutoUnlock);
-};
-
-} // namespace base
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_LOCK_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// ---------------------------------------------------------------------------
-//
-// The contents of this file are only available to applications that link
-// against the libcef_dll_wrapper target.
-//
-// WARNING: Logging macros should not be used in the main/browser process before
-// calling CefInitialize or in sub-processes before calling CefExecuteProcess.
-//
-// Instructions
-// ------------
-//
-// Make a bunch of macros for logging. The way to log things is to stream
-// things to LOG(<a particular severity level>). E.g.,
-//
-// LOG(INFO) << "Found " << num_cookies << " cookies";
-//
-// You can also do conditional logging:
-//
-// LOG_IF(INFO, num_cookies > 10) << "Got lots of cookies";
-//
-// The CHECK(condition) macro is active in both debug and release builds and
-// effectively performs a LOG(FATAL) which terminates the process and
-// generates a crashdump unless a debugger is attached.
-//
-// There are also "debug mode" logging macros like the ones above:
-//
-// DLOG(INFO) << "Found cookies";
-//
-// DLOG_IF(INFO, num_cookies > 10) << "Got lots of cookies";
-//
-// All "debug mode" logging is compiled away to nothing for non-debug mode
-// compiles. LOG_IF and development flags also work well together
-// because the code can be compiled away sometimes.
-//
-// We also have
-//
-// LOG_ASSERT(assertion);
-// DLOG_ASSERT(assertion);
-//
-// which is syntactic sugar for {,D}LOG_IF(FATAL, assert fails) << assertion;
-//
-// There are "verbose level" logging macros. They look like
-//
-// VLOG(1) << "I'm printed when you run the program with --v=1 or more";
-// VLOG(2) << "I'm printed when you run the program with --v=2 or more";
-//
-// These always log at the INFO log level (when they log at all).
-// The verbose logging can also be turned on module-by-module. For instance,
-// --vmodule=profile=2,icon_loader=1,browser_*=3,*/chromeos/*=4 --v=0
-// will cause:
-// a. VLOG(2) and lower messages to be printed from profile.{h,cc}
-// b. VLOG(1) and lower messages to be printed from icon_loader.{h,cc}
-// c. VLOG(3) and lower messages to be printed from files prefixed with
-// "browser"
-// d. VLOG(4) and lower messages to be printed from files under a
-// "chromeos" directory.
-// e. VLOG(0) and lower messages to be printed from elsewhere
-//
-// The wildcarding functionality shown by (c) supports both '*' (match
-// 0 or more characters) and '?' (match any single character)
-// wildcards. Any pattern containing a forward or backward slash will
-// be tested against the whole pathname and not just the module.
-// E.g., "*/foo/bar/*=2" would change the logging level for all code
-// in source files under a "foo/bar" directory.
-//
-// There's also VLOG_IS_ON(n) "verbose level" condition macro. To be used as
-//
-// if (VLOG_IS_ON(2)) {
-// // do some logging preparation and logging
-// // that can't be accomplished with just VLOG(2) << ...;
-// }
-//
-// There is also a VLOG_IF "verbose level" condition macro for sample
-// cases, when some extra computation and preparation for logs is not
-// needed.
-//
-// VLOG_IF(1, (size > 1024))
-// << "I'm printed when size is more than 1024 and when you run the "
-// "program with --v=1 or more";
-//
-// We also override the standard 'assert' to use 'DLOG_ASSERT'.
-//
-// Lastly, there is:
-//
-// PLOG(ERROR) << "Couldn't do foo";
-// DPLOG(ERROR) << "Couldn't do foo";
-// PLOG_IF(ERROR, cond) << "Couldn't do foo";
-// DPLOG_IF(ERROR, cond) << "Couldn't do foo";
-// PCHECK(condition) << "Couldn't do foo";
-// DPCHECK(condition) << "Couldn't do foo";
-//
-// which append the last system error to the message in string form (taken from
-// GetLastError() on Windows and errno on POSIX).
-//
-// The supported severity levels for macros that allow you to specify one
-// are (in increasing order of severity) INFO, WARNING, ERROR, and FATAL.
-//
-// Very important: logging a message at the FATAL severity level causes
-// the program to terminate (after the message is logged).
-//
-// There is the special severity of DFATAL, which logs FATAL in debug mode,
-// ERROR in normal mode.
-//
-
-#ifndef CEF_INCLUDE_BASE_CEF_LOGGING_H_
-#define CEF_INCLUDE_BASE_CEF_LOGGING_H_
-#pragma once
-
-#if defined(DCHECK)
-// Do nothing if the macros provided by this header already exist.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/logging.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include <cassert>
-#include <string>
-#include <cstring>
-#include <sstream>
-
-#include "include/base/cef_build.h"
-#include "include/base/cef_macros.h"
-#include "include/internal/cef_logging_internal.h"
-
-namespace cef {
-namespace logging {
-
-// Gets the current log level.
-inline int GetMinLogLevel() {
- return cef_get_min_log_level();
-}
-
-// Gets the current vlog level for the given file (usually taken from
-// __FILE__). Note that |N| is the size *with* the null terminator.
-template <size_t N>
-int GetVlogLevel(const char (&file)[N]) {
- return cef_get_vlog_level(file, N);
-}
-
-typedef int LogSeverity;
-const LogSeverity LOG_VERBOSE = -1; // This is level 1 verbosity
-// Note: the log severities are used to index into the array of names,
-// see log_severity_names.
-const LogSeverity LOG_INFO = 0;
-const LogSeverity LOG_WARNING = 1;
-const LogSeverity LOG_ERROR = 2;
-const LogSeverity LOG_FATAL = 3;
-const LogSeverity LOG_NUM_SEVERITIES = 4;
-
-// LOG_DFATAL is LOG_FATAL in debug mode, ERROR in normal mode
-#ifdef NDEBUG
-const LogSeverity LOG_DFATAL = LOG_ERROR;
-#else
-const LogSeverity LOG_DFATAL = LOG_FATAL;
-#endif
-
-// A few definitions of macros that don't generate much code. These are used
-// by LOG() and LOG_IF, etc. Since these are used all over our code, it's
-// better to have compact code for these operations.
-#define COMPACT_GOOGLE_LOG_EX_INFO(ClassName, ...) \
- cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_INFO , \
- ##__VA_ARGS__)
-#define COMPACT_GOOGLE_LOG_EX_WARNING(ClassName, ...) \
- cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_WARNING , \
- ##__VA_ARGS__)
-#define COMPACT_GOOGLE_LOG_EX_ERROR(ClassName, ...) \
- cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_ERROR , \
- ##__VA_ARGS__)
-#define COMPACT_GOOGLE_LOG_EX_FATAL(ClassName, ...) \
- cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_FATAL , \
- ##__VA_ARGS__)
-#define COMPACT_GOOGLE_LOG_EX_DFATAL(ClassName, ...) \
- cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_DFATAL , \
- ##__VA_ARGS__)
-
-#define COMPACT_GOOGLE_LOG_INFO \
- COMPACT_GOOGLE_LOG_EX_INFO(LogMessage)
-#define COMPACT_GOOGLE_LOG_WARNING \
- COMPACT_GOOGLE_LOG_EX_WARNING(LogMessage)
-#define COMPACT_GOOGLE_LOG_ERROR \
- COMPACT_GOOGLE_LOG_EX_ERROR(LogMessage)
-#define COMPACT_GOOGLE_LOG_FATAL \
- COMPACT_GOOGLE_LOG_EX_FATAL(LogMessage)
-#define COMPACT_GOOGLE_LOG_DFATAL \
- COMPACT_GOOGLE_LOG_EX_DFATAL(LogMessage)
-
-#if defined(OS_WIN)
-// wingdi.h defines ERROR to be 0. When we call LOG(ERROR), it gets
-// substituted with 0, and it expands to COMPACT_GOOGLE_LOG_0. To allow us
-// to keep using this syntax, we define this macro to do the same thing
-// as COMPACT_GOOGLE_LOG_ERROR, and also define ERROR the same way that
-// the Windows SDK does for consistency.
-#define ERROR 0
-#define COMPACT_GOOGLE_LOG_EX_0(ClassName, ...) \
- COMPACT_GOOGLE_LOG_EX_ERROR(ClassName , ##__VA_ARGS__)
-#define COMPACT_GOOGLE_LOG_0 COMPACT_GOOGLE_LOG_ERROR
-// Needed for LOG_IS_ON(ERROR).
-const LogSeverity LOG_0 = LOG_ERROR;
-#endif
-
-// As special cases, we can assume that LOG_IS_ON(FATAL) always holds. Also,
-// LOG_IS_ON(DFATAL) always holds in debug mode. In particular, CHECK()s will
-// always fire if they fail.
-#define LOG_IS_ON(severity) \
- ((::cef::logging::LOG_ ## severity) >= ::cef::logging::GetMinLogLevel())
-
-// We can't do any caching tricks with VLOG_IS_ON() like the
-// google-glog version since it requires GCC extensions. This means
-// that using the v-logging functions in conjunction with --vmodule
-// may be slow.
-#define VLOG_IS_ON(verboselevel) \
- ((verboselevel) <= ::cef::logging::GetVlogLevel(__FILE__))
-
-// Helper macro which avoids evaluating the arguments to a stream if
-// the condition doesn't hold.
-#define LAZY_STREAM(stream, condition) \
- !(condition) ? (void) 0 : ::cef::logging::LogMessageVoidify() & (stream)
-
-// We use the preprocessor's merging operator, "##", so that, e.g.,
-// LOG(INFO) becomes the token COMPACT_GOOGLE_LOG_INFO. There's some funny
-// subtle difference between ostream member streaming functions (e.g.,
-// ostream::operator<<(int) and ostream non-member streaming functions
-// (e.g., ::operator<<(ostream&, string&): it turns out that it's
-// impossible to stream something like a string directly to an unnamed
-// ostream. We employ a neat hack by calling the stream() member
-// function of LogMessage which seems to avoid the problem.
-#define LOG_STREAM(severity) COMPACT_GOOGLE_LOG_ ## severity.stream()
-
-#define LOG(severity) LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity))
-#define LOG_IF(severity, condition) \
- LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity) && (condition))
-
-#define SYSLOG(severity) LOG(severity)
-#define SYSLOG_IF(severity, condition) LOG_IF(severity, condition)
-
-// The VLOG macros log with negative verbosities.
-#define VLOG_STREAM(verbose_level) \
- cef::logging::LogMessage(__FILE__, __LINE__, -verbose_level).stream()
-
-#define VLOG(verbose_level) \
- LAZY_STREAM(VLOG_STREAM(verbose_level), VLOG_IS_ON(verbose_level))
-
-#define VLOG_IF(verbose_level, condition) \
- LAZY_STREAM(VLOG_STREAM(verbose_level), \
- VLOG_IS_ON(verbose_level) && (condition))
-
-#if defined (OS_WIN)
-#define VPLOG_STREAM(verbose_level) \
- cef::logging::Win32ErrorLogMessage(__FILE__, __LINE__, -verbose_level, \
- ::cef::logging::GetLastSystemErrorCode()).stream()
-#elif defined(OS_POSIX)
-#define VPLOG_STREAM(verbose_level) \
- cef::logging::ErrnoLogMessage(__FILE__, __LINE__, -verbose_level, \
- ::cef::logging::GetLastSystemErrorCode()).stream()
-#endif
-
-#define VPLOG(verbose_level) \
- LAZY_STREAM(VPLOG_STREAM(verbose_level), VLOG_IS_ON(verbose_level))
-
-#define VPLOG_IF(verbose_level, condition) \
- LAZY_STREAM(VPLOG_STREAM(verbose_level), \
- VLOG_IS_ON(verbose_level) && (condition))
-
-// TODO(akalin): Add more VLOG variants, e.g. VPLOG.
-
-#define LOG_ASSERT(condition) \
- LOG_IF(FATAL, !(condition)) << "Assert failed: " #condition ". "
-#define SYSLOG_ASSERT(condition) \
- SYSLOG_IF(FATAL, !(condition)) << "Assert failed: " #condition ". "
-
-#if defined(OS_WIN)
-#define PLOG_STREAM(severity) \
- COMPACT_GOOGLE_LOG_EX_ ## severity(Win32ErrorLogMessage, \
- ::cef::logging::GetLastSystemErrorCode()).stream()
-#elif defined(OS_POSIX)
-#define PLOG_STREAM(severity) \
- COMPACT_GOOGLE_LOG_EX_ ## severity(ErrnoLogMessage, \
- ::cef::logging::GetLastSystemErrorCode()).stream()
-#endif
-
-#define PLOG(severity) \
- LAZY_STREAM(PLOG_STREAM(severity), LOG_IS_ON(severity))
-
-#define PLOG_IF(severity, condition) \
- LAZY_STREAM(PLOG_STREAM(severity), LOG_IS_ON(severity) && (condition))
-
-// The actual stream used isn't important.
-#define EAT_STREAM_PARAMETERS \
- true ? (void) 0 : ::cef::logging::LogMessageVoidify() & LOG_STREAM(FATAL)
-
-// CHECK dies with a fatal error if condition is not true. It is *not*
-// controlled by NDEBUG, so the check will be executed regardless of
-// compilation mode.
-//
-// We make sure CHECK et al. always evaluates their arguments, as
-// doing CHECK(FunctionWithSideEffect()) is a common idiom.
-
-#define CHECK(condition) \
- LAZY_STREAM(LOG_STREAM(FATAL), !(condition)) \
- << "Check failed: " #condition ". "
-
-#define PCHECK(condition) \
- LAZY_STREAM(PLOG_STREAM(FATAL), !(condition)) \
- << "Check failed: " #condition ". "
-
-// Helper macro for binary operators.
-// Don't use this macro directly in your code, use CHECK_EQ et al below.
-//
-// TODO(akalin): Rewrite this so that constructs like if (...)
-// CHECK_EQ(...) else { ... } work properly.
-#define CHECK_OP(name, op, val1, val2) \
- if (std::string* _result = \
- cef::logging::Check##name##Impl((val1), (val2), \
- #val1 " " #op " " #val2)) \
- cef::logging::LogMessage(__FILE__, __LINE__, _result).stream()
-
-// Build the error message string. This is separate from the "Impl"
-// function template because it is not performance critical and so can
-// be out of line, while the "Impl" code should be inline. Caller
-// takes ownership of the returned string.
-template<class t1, class t2>
-std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
- std::ostringstream ss;
- ss << names << " (" << v1 << " vs. " << v2 << ")";
- std::string* msg = new std::string(ss.str());
- return msg;
-}
-
-// MSVC doesn't like complex extern templates and DLLs.
-#if !defined(COMPILER_MSVC)
-// Commonly used instantiations of MakeCheckOpString<>. Explicitly instantiated
-// in logging.cc.
-extern template std::string* MakeCheckOpString<int, int>(
- const int&, const int&, const char* names);
-extern template
-std::string* MakeCheckOpString<unsigned long, unsigned long>(
- const unsigned long&, const unsigned long&, const char* names);
-extern template
-std::string* MakeCheckOpString<unsigned long, unsigned int>(
- const unsigned long&, const unsigned int&, const char* names);
-extern template
-std::string* MakeCheckOpString<unsigned int, unsigned long>(
- const unsigned int&, const unsigned long&, const char* names);
-extern template
-std::string* MakeCheckOpString<std::string, std::string>(
- const std::string&, const std::string&, const char* name);
-#endif
-
-// Helper functions for CHECK_OP macro.
-// The (int, int) specialization works around the issue that the compiler
-// will not instantiate the template version of the function on values of
-// unnamed enum type - see comment below.
-#define DEFINE_CHECK_OP_IMPL(name, op) \
- template <class t1, class t2> \
- inline std::string* Check##name##Impl(const t1& v1, const t2& v2, \
- const char* names) { \
- if (v1 op v2) return NULL; \
- else return MakeCheckOpString(v1, v2, names); \
- } \
- inline std::string* Check##name##Impl(int v1, int v2, const char* names) { \
- if (v1 op v2) return NULL; \
- else return MakeCheckOpString(v1, v2, names); \
- }
-DEFINE_CHECK_OP_IMPL(EQ, ==)
-DEFINE_CHECK_OP_IMPL(NE, !=)
-DEFINE_CHECK_OP_IMPL(LE, <=)
-DEFINE_CHECK_OP_IMPL(LT, < )
-DEFINE_CHECK_OP_IMPL(GE, >=)
-DEFINE_CHECK_OP_IMPL(GT, > )
-#undef DEFINE_CHECK_OP_IMPL
-
-#define CHECK_EQ(val1, val2) CHECK_OP(EQ, ==, val1, val2)
-#define CHECK_NE(val1, val2) CHECK_OP(NE, !=, val1, val2)
-#define CHECK_LE(val1, val2) CHECK_OP(LE, <=, val1, val2)
-#define CHECK_LT(val1, val2) CHECK_OP(LT, < , val1, val2)
-#define CHECK_GE(val1, val2) CHECK_OP(GE, >=, val1, val2)
-#define CHECK_GT(val1, val2) CHECK_OP(GT, > , val1, val2)
-
-#if defined(NDEBUG)
-#define ENABLE_DLOG 0
-#else
-#define ENABLE_DLOG 1
-#endif
-
-#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
-#define DCHECK_IS_ON 0
-#else
-#define DCHECK_IS_ON 1
-#endif
-
-// Definitions for DLOG et al.
-
-#if ENABLE_DLOG
-
-#define DLOG_IS_ON(severity) LOG_IS_ON(severity)
-#define DLOG_IF(severity, condition) LOG_IF(severity, condition)
-#define DLOG_ASSERT(condition) LOG_ASSERT(condition)
-#define DPLOG_IF(severity, condition) PLOG_IF(severity, condition)
-#define DVLOG_IF(verboselevel, condition) VLOG_IF(verboselevel, condition)
-#define DVPLOG_IF(verboselevel, condition) VPLOG_IF(verboselevel, condition)
-
-#else // ENABLE_DLOG
-
-// If ENABLE_DLOG is off, we want to avoid emitting any references to
-// |condition| (which may reference a variable defined only if NDEBUG
-// is not defined). Contrast this with DCHECK et al., which has
-// different behavior.
-
-#define DLOG_IS_ON(severity) false
-#define DLOG_IF(severity, condition) EAT_STREAM_PARAMETERS
-#define DLOG_ASSERT(condition) EAT_STREAM_PARAMETERS
-#define DPLOG_IF(severity, condition) EAT_STREAM_PARAMETERS
-#define DVLOG_IF(verboselevel, condition) EAT_STREAM_PARAMETERS
-#define DVPLOG_IF(verboselevel, condition) EAT_STREAM_PARAMETERS
-
-#endif // ENABLE_DLOG
-
-// DEBUG_MODE is for uses like
-// if (DEBUG_MODE) foo.CheckThatFoo();
-// instead of
-// #ifndef NDEBUG
-// foo.CheckThatFoo();
-// #endif
-//
-// We tie its state to ENABLE_DLOG.
-enum { DEBUG_MODE = ENABLE_DLOG };
-
-#undef ENABLE_DLOG
-
-#define DLOG(severity) \
- LAZY_STREAM(LOG_STREAM(severity), DLOG_IS_ON(severity))
-
-#define DPLOG(severity) \
- LAZY_STREAM(PLOG_STREAM(severity), DLOG_IS_ON(severity))
-
-#define DVLOG(verboselevel) DVLOG_IF(verboselevel, VLOG_IS_ON(verboselevel))
-
-#define DVPLOG(verboselevel) DVPLOG_IF(verboselevel, VLOG_IS_ON(verboselevel))
-
-// Definitions for DCHECK et al.
-
-#if DCHECK_IS_ON
-
-#define COMPACT_GOOGLE_LOG_EX_DCHECK(ClassName, ...) \
- COMPACT_GOOGLE_LOG_EX_FATAL(ClassName , ##__VA_ARGS__)
-#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_FATAL
-const LogSeverity LOG_DCHECK = LOG_FATAL;
-
-#else // DCHECK_IS_ON
-
-// These are just dummy values.
-#define COMPACT_GOOGLE_LOG_EX_DCHECK(ClassName, ...) \
- COMPACT_GOOGLE_LOG_EX_INFO(ClassName , ##__VA_ARGS__)
-#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_INFO
-const LogSeverity LOG_DCHECK = LOG_INFO;
-
-#endif // DCHECK_IS_ON
-
-// DCHECK et al. make sure to reference |condition| regardless of
-// whether DCHECKs are enabled; this is so that we don't get unused
-// variable warnings if the only use of a variable is in a DCHECK.
-// This behavior is different from DLOG_IF et al.
-
-#define DCHECK(condition) \
- LAZY_STREAM(LOG_STREAM(DCHECK), DCHECK_IS_ON && !(condition)) \
- << "Check failed: " #condition ". "
-
-#define DPCHECK(condition) \
- LAZY_STREAM(PLOG_STREAM(DCHECK), DCHECK_IS_ON && !(condition)) \
- << "Check failed: " #condition ". "
-
-// Helper macro for binary operators.
-// Don't use this macro directly in your code, use DCHECK_EQ et al below.
-#define DCHECK_OP(name, op, val1, val2) \
- if (DCHECK_IS_ON) \
- if (std::string* _result = \
- cef::logging::Check##name##Impl((val1), (val2), \
- #val1 " " #op " " #val2)) \
- cef::logging::LogMessage( \
- __FILE__, __LINE__, ::cef::logging::LOG_DCHECK, \
- _result).stream()
-
-// Equality/Inequality checks - compare two values, and log a
-// LOG_DCHECK message including the two values when the result is not
-// as expected. The values must have operator<<(ostream, ...)
-// defined.
-//
-// You may append to the error message like so:
-// DCHECK_NE(1, 2) << ": The world must be ending!";
-//
-// We are very careful to ensure that each argument is evaluated exactly
-// once, and that anything which is legal to pass as a function argument is
-// legal here. In particular, the arguments may be temporary expressions
-// which will end up being destroyed at the end of the apparent statement,
-// for example:
-// DCHECK_EQ(string("abc")[1], 'b');
-//
-// WARNING: These may not compile correctly if one of the arguments is a pointer
-// and the other is NULL. To work around this, simply static_cast NULL to the
-// type of the desired pointer.
-
-#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
-#define DCHECK_NE(val1, val2) DCHECK_OP(NE, !=, val1, val2)
-#define DCHECK_LE(val1, val2) DCHECK_OP(LE, <=, val1, val2)
-#define DCHECK_LT(val1, val2) DCHECK_OP(LT, < , val1, val2)
-#define DCHECK_GE(val1, val2) DCHECK_OP(GE, >=, val1, val2)
-#define DCHECK_GT(val1, val2) DCHECK_OP(GT, > , val1, val2)
-
-#if defined(NDEBUG) && defined(OS_CHROMEOS)
-#define NOTREACHED() LOG(ERROR) << "NOTREACHED() hit in " << \
- __FUNCTION__ << ". "
-#else
-#define NOTREACHED() DCHECK(false)
-#endif
-
-// Redefine the standard assert to use our nice log files
-#undef assert
-#define assert(x) DLOG_ASSERT(x)
-
-// This class more or less represents a particular log message. You
-// create an instance of LogMessage and then stream stuff to it.
-// When you finish streaming to it, ~LogMessage is called and the
-// full message gets streamed to the appropriate destination.
-//
-// You shouldn't actually use LogMessage's constructor to log things,
-// though. You should use the LOG() macro (and variants thereof)
-// above.
-class LogMessage {
- public:
- // Used for LOG(severity).
- LogMessage(const char* file, int line, LogSeverity severity);
-
- // Used for CHECK_EQ(), etc. Takes ownership of the given string.
- // Implied severity = LOG_FATAL.
- LogMessage(const char* file, int line, std::string* result);
-
- // Used for DCHECK_EQ(), etc. Takes ownership of the given string.
- LogMessage(const char* file, int line, LogSeverity severity,
- std::string* result);
-
- ~LogMessage();
-
- std::ostream& stream() { return stream_; }
-
- private:
- LogSeverity severity_;
- std::ostringstream stream_;
-
- // The file and line information passed in to the constructor.
- const char* file_;
- const int line_;
-
-#if defined(OS_WIN)
- // Stores the current value of GetLastError in the constructor and restores
- // it in the destructor by calling SetLastError.
- // This is useful since the LogMessage class uses a lot of Win32 calls
- // that will lose the value of GLE and the code that called the log function
- // will have lost the thread error value when the log call returns.
- class SaveLastError {
- public:
- SaveLastError();
- ~SaveLastError();
-
- unsigned long get_error() const { return last_error_; }
-
- protected:
- unsigned long last_error_;
- };
-
- SaveLastError last_error_;
-#endif
-
- DISALLOW_COPY_AND_ASSIGN(LogMessage);
-};
-
-// A non-macro interface to the log facility; (useful
-// when the logging level is not a compile-time constant).
-inline void LogAtLevel(int const log_level, std::string const &msg) {
- LogMessage(__FILE__, __LINE__, log_level).stream() << msg;
-}
-
-// This class is used to explicitly ignore values in the conditional
-// logging macros. This avoids compiler warnings like "value computed
-// is not used" and "statement has no effect".
-class LogMessageVoidify {
- public:
- LogMessageVoidify() { }
- // This has to be an operator with a precedence lower than << but
- // higher than ?:
- void operator&(std::ostream&) { }
-};
-
-#if defined(OS_WIN)
-typedef unsigned long SystemErrorCode;
-#elif defined(OS_POSIX)
-typedef int SystemErrorCode;
-#endif
-
-// Alias for ::GetLastError() on Windows and errno on POSIX. Avoids having to
-// pull in windows.h just for GetLastError() and DWORD.
-SystemErrorCode GetLastSystemErrorCode();
-std::string SystemErrorCodeToString(SystemErrorCode error_code);
-
-#if defined(OS_WIN)
-// Appends a formatted system message of the GetLastError() type.
-class Win32ErrorLogMessage {
- public:
- Win32ErrorLogMessage(const char* file,
- int line,
- LogSeverity severity,
- SystemErrorCode err);
-
- // Appends the error message before destructing the encapsulated class.
- ~Win32ErrorLogMessage();
-
- std::ostream& stream() { return log_message_.stream(); }
-
- private:
- SystemErrorCode err_;
- LogMessage log_message_;
-
- DISALLOW_COPY_AND_ASSIGN(Win32ErrorLogMessage);
-};
-#elif defined(OS_POSIX)
-// Appends a formatted system message of the errno type
-class ErrnoLogMessage {
- public:
- ErrnoLogMessage(const char* file,
- int line,
- LogSeverity severity,
- SystemErrorCode err);
-
- // Appends the error message before destructing the encapsulated class.
- ~ErrnoLogMessage();
-
- std::ostream& stream() { return log_message_.stream(); }
-
- private:
- SystemErrorCode err_;
- LogMessage log_message_;
-
- DISALLOW_COPY_AND_ASSIGN(ErrnoLogMessage);
-};
-#endif // OS_WIN
-
-} // namespace logging
-} // namespace cef
-
-// These functions are provided as a convenience for logging, which is where we
-// use streams (it is against Google style to use streams in other places). It
-// is designed to allow you to emit non-ASCII Unicode strings to the log file,
-// which is normally ASCII. It is relatively slow, so try not to use it for
-// common cases. Non-ASCII characters will be converted to UTF-8 by these
-// operators.
-std::ostream& operator<<(std::ostream& out, const wchar_t* wstr);
-inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) {
- return out << wstr.c_str();
-}
-
-// The NOTIMPLEMENTED() macro annotates codepaths which have
-// not been implemented yet.
-//
-// The implementation of this macro is controlled by NOTIMPLEMENTED_POLICY:
-// 0 -- Do nothing (stripped by compiler)
-// 1 -- Warn at compile time
-// 2 -- Fail at compile time
-// 3 -- Fail at runtime (DCHECK)
-// 4 -- [default] LOG(ERROR) at runtime
-// 5 -- LOG(ERROR) at runtime, only once per call-site
-
-#ifndef NOTIMPLEMENTED_POLICY
-#if defined(OS_ANDROID) && defined(OFFICIAL_BUILD)
-#define NOTIMPLEMENTED_POLICY 0
-#else
-// Select default policy: LOG(ERROR)
-#define NOTIMPLEMENTED_POLICY 4
-#endif
-#endif
-
-#if defined(COMPILER_GCC)
-// On Linux, with GCC, we can use __PRETTY_FUNCTION__ to get the demangled name
-// of the current function in the NOTIMPLEMENTED message.
-#define NOTIMPLEMENTED_MSG "Not implemented reached in " << __PRETTY_FUNCTION__
-#else
-#define NOTIMPLEMENTED_MSG "NOT IMPLEMENTED"
-#endif
-
-#if NOTIMPLEMENTED_POLICY == 0
-#define NOTIMPLEMENTED() EAT_STREAM_PARAMETERS
-#elif NOTIMPLEMENTED_POLICY == 1
-// TODO, figure out how to generate a warning
-#define NOTIMPLEMENTED() COMPILE_ASSERT(false, NOT_IMPLEMENTED)
-#elif NOTIMPLEMENTED_POLICY == 2
-#define NOTIMPLEMENTED() COMPILE_ASSERT(false, NOT_IMPLEMENTED)
-#elif NOTIMPLEMENTED_POLICY == 3
-#define NOTIMPLEMENTED() NOTREACHED()
-#elif NOTIMPLEMENTED_POLICY == 4
-#define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG
-#elif NOTIMPLEMENTED_POLICY == 5
-#define NOTIMPLEMENTED() do {\
- static bool logged_once = false;\
- LOG_IF(ERROR, !logged_once) << NOTIMPLEMENTED_MSG;\
- logged_once = true;\
-} while(0);\
-EAT_STREAM_PARAMETERS
-#endif
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_LOGGING_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef CEF_INCLUDE_BASE_CEF_MACROS_H_
-#define CEF_INCLUDE_BASE_CEF_MACROS_H_
-#pragma once
-
-#if defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/macros.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include <stddef.h> // For size_t.
-
-#if !defined(ALLOW_THIS_IN_INITIALIZER_LIST)
-#if defined(COMPILER_MSVC)
-
-// MSVC_PUSH_DISABLE_WARNING pushes |n| onto a stack of warnings to be disabled.
-// The warning remains disabled until popped by MSVC_POP_WARNING.
-#define MSVC_PUSH_DISABLE_WARNING(n) __pragma(warning(push)) \
- __pragma(warning(disable:n))
-
-// MSVC_PUSH_WARNING_LEVEL pushes |n| as the global warning level. The level
-// remains in effect until popped by MSVC_POP_WARNING(). Use 0 to disable all
-// warnings.
-#define MSVC_PUSH_WARNING_LEVEL(n) __pragma(warning(push, n))
-
-// Pop effects of innermost MSVC_PUSH_* macro.
-#define MSVC_POP_WARNING() __pragma(warning(pop))
-
-// Allows |this| to be passed as an argument in constructor initializer lists.
-// This uses push/pop instead of the seemingly simpler suppress feature to avoid
-// having the warning be disabled for more than just |code|.
-//
-// Example usage:
-// Foo::Foo() : x(NULL), ALLOW_THIS_IN_INITIALIZER_LIST(y(this)), z(3) {}
-//
-// Compiler warning C4355: 'this': used in base member initializer list:
-// http://msdn.microsoft.com/en-us/library/3c594ae3(VS.80).aspx
-#define ALLOW_THIS_IN_INITIALIZER_LIST(code) MSVC_PUSH_DISABLE_WARNING(4355) \
- code \
- MSVC_POP_WARNING()
-#else // !COMPILER_MSVC
-
-#define ALLOW_THIS_IN_INITIALIZER_LIST(code) code
-
-#endif // !COMPILER_MSVC
-#endif // !ALLOW_THIS_IN_INITIALIZER_LIST
-
-#if !defined(arraysize)
-
-// The arraysize(arr) macro returns the # of elements in an array arr.
-// The expression is a compile-time constant, and therefore can be
-// used in defining new arrays, for example. If you use arraysize on
-// a pointer by mistake, you will get a compile-time error.
-//
-// One caveat is that arraysize() doesn't accept any array of an
-// anonymous type or a type defined inside a function. In these rare
-// cases, you have to use the unsafe ARRAYSIZE_UNSAFE() macro below. This is
-// due to a limitation in C++'s template system. The limitation might
-// eventually be removed, but it hasn't happened yet.
-
-// This template function declaration is used in defining arraysize.
-// Note that the function doesn't need an implementation, as we only
-// use its type.
-template <typename T, size_t N>
-char (&ArraySizeHelper(T (&array)[N]))[N];
-
-// That gcc wants both of these prototypes seems mysterious. VC, for
-// its part, can't decide which to use (another mystery). Matching of
-// template overloads: the final frontier.
-#ifndef _MSC_VER
-template <typename T, size_t N>
-char (&ArraySizeHelper(const T (&array)[N]))[N];
-#endif
-
-#define arraysize(array) (sizeof(ArraySizeHelper(array)))
-
-#endif // !arraysize
-
-#if !defined(DISALLOW_COPY_AND_ASSIGN)
-
-// A macro to disallow the copy constructor and operator= functions
-// This should be used in the private: declarations for a class
-#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
- TypeName(const TypeName&); \
- void operator=(const TypeName&)
-
-#endif // !DISALLOW_COPY_AND_ASSIGN
-
-#if !defined(DISALLOW_IMPLICIT_CONSTRUCTORS)
-
-// A macro to disallow all the implicit constructors, namely the
-// default constructor, copy constructor and operator= functions.
-//
-// This should be used in the private: declarations for a class
-// that wants to prevent anyone from instantiating it. This is
-// especially useful for classes containing only static methods.
-#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
- TypeName(); \
- DISALLOW_COPY_AND_ASSIGN(TypeName)
-
-#endif // !DISALLOW_IMPLICIT_CONSTRUCTORS
-
-#if !defined(COMPILE_ASSERT)
-
-// The COMPILE_ASSERT macro can be used to verify that a compile time
-// expression is true. For example, you could use it to verify the
-// size of a static array:
-//
-// COMPILE_ASSERT(ARRAYSIZE_UNSAFE(content_type_names) == CONTENT_NUM_TYPES,
-// content_type_names_incorrect_size);
-//
-// or to make sure a struct is smaller than a certain size:
-//
-// COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large);
-//
-// The second argument to the macro is the name of the variable. If
-// the expression is false, most compilers will issue a warning/error
-// containing the name of the variable.
-
-#if __cplusplus >= 201103L
-
-// Under C++11, just use static_assert.
-#define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)
-
-#else
-
-namespace cef {
-
-template <bool>
-struct CompileAssert {
-};
-
-} // namespace cef
-
-#define COMPILE_ASSERT(expr, msg) \
- typedef cef::CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] \
- ALLOW_UNUSED_TYPE
-
-// Implementation details of COMPILE_ASSERT:
-//
-// - COMPILE_ASSERT works by defining an array type that has -1
-// elements (and thus is invalid) when the expression is false.
-//
-// - The simpler definition
-//
-// #define COMPILE_ASSERT(expr, msg) typedef char msg[(expr) ? 1 : -1]
-//
-// does not work, as gcc supports variable-length arrays whose sizes
-// are determined at run-time (this is gcc's extension and not part
-// of the C++ standard). As a result, gcc fails to reject the
-// following code with the simple definition:
-//
-// int foo;
-// COMPILE_ASSERT(foo, msg); // not supposed to compile as foo is
-// // not a compile-time constant.
-//
-// - By using the type CompileAssert<(bool(expr))>, we ensures that
-// expr is a compile-time constant. (Template arguments must be
-// determined at compile-time.)
-//
-// - The outer parentheses in CompileAssert<(bool(expr))> are necessary
-// to work around a bug in gcc 3.4.4 and 4.0.1. If we had written
-//
-// CompileAssert<bool(expr)>
-//
-// instead, these compilers will refuse to compile
-//
-// COMPILE_ASSERT(5 > 0, some_message);
-//
-// (They seem to think the ">" in "5 > 0" marks the end of the
-// template argument list.)
-//
-// - The array size is (bool(expr) ? 1 : -1), instead of simply
-//
-// ((expr) ? 1 : -1).
-//
-// This is to avoid running into a bug in MS VC 7.1, which
-// causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1.
-
-#endif // !(__cplusplus >= 201103L)
-
-#endif // !defined(COMPILE_ASSERT)
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_MACROS_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef CEF_INCLUDE_BASE_CEF_MOVE_H_
-#define CEF_INCLUDE_BASE_CEF_MOVE_H_
-
-#if defined(MOVE_ONLY_TYPE_FOR_CPP_03)
-// Do nothing if the macro in this header has already been defined.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/move.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-// Macro with the boilerplate that makes a type move-only in C++03.
-//
-// USAGE
-//
-// This macro should be used instead of DISALLOW_COPY_AND_ASSIGN to create
-// a "move-only" type. Unlike DISALLOW_COPY_AND_ASSIGN, this macro should be
-// the first line in a class declaration.
-//
-// A class using this macro must call .Pass() (or somehow be an r-value already)
-// before it can be:
-//
-// * Passed as a function argument
-// * Used as the right-hand side of an assignment
-// * Returned from a function
-//
-// Each class will still need to define their own "move constructor" and "move
-// operator=" to make this useful. Here's an example of the macro, the move
-// constructor, and the move operator= from the scoped_ptr class:
-//
-// template <typename T>
-// class scoped_ptr {
-// MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr, RValue)
-// public:
-// scoped_ptr(RValue& other) : ptr_(other.release()) { }
-// scoped_ptr& operator=(RValue& other) {
-// swap(other);
-// return *this;
-// }
-// };
-//
-// Note that the constructor must NOT be marked explicit.
-//
-// For consistency, the second parameter to the macro should always be RValue
-// unless you have a strong reason to do otherwise. It is only exposed as a
-// macro parameter so that the move constructor and move operator= don't look
-// like they're using a phantom type.
-//
-//
-// HOW THIS WORKS
-//
-// For a thorough explanation of this technique, see:
-//
-// http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Move_Constructor
-//
-// The summary is that we take advantage of 2 properties:
-//
-// 1) non-const references will not bind to r-values.
-// 2) C++ can apply one user-defined conversion when initializing a
-// variable.
-//
-// The first lets us disable the copy constructor and assignment operator
-// by declaring private version of them with a non-const reference parameter.
-//
-// For l-values, direct initialization still fails like in
-// DISALLOW_COPY_AND_ASSIGN because the copy constructor and assignment
-// operators are private.
-//
-// For r-values, the situation is different. The copy constructor and
-// assignment operator are not viable due to (1), so we are trying to call
-// a non-existent constructor and non-existing operator= rather than a private
-// one. Since we have not committed an error quite yet, we can provide an
-// alternate conversion sequence and a constructor. We add
-//
-// * a private struct named "RValue"
-// * a user-defined conversion "operator RValue()"
-// * a "move constructor" and "move operator=" that take the RValue& as
-// their sole parameter.
-//
-// Only r-values will trigger this sequence and execute our "move constructor"
-// or "move operator=." L-values will match the private copy constructor and
-// operator= first giving a "private in this context" error. This combination
-// gives us a move-only type.
-//
-// For signaling a destructive transfer of data from an l-value, we provide a
-// method named Pass() which creates an r-value for the current instance
-// triggering the move constructor or move operator=.
-//
-// Other ways to get r-values is to use the result of an expression like a
-// function call.
-//
-// Here's an example with comments explaining what gets triggered where:
-//
-// class Foo {
-// MOVE_ONLY_TYPE_FOR_CPP_03(Foo, RValue);
-//
-// public:
-// ... API ...
-// Foo(RValue other); // Move constructor.
-// Foo& operator=(RValue rhs); // Move operator=
-// };
-//
-// Foo MakeFoo(); // Function that returns a Foo.
-//
-// Foo f;
-// Foo f_copy(f); // ERROR: Foo(Foo&) is private in this context.
-// Foo f_assign;
-// f_assign = f; // ERROR: operator=(Foo&) is private in this context.
-//
-//
-// Foo f(MakeFoo()); // R-value so alternate conversion executed.
-// Foo f_copy(f.Pass()); // R-value so alternate conversion executed.
-// f = f_copy.Pass(); // R-value so alternate conversion executed.
-//
-//
-// IMPLEMENTATION SUBTLETIES WITH RValue
-//
-// The RValue struct is just a container for a pointer back to the original
-// object. It should only ever be created as a temporary, and no external
-// class should ever declare it or use it in a parameter.
-//
-// It is tempting to want to use the RValue type in function parameters, but
-// excluding the limited usage here for the move constructor and move
-// operator=, doing so would mean that the function could take both r-values
-// and l-values equially which is unexpected. See COMPARED To Boost.Move for
-// more details.
-//
-// An alternate, and incorrect, implementation of the RValue class used by
-// Boost.Move makes RValue a fieldless child of the move-only type. RValue&
-// is then used in place of RValue in the various operators. The RValue& is
-// "created" by doing *reinterpret_cast<RValue*>(this). This has the appeal
-// of never creating a temporary RValue struct even with optimizations
-// disabled. Also, by virtue of inheritance you can treat the RValue
-// reference as if it were the move-only type itself. Unfortunately,
-// using the result of this reinterpret_cast<> is actually undefined behavior
-// due to C++98 5.2.10.7. In certain compilers (e.g., NaCl) the optimizer
-// will generate non-working code.
-//
-// In optimized builds, both implementations generate the same assembly so we
-// choose the one that adheres to the standard.
-//
-//
-// WHY HAVE typedef void MoveOnlyTypeForCPP03
-//
-// Callback<>/Bind() needs to understand movable-but-not-copyable semantics
-// to call .Pass() appropriately when it is expected to transfer the value.
-// The cryptic typedef MoveOnlyTypeForCPP03 is added to make this check
-// easy and automatic in helper templates for Callback<>/Bind().
-// See IsMoveOnlyType template and its usage in base/callback_internal.h
-// for more details.
-//
-//
-// COMPARED TO C++11
-//
-// In C++11, you would implement this functionality using an r-value reference
-// and our .Pass() method would be replaced with a call to std::move().
-//
-// This emulation also has a deficiency where it uses up the single
-// user-defined conversion allowed by C++ during initialization. This can
-// cause problems in some API edge cases. For instance, in scoped_ptr, it is
-// impossible to make a function "void Foo(scoped_ptr<Parent> p)" accept a
-// value of type scoped_ptr<Child> even if you add a constructor to
-// scoped_ptr<> that would make it look like it should work. C++11 does not
-// have this deficiency.
-//
-//
-// COMPARED TO Boost.Move
-//
-// Our implementation similar to Boost.Move, but we keep the RValue struct
-// private to the move-only type, and we don't use the reinterpret_cast<> hack.
-//
-// In Boost.Move, RValue is the boost::rv<> template. This type can be used
-// when writing APIs like:
-//
-// void MyFunc(boost::rv<Foo>& f)
-//
-// that can take advantage of rv<> to avoid extra copies of a type. However you
-// would still be able to call this version of MyFunc with an l-value:
-//
-// Foo f;
-// MyFunc(f); // Uh oh, we probably just destroyed |f| w/o calling Pass().
-//
-// unless someone is very careful to also declare a parallel override like:
-//
-// void MyFunc(const Foo& f)
-//
-// that would catch the l-values first. This was declared unsafe in C++11 and
-// a C++11 compiler will explicitly fail MyFunc(f). Unfortunately, we cannot
-// ensure this in C++03.
-//
-// Since we have no need for writing such APIs yet, our implementation keeps
-// RValue private and uses a .Pass() method to do the conversion instead of
-// trying to write a version of "std::move()." Writing an API like std::move()
-// would require the RValue struct to be public.
-//
-//
-// CAVEATS
-//
-// If you include a move-only type as a field inside a class that does not
-// explicitly declare a copy constructor, the containing class's implicit
-// copy constructor will change from Containing(const Containing&) to
-// Containing(Containing&). This can cause some unexpected errors.
-//
-// http://llvm.org/bugs/show_bug.cgi?id=11528
-//
-// The workaround is to explicitly declare your copy constructor.
-//
-#define MOVE_ONLY_TYPE_FOR_CPP_03(type, rvalue_type) \
- private: \
- struct rvalue_type { \
- explicit rvalue_type(type* object) : object(object) {} \
- type* object; \
- }; \
- type(type&); \
- void operator=(type&); \
- public: \
- operator rvalue_type() { return rvalue_type(this); } \
- type Pass() { return type(rvalue_type(this)); } \
- typedef void MoveOnlyTypeForCPP03; \
- private:
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_MOVE_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// WARNING: You should *NOT* be using this class directly. PlatformThread is
-// the low-level platform-specific abstraction to the OS's threading interface.
-// You should instead be using a message-loop driven Thread, see thread.h.
-
-#ifndef CEF_INCLUDE_BASE_PLATFORM_THREAD_H_
-#define CEF_INCLUDE_BASE_PLATFORM_THREAD_H_
-
-#if defined(BASE_THREADING_PLATFORM_THREAD_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/threading/platform_thread.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include "include/base/cef_basictypes.h"
-#include "include/base/cef_build.h"
-#include "include/internal/cef_thread_internal.h"
-
-namespace base {
-
-// Used for logging. Always an integer value.
-typedef cef_platform_thread_id_t PlatformThreadId;
-
-// Used for thread checking and debugging.
-// Meant to be as fast as possible.
-// These are produced by PlatformThread::CurrentRef(), and used to later
-// check if we are on the same thread or not by using ==. These are safe
-// to copy between threads, but can't be copied to another process as they
-// have no meaning there. Also, the internal identifier can be re-used
-// after a thread dies, so a PlatformThreadRef cannot be reliably used
-// to distinguish a new thread from an old, dead thread.
-class PlatformThreadRef {
- public:
- typedef cef_platform_thread_handle_t RefType;
-
- PlatformThreadRef()
- : id_(0) {
- }
-
- explicit PlatformThreadRef(RefType id)
- : id_(id) {
- }
-
- bool operator==(PlatformThreadRef other) const {
- return id_ == other.id_;
- }
-
- bool is_null() const {
- return id_ == 0;
- }
- private:
- RefType id_;
-};
-
-// A namespace for low-level thread functions.
-// Chromium uses a class with static methods but CEF uses an actual namespace
-// to avoid linker problems with the sandbox libaries on Windows.
-namespace PlatformThread {
-
-// Gets the current thread id, which may be useful for logging purposes.
-inline PlatformThreadId CurrentId() {
- return cef_get_current_platform_thread_id();
-}
-
-// Gets the current thread reference, which can be used to check if
-// we're on the right thread quickly.
-inline PlatformThreadRef CurrentRef() {
- return PlatformThreadRef(cef_get_current_platform_thread_handle());
-}
-
-} // namespace PlatformThread
-
-} // namespace base
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_PLATFORM_THREAD_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-
-#ifndef CEF_INCLUDE_BASE_CEF_REF_COUNTED_H_
-#define CEF_INCLUDE_BASE_CEF_REF_COUNTED_H_
-#pragma once
-
-#if defined(BASE_MEMORY_REF_COUNTED_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/memory/ref_counted.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include <cassert>
-
-#include "include/base/cef_atomic_ref_count.h"
-#include "include/base/cef_build.h"
-#ifndef NDEBUG
-#include "include/base/cef_logging.h"
-#endif
-#include "include/base/cef_thread_collision_warner.h"
-
-namespace base {
-
-namespace subtle {
-
-class RefCountedBase {
- public:
- bool HasOneRef() const { return ref_count_ == 1; }
-
- protected:
- RefCountedBase()
- : ref_count_(0)
- #ifndef NDEBUG
- , in_dtor_(false)
- #endif
- {
- }
-
- ~RefCountedBase() {
- #ifndef NDEBUG
- DCHECK(in_dtor_) << "RefCounted object deleted without calling Release()";
- #endif
- }
-
-
- void AddRef() const {
- // TODO(maruel): Add back once it doesn't assert 500 times/sec.
- // Current thread books the critical section "AddRelease"
- // without release it.
- // DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_);
- #ifndef NDEBUG
- DCHECK(!in_dtor_);
- #endif
- ++ref_count_;
- }
-
- // Returns true if the object should self-delete.
- bool Release() const {
- // TODO(maruel): Add back once it doesn't assert 500 times/sec.
- // Current thread books the critical section "AddRelease"
- // without release it.
- // DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_);
- #ifndef NDEBUG
- DCHECK(!in_dtor_);
- #endif
- if (--ref_count_ == 0) {
- #ifndef NDEBUG
- in_dtor_ = true;
- #endif
- return true;
- }
- return false;
- }
-
- private:
- mutable int ref_count_;
-#ifndef NDEBUG
- mutable bool in_dtor_;
-#endif
-
- DFAKE_MUTEX(add_release_);
-
- DISALLOW_COPY_AND_ASSIGN(RefCountedBase);
-};
-
-class RefCountedThreadSafeBase {
- public:
- bool HasOneRef() const;
-
- protected:
- RefCountedThreadSafeBase();
- ~RefCountedThreadSafeBase();
-
- void AddRef() const;
-
- // Returns true if the object should self-delete.
- bool Release() const;
-
- private:
- mutable AtomicRefCount ref_count_;
-#ifndef NDEBUG
- mutable bool in_dtor_;
-#endif
-
- DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafeBase);
-};
-
-} // namespace subtle
-
-//
-// A base class for reference counted classes. Otherwise, known as a cheap
-// knock-off of WebKit's RefCounted<T> class. To use this guy just extend your
-// class from it like so:
-//
-// class MyFoo : public base::RefCounted<MyFoo> {
-// ...
-// private:
-// friend class base::RefCounted<MyFoo>;
-// ~MyFoo();
-// };
-//
-// You should always make your destructor private, to avoid any code deleting
-// the object accidently while there are references to it.
-template <class T>
-class RefCounted : public subtle::RefCountedBase {
- public:
- RefCounted() {}
-
- void AddRef() const {
- subtle::RefCountedBase::AddRef();
- }
-
- void Release() const {
- if (subtle::RefCountedBase::Release()) {
- delete static_cast<const T*>(this);
- }
- }
-
- protected:
- ~RefCounted() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RefCounted<T>);
-};
-
-// Forward declaration.
-template <class T, typename Traits> class RefCountedThreadSafe;
-
-// Default traits for RefCountedThreadSafe<T>. Deletes the object when its ref
-// count reaches 0. Overload to delete it on a different thread etc.
-template<typename T>
-struct DefaultRefCountedThreadSafeTraits {
- static void Destruct(const T* x) {
- // Delete through RefCountedThreadSafe to make child classes only need to be
- // friend with RefCountedThreadSafe instead of this struct, which is an
- // implementation detail.
- RefCountedThreadSafe<T,
- DefaultRefCountedThreadSafeTraits>::DeleteInternal(x);
- }
-};
-
-//
-// A thread-safe variant of RefCounted<T>
-//
-// class MyFoo : public base::RefCountedThreadSafe<MyFoo> {
-// ...
-// };
-//
-// If you're using the default trait, then you should add compile time
-// asserts that no one else is deleting your object. i.e.
-// private:
-// friend class base::RefCountedThreadSafe<MyFoo>;
-// ~MyFoo();
-template <class T, typename Traits = DefaultRefCountedThreadSafeTraits<T> >
-class RefCountedThreadSafe : public subtle::RefCountedThreadSafeBase {
- public:
- RefCountedThreadSafe() {}
-
- void AddRef() const {
- subtle::RefCountedThreadSafeBase::AddRef();
- }
-
- void Release() const {
- if (subtle::RefCountedThreadSafeBase::Release()) {
- Traits::Destruct(static_cast<const T*>(this));
- }
- }
-
- protected:
- ~RefCountedThreadSafe() {}
-
- private:
- friend struct DefaultRefCountedThreadSafeTraits<T>;
- static void DeleteInternal(const T* x) { delete x; }
-
- DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafe);
-};
-
-//
-// A thread-safe wrapper for some piece of data so we can place other
-// things in scoped_refptrs<>.
-//
-template<typename T>
-class RefCountedData
- : public base::RefCountedThreadSafe< base::RefCountedData<T> > {
- public:
- RefCountedData() : data() {}
- RefCountedData(const T& in_value) : data(in_value) {}
-
- T data;
-
- private:
- friend class base::RefCountedThreadSafe<base::RefCountedData<T> >;
- ~RefCountedData() {}
-};
-
-} // namespace base
-
-//
-// A smart pointer class for reference counted objects. Use this class instead
-// of calling AddRef and Release manually on a reference counted object to
-// avoid common memory leaks caused by forgetting to Release an object
-// reference. Sample usage:
-//
-// class MyFoo : public RefCounted<MyFoo> {
-// ...
-// };
-//
-// void some_function() {
-// scoped_refptr<MyFoo> foo = new MyFoo();
-// foo->Method(param);
-// // |foo| is released when this function returns
-// }
-//
-// void some_other_function() {
-// scoped_refptr<MyFoo> foo = new MyFoo();
-// ...
-// foo = NULL; // explicitly releases |foo|
-// ...
-// if (foo)
-// foo->Method(param);
-// }
-//
-// The above examples show how scoped_refptr<T> acts like a pointer to T.
-// Given two scoped_refptr<T> classes, it is also possible to exchange
-// references between the two objects, like so:
-//
-// {
-// scoped_refptr<MyFoo> a = new MyFoo();
-// scoped_refptr<MyFoo> b;
-//
-// b.swap(a);
-// // now, |b| references the MyFoo object, and |a| references NULL.
-// }
-//
-// To make both |a| and |b| in the above example reference the same MyFoo
-// object, simply use the assignment operator:
-//
-// {
-// scoped_refptr<MyFoo> a = new MyFoo();
-// scoped_refptr<MyFoo> b;
-//
-// b = a;
-// // now, |a| and |b| each own a reference to the same MyFoo object.
-// }
-//
-template <class T>
-class scoped_refptr {
- public:
- typedef T element_type;
-
- scoped_refptr() : ptr_(NULL) {
- }
-
- scoped_refptr(T* p) : ptr_(p) {
- if (ptr_)
- ptr_->AddRef();
- }
-
- scoped_refptr(const scoped_refptr<T>& r) : ptr_(r.ptr_) {
- if (ptr_)
- ptr_->AddRef();
- }
-
- template <typename U>
- scoped_refptr(const scoped_refptr<U>& r) : ptr_(r.get()) {
- if (ptr_)
- ptr_->AddRef();
- }
-
- ~scoped_refptr() {
- if (ptr_)
- ptr_->Release();
- }
-
- T* get() const { return ptr_; }
-
- // Allow scoped_refptr<C> to be used in boolean expression
- // and comparison operations.
- operator T*() const { return ptr_; }
-
- T* operator->() const {
- assert(ptr_ != NULL);
- return ptr_;
- }
-
- scoped_refptr<T>& operator=(T* p) {
- // AddRef first so that self assignment should work
- if (p)
- p->AddRef();
- T* old_ptr = ptr_;
- ptr_ = p;
- if (old_ptr)
- old_ptr->Release();
- return *this;
- }
-
- scoped_refptr<T>& operator=(const scoped_refptr<T>& r) {
- return *this = r.ptr_;
- }
-
- template <typename U>
- scoped_refptr<T>& operator=(const scoped_refptr<U>& r) {
- return *this = r.get();
- }
-
- void swap(T** pp) {
- T* p = ptr_;
- ptr_ = *pp;
- *pp = p;
- }
-
- void swap(scoped_refptr<T>& r) {
- swap(&r.ptr_);
- }
-
- protected:
- T* ptr_;
-};
-
-// Handy utility for creating a scoped_refptr<T> out of a T* explicitly without
-// having to retype all the template arguments
-template <typename T>
-scoped_refptr<T> make_scoped_refptr(T* t) {
- return scoped_refptr<T>(t);
-}
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_REF_COUNTED_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Scopers help you manage ownership of a pointer, helping you easily manage a
-// pointer within a scope, and automatically destroying the pointer at the end
-// of a scope. There are two main classes you will use, which correspond to the
-// operators new/delete and new[]/delete[].
-//
-// Example usage (scoped_ptr<T>):
-// {
-// scoped_ptr<Foo> foo(new Foo("wee"));
-// } // foo goes out of scope, releasing the pointer with it.
-//
-// {
-// scoped_ptr<Foo> foo; // No pointer managed.
-// foo.reset(new Foo("wee")); // Now a pointer is managed.
-// foo.reset(new Foo("wee2")); // Foo("wee") was destroyed.
-// foo.reset(new Foo("wee3")); // Foo("wee2") was destroyed.
-// foo->Method(); // Foo::Method() called.
-// foo.get()->Method(); // Foo::Method() called.
-// SomeFunc(foo.release()); // SomeFunc takes ownership, foo no longer
-// // manages a pointer.
-// foo.reset(new Foo("wee4")); // foo manages a pointer again.
-// foo.reset(); // Foo("wee4") destroyed, foo no longer
-// // manages a pointer.
-// } // foo wasn't managing a pointer, so nothing was destroyed.
-//
-// Example usage (scoped_ptr<T[]>):
-// {
-// scoped_ptr<Foo[]> foo(new Foo[100]);
-// foo.get()->Method(); // Foo::Method on the 0th element.
-// foo[10].Method(); // Foo::Method on the 10th element.
-// }
-//
-// These scopers also implement part of the functionality of C++11 unique_ptr
-// in that they are "movable but not copyable." You can use the scopers in
-// the parameter and return types of functions to signify ownership transfer
-// in to and out of a function. When calling a function that has a scoper
-// as the argument type, it must be called with the result of an analogous
-// scoper's Pass() function or another function that generates a temporary;
-// passing by copy will NOT work. Here is an example using scoped_ptr:
-//
-// void TakesOwnership(scoped_ptr<Foo> arg) {
-// // Do something with arg
-// }
-// scoped_ptr<Foo> CreateFoo() {
-// // No need for calling Pass() because we are constructing a temporary
-// // for the return value.
-// return scoped_ptr<Foo>(new Foo("new"));
-// }
-// scoped_ptr<Foo> PassThru(scoped_ptr<Foo> arg) {
-// return arg.Pass();
-// }
-//
-// {
-// scoped_ptr<Foo> ptr(new Foo("yay")); // ptr manages Foo("yay").
-// TakesOwnership(ptr.Pass()); // ptr no longer owns Foo("yay").
-// scoped_ptr<Foo> ptr2 = CreateFoo(); // ptr2 owns the return Foo.
-// scoped_ptr<Foo> ptr3 = // ptr3 now owns what was in ptr2.
-// PassThru(ptr2.Pass()); // ptr2 is correspondingly NULL.
-// }
-//
-// Notice that if you do not call Pass() when returning from PassThru(), or
-// when invoking TakesOwnership(), the code will not compile because scopers
-// are not copyable; they only implement move semantics which require calling
-// the Pass() function to signify a destructive transfer of state. CreateFoo()
-// is different though because we are constructing a temporary on the return
-// line and thus can avoid needing to call Pass().
-//
-// Pass() properly handles upcast in initialization, i.e. you can use a
-// scoped_ptr<Child> to initialize a scoped_ptr<Parent>:
-//
-// scoped_ptr<Foo> foo(new Foo());
-// scoped_ptr<FooParent> parent(foo.Pass());
-//
-// PassAs<>() should be used to upcast return value in return statement:
-//
-// scoped_ptr<Foo> CreateFoo() {
-// scoped_ptr<FooChild> result(new FooChild());
-// return result.PassAs<Foo>();
-// }
-//
-// Note that PassAs<>() is implemented only for scoped_ptr<T>, but not for
-// scoped_ptr<T[]>. This is because casting array pointers may not be safe.
-
-#ifndef CEF_INCLUDE_BASE_CEF_MEMORY_SCOPED_PTR_H_
-#define CEF_INCLUDE_BASE_CEF_MEMORY_SCOPED_PTR_H_
-#pragma once
-
-#if defined(BASE_MEMORY_SCOPED_PTR_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/memory/scoped_ptr.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-// This is an implementation designed to match the anticipated future TR2
-// implementation of the scoped_ptr class.
-
-#include <assert.h>
-#include <stddef.h>
-#include <stdlib.h>
-
-#include <algorithm> // For std::swap().
-
-#include "include/base/cef_basictypes.h"
-#include "include/base/cef_build.h"
-#include "include/base/cef_macros.h"
-#include "include/base/cef_move.h"
-#include "include/base/cef_template_util.h"
-
-namespace base {
-
-namespace subtle {
-class RefCountedBase;
-class RefCountedThreadSafeBase;
-} // namespace subtle
-
-// Function object which deletes its parameter, which must be a pointer.
-// If C is an array type, invokes 'delete[]' on the parameter; otherwise,
-// invokes 'delete'. The default deleter for scoped_ptr<T>.
-template <class T>
-struct DefaultDeleter {
- DefaultDeleter() {}
- template <typename U> DefaultDeleter(const DefaultDeleter<U>& other) {
- // IMPLEMENTATION NOTE: C++11 20.7.1.1.2p2 only provides this constructor
- // if U* is implicitly convertible to T* and U is not an array type.
- //
- // Correct implementation should use SFINAE to disable this
- // constructor. However, since there are no other 1-argument constructors,
- // using a COMPILE_ASSERT() based on is_convertible<> and requiring
- // complete types is simpler and will cause compile failures for equivalent
- // misuses.
- //
- // Note, the is_convertible<U*, T*> check also ensures that U is not an
- // array. T is guaranteed to be a non-array, so any U* where U is an array
- // cannot convert to T*.
- enum { T_must_be_complete = sizeof(T) };
- enum { U_must_be_complete = sizeof(U) };
- COMPILE_ASSERT((base::is_convertible<U*, T*>::value),
- U_ptr_must_implicitly_convert_to_T_ptr);
- }
- inline void operator()(T* ptr) const {
- enum { type_must_be_complete = sizeof(T) };
- delete ptr;
- }
-};
-
-// Specialization of DefaultDeleter for array types.
-template <class T>
-struct DefaultDeleter<T[]> {
- inline void operator()(T* ptr) const {
- enum { type_must_be_complete = sizeof(T) };
- delete[] ptr;
- }
-
- private:
- // Disable this operator for any U != T because it is undefined to execute
- // an array delete when the static type of the array mismatches the dynamic
- // type.
- //
- // References:
- // C++98 [expr.delete]p3
- // http://cplusplus.github.com/LWG/lwg-defects.html#938
- template <typename U> void operator()(U* array) const;
-};
-
-template <class T, int n>
-struct DefaultDeleter<T[n]> {
- // Never allow someone to declare something like scoped_ptr<int[10]>.
- COMPILE_ASSERT(sizeof(T) == -1, do_not_use_array_with_size_as_type);
-};
-
-// Function object which invokes 'free' on its parameter, which must be
-// a pointer. Can be used to store malloc-allocated pointers in scoped_ptr:
-//
-// scoped_ptr<int, base::FreeDeleter> foo_ptr(
-// static_cast<int*>(malloc(sizeof(int))));
-struct FreeDeleter {
- inline void operator()(void* ptr) const {
- free(ptr);
- }
-};
-
-namespace cef_internal {
-
-template <typename T> struct IsNotRefCounted {
- enum {
- value = !base::is_convertible<T*, base::subtle::RefCountedBase*>::value &&
- !base::is_convertible<T*, base::subtle::RefCountedThreadSafeBase*>::
- value
- };
-};
-
-// Minimal implementation of the core logic of scoped_ptr, suitable for
-// reuse in both scoped_ptr and its specializations.
-template <class T, class D>
-class scoped_ptr_impl {
- public:
- explicit scoped_ptr_impl(T* p) : data_(p) { }
-
- // Initializer for deleters that have data parameters.
- scoped_ptr_impl(T* p, const D& d) : data_(p, d) {}
-
- // Templated constructor that destructively takes the value from another
- // scoped_ptr_impl.
- template <typename U, typename V>
- scoped_ptr_impl(scoped_ptr_impl<U, V>* other)
- : data_(other->release(), other->get_deleter()) {
- // We do not support move-only deleters. We could modify our move
- // emulation to have base::subtle::move() and base::subtle::forward()
- // functions that are imperfect emulations of their C++11 equivalents,
- // but until there's a requirement, just assume deleters are copyable.
- }
-
- template <typename U, typename V>
- void TakeState(scoped_ptr_impl<U, V>* other) {
- // See comment in templated constructor above regarding lack of support
- // for move-only deleters.
- reset(other->release());
- get_deleter() = other->get_deleter();
- }
-
- ~scoped_ptr_impl() {
- if (data_.ptr != NULL) {
- // Not using get_deleter() saves one function call in non-optimized
- // builds.
- static_cast<D&>(data_)(data_.ptr);
- }
- }
-
- void reset(T* p) {
- // This is a self-reset, which is no longer allowed: http://crbug.com/162971
- if (p != NULL && p == data_.ptr)
- abort();
-
- // Note that running data_.ptr = p can lead to undefined behavior if
- // get_deleter()(get()) deletes this. In order to prevent this, reset()
- // should update the stored pointer before deleting its old value.
- //
- // However, changing reset() to use that behavior may cause current code to
- // break in unexpected ways. If the destruction of the owned object
- // dereferences the scoped_ptr when it is destroyed by a call to reset(),
- // then it will incorrectly dispatch calls to |p| rather than the original
- // value of |data_.ptr|.
- //
- // During the transition period, set the stored pointer to NULL while
- // deleting the object. Eventually, this safety check will be removed to
- // prevent the scenario initially described from occuring and
- // http://crbug.com/176091 can be closed.
- T* old = data_.ptr;
- data_.ptr = NULL;
- if (old != NULL)
- static_cast<D&>(data_)(old);
- data_.ptr = p;
- }
-
- T* get() const { return data_.ptr; }
-
- D& get_deleter() { return data_; }
- const D& get_deleter() const { return data_; }
-
- void swap(scoped_ptr_impl& p2) {
- // Standard swap idiom: 'using std::swap' ensures that std::swap is
- // present in the overload set, but we call swap unqualified so that
- // any more-specific overloads can be used, if available.
- using std::swap;
- swap(static_cast<D&>(data_), static_cast<D&>(p2.data_));
- swap(data_.ptr, p2.data_.ptr);
- }
-
- T* release() {
- T* old_ptr = data_.ptr;
- data_.ptr = NULL;
- return old_ptr;
- }
-
- private:
- // Needed to allow type-converting constructor.
- template <typename U, typename V> friend class scoped_ptr_impl;
-
- // Use the empty base class optimization to allow us to have a D
- // member, while avoiding any space overhead for it when D is an
- // empty class. See e.g. http://www.cantrip.org/emptyopt.html for a good
- // discussion of this technique.
- struct Data : public D {
- explicit Data(T* ptr_in) : ptr(ptr_in) {}
- Data(T* ptr_in, const D& other) : D(other), ptr(ptr_in) {}
- T* ptr;
- };
-
- Data data_;
-
- DISALLOW_COPY_AND_ASSIGN(scoped_ptr_impl);
-};
-
-} // namespace cef_internal
-
-} // namespace base
-
-// A scoped_ptr<T> is like a T*, except that the destructor of scoped_ptr<T>
-// automatically deletes the pointer it holds (if any).
-// That is, scoped_ptr<T> owns the T object that it points to.
-// Like a T*, a scoped_ptr<T> may hold either NULL or a pointer to a T object.
-// Also like T*, scoped_ptr<T> is thread-compatible, and once you
-// dereference it, you get the thread safety guarantees of T.
-//
-// The size of scoped_ptr is small. On most compilers, when using the
-// DefaultDeleter, sizeof(scoped_ptr<T>) == sizeof(T*). Custom deleters will
-// increase the size proportional to whatever state they need to have. See
-// comments inside scoped_ptr_impl<> for details.
-//
-// Current implementation targets having a strict subset of C++11's
-// unique_ptr<> features. Known deficiencies include not supporting move-only
-// deleteres, function pointers as deleters, and deleters with reference
-// types.
-template <class T, class D = base::DefaultDeleter<T> >
-class scoped_ptr {
- MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr, RValue)
-
- COMPILE_ASSERT(base::cef_internal::IsNotRefCounted<T>::value,
- T_is_refcounted_type_and_needs_scoped_refptr);
-
- public:
- // The element and deleter types.
- typedef T element_type;
- typedef D deleter_type;
-
- // Constructor. Defaults to initializing with NULL.
- scoped_ptr() : impl_(NULL) { }
-
- // Constructor. Takes ownership of p.
- explicit scoped_ptr(element_type* p) : impl_(p) { }
-
- // Constructor. Allows initialization of a stateful deleter.
- scoped_ptr(element_type* p, const D& d) : impl_(p, d) { }
-
- // Constructor. Allows construction from a scoped_ptr rvalue for a
- // convertible type and deleter.
- //
- // IMPLEMENTATION NOTE: C++11 unique_ptr<> keeps this constructor distinct
- // from the normal move constructor. By C++11 20.7.1.2.1.21, this constructor
- // has different post-conditions if D is a reference type. Since this
- // implementation does not support deleters with reference type,
- // we do not need a separate move constructor allowing us to avoid one
- // use of SFINAE. You only need to care about this if you modify the
- // implementation of scoped_ptr.
- template <typename U, typename V>
- scoped_ptr(scoped_ptr<U, V> other) : impl_(&other.impl_) {
- COMPILE_ASSERT(!base::is_array<U>::value, U_cannot_be_an_array);
- }
-
- // Constructor. Move constructor for C++03 move emulation of this type.
- scoped_ptr(RValue rvalue) : impl_(&rvalue.object->impl_) { }
-
- // operator=. Allows assignment from a scoped_ptr rvalue for a convertible
- // type and deleter.
- //
- // IMPLEMENTATION NOTE: C++11 unique_ptr<> keeps this operator= distinct from
- // the normal move assignment operator. By C++11 20.7.1.2.3.4, this templated
- // form has different requirements on for move-only Deleters. Since this
- // implementation does not support move-only Deleters, we do not need a
- // separate move assignment operator allowing us to avoid one use of SFINAE.
- // You only need to care about this if you modify the implementation of
- // scoped_ptr.
- template <typename U, typename V>
- scoped_ptr& operator=(scoped_ptr<U, V> rhs) {
- COMPILE_ASSERT(!base::is_array<U>::value, U_cannot_be_an_array);
- impl_.TakeState(&rhs.impl_);
- return *this;
- }
-
- // Reset. Deletes the currently owned object, if any.
- // Then takes ownership of a new object, if given.
- void reset(element_type* p = NULL) { impl_.reset(p); }
-
- // Accessors to get the owned object.
- // operator* and operator-> will assert() if there is no current object.
- element_type& operator*() const {
- assert(impl_.get() != NULL);
- return *impl_.get();
- }
- element_type* operator->() const {
- assert(impl_.get() != NULL);
- return impl_.get();
- }
- element_type* get() const { return impl_.get(); }
-
- // Access to the deleter.
- deleter_type& get_deleter() { return impl_.get_deleter(); }
- const deleter_type& get_deleter() const { return impl_.get_deleter(); }
-
- // Allow scoped_ptr<element_type> to be used in boolean expressions, but not
- // implicitly convertible to a real bool (which is dangerous).
- //
- // Note that this trick is only safe when the == and != operators
- // are declared explicitly, as otherwise "scoped_ptr1 ==
- // scoped_ptr2" will compile but do the wrong thing (i.e., convert
- // to Testable and then do the comparison).
- private:
- typedef base::cef_internal::scoped_ptr_impl<element_type, deleter_type>
- scoped_ptr::*Testable;
-
- public:
- operator Testable() const { return impl_.get() ? &scoped_ptr::impl_ : NULL; }
-
- // Comparison operators.
- // These return whether two scoped_ptr refer to the same object, not just to
- // two different but equal objects.
- bool operator==(const element_type* p) const { return impl_.get() == p; }
- bool operator!=(const element_type* p) const { return impl_.get() != p; }
-
- // Swap two scoped pointers.
- void swap(scoped_ptr& p2) {
- impl_.swap(p2.impl_);
- }
-
- // Release a pointer.
- // The return value is the current pointer held by this object.
- // If this object holds a NULL pointer, the return value is NULL.
- // After this operation, this object will hold a NULL pointer,
- // and will not own the object any more.
- element_type* release() WARN_UNUSED_RESULT {
- return impl_.release();
- }
-
- // C++98 doesn't support functions templates with default parameters which
- // makes it hard to write a PassAs() that understands converting the deleter
- // while preserving simple calling semantics.
- //
- // Until there is a use case for PassAs() with custom deleters, just ignore
- // the custom deleter.
- template <typename PassAsType>
- scoped_ptr<PassAsType> PassAs() {
- return scoped_ptr<PassAsType>(Pass());
- }
-
- private:
- // Needed to reach into |impl_| in the constructor.
- template <typename U, typename V> friend class scoped_ptr;
- 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);
-
- // Forbid comparison of scoped_ptr types. If U != T, it totally
- // doesn't make sense, and if U == T, it still doesn't make sense
- // because you should never have the same object owned by two different
- // scoped_ptrs.
- template <class U> bool operator==(scoped_ptr<U> const& p2) const;
- template <class U> bool operator!=(scoped_ptr<U> const& p2) const;
-};
-
-template <class T, class D>
-class scoped_ptr<T[], D> {
- MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr, RValue)
-
- public:
- // The element and deleter types.
- typedef T element_type;
- typedef D deleter_type;
-
- // Constructor. Defaults to initializing with NULL.
- scoped_ptr() : impl_(NULL) { }
-
- // Constructor. Stores the given array. Note that the argument's type
- // must exactly match T*. In particular:
- // - it cannot be a pointer to a type derived from T, because it is
- // inherently unsafe in the general case to access an array through a
- // pointer whose dynamic type does not match its static type (eg., if
- // T and the derived types had different sizes access would be
- // incorrectly calculated). Deletion is also always undefined
- // (C++98 [expr.delete]p3). If you're doing this, fix your code.
- // - it cannot be NULL, because NULL is an integral expression, not a
- // pointer to T. Use the no-argument version instead of explicitly
- // passing NULL.
- // - it cannot be const-qualified differently from T per unique_ptr spec
- // (http://cplusplus.github.com/LWG/lwg-active.html#2118). Users wanting
- // to work around this may use implicit_cast<const T*>().
- // However, because of the first bullet in this comment, users MUST
- // NOT use implicit_cast<Base*>() to upcast the static type of the array.
- explicit scoped_ptr(element_type* array) : impl_(array) { }
-
- // Constructor. Move constructor for C++03 move emulation of this type.
- scoped_ptr(RValue rvalue) : impl_(&rvalue.object->impl_) { }
-
- // operator=. Move operator= for C++03 move emulation of this type.
- scoped_ptr& operator=(RValue rhs) {
- impl_.TakeState(&rhs.object->impl_);
- return *this;
- }
-
- // Reset. Deletes the currently owned array, if any.
- // Then takes ownership of a new object, if given.
- void reset(element_type* array = NULL) { impl_.reset(array); }
-
- // Accessors to get the owned array.
- element_type& operator[](size_t i) const {
- assert(impl_.get() != NULL);
- return impl_.get()[i];
- }
- element_type* get() const { return impl_.get(); }
-
- // Access to the deleter.
- deleter_type& get_deleter() { return impl_.get_deleter(); }
- const deleter_type& get_deleter() const { return impl_.get_deleter(); }
-
- // 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::cef_internal::scoped_ptr_impl<element_type, deleter_type>
- scoped_ptr::*Testable;
-
- public:
- operator Testable() const { return impl_.get() ? &scoped_ptr::impl_ : NULL; }
-
- // Comparison operators.
- // These return whether two scoped_ptr refer to the same object, not just to
- // two different but equal objects.
- bool operator==(element_type* array) const { return impl_.get() == array; }
- bool operator!=(element_type* array) const { return impl_.get() != array; }
-
- // Swap two scoped pointers.
- void swap(scoped_ptr& p2) {
- impl_.swap(p2.impl_);
- }
-
- // Release a pointer.
- // The return value is the current pointer held by this object.
- // If this object holds a NULL pointer, the return value is NULL.
- // After this operation, this object will hold a NULL pointer,
- // and will not own the object any more.
- element_type* release() WARN_UNUSED_RESULT {
- return impl_.release();
- }
-
- private:
- // Force element_type to be a complete type.
- enum { type_must_be_complete = sizeof(element_type) };
-
- // Actually hold the data.
- 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
- // private and has no definition. This is disabled because it is not safe to
- // call delete[] on an array whose static type does not match its dynamic
- // type.
- template <typename U> explicit scoped_ptr(U* array);
- explicit scoped_ptr(int disallow_construction_from_null);
-
- // Disable reset() from any type other than element_type*, for the same
- // reasons as the constructor above.
- template <typename U> void reset(U* array);
- void reset(int disallow_reset_from_null);
-
- // Forbid comparison of scoped_ptr types. If U != T, it totally
- // doesn't make sense, and if U == T, it still doesn't make sense
- // because you should never have the same object owned by two different
- // scoped_ptrs.
- template <class U> bool operator==(scoped_ptr<U> const& p2) const;
- template <class U> bool operator!=(scoped_ptr<U> const& p2) const;
-};
-
-// Free functions
-template <class T, class D>
-void swap(scoped_ptr<T, D>& p1, scoped_ptr<T, D>& p2) {
- p1.swap(p2);
-}
-
-template <class T, class D>
-bool operator==(T* p1, const scoped_ptr<T, D>& p2) {
- return p1 == p2.get();
-}
-
-template <class T, class D>
-bool operator!=(T* p1, const scoped_ptr<T, D>& p2) {
- return p1 != p2.get();
-}
-
-// A function to convert T* into scoped_ptr<T>
-// Doing e.g. make_scoped_ptr(new FooBarBaz<type>(arg)) is a shorter notation
-// for scoped_ptr<FooBarBaz<type> >(new FooBarBaz<type>(arg))
-template <typename T>
-scoped_ptr<T> make_scoped_ptr(T* ptr) {
- return scoped_ptr<T>(ptr);
-}
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_MEMORY_SCOPED_PTR_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2013
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef CEF_INCLUDE_BASE_CEF_STRING16_H_
-#define CEF_INCLUDE_BASE_CEF_STRING16_H_
-#pragma once
-
-#if defined(BASE_STRINGS_STRING16_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/strings/string16.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-// WHAT:
-// A version of std::basic_string that provides 2-byte characters even when
-// wchar_t is not implemented as a 2-byte type. You can access this class as
-// string16. We also define char16, which string16 is based upon.
-//
-// WHY:
-// On Windows, wchar_t is 2 bytes, and it can conveniently handle UTF-16/UCS-2
-// data. Plenty of existing code operates on strings encoded as UTF-16.
-//
-// On many other platforms, sizeof(wchar_t) is 4 bytes by default. We can make
-// it 2 bytes by using the GCC flag -fshort-wchar. But then std::wstring fails
-// at run time, because it calls some functions (like wcslen) that come from
-// the system's native C library -- which was built with a 4-byte wchar_t!
-// It's wasteful to use 4-byte wchar_t strings to carry UTF-16 data, and it's
-// entirely improper on those systems where the encoding of wchar_t is defined
-// as UTF-32.
-//
-// Here, we define string16, which is similar to std::wstring but replaces all
-// libc functions with custom, 2-byte-char compatible routines. It is capable
-// of carrying UTF-16-encoded data.
-
-#include <stdio.h>
-#include <string>
-
-#include "include/base/cef_basictypes.h"
-
-#if defined(WCHAR_T_IS_UTF16)
-
-namespace base {
-
-typedef wchar_t char16;
-typedef std::wstring string16;
-typedef std::char_traits<wchar_t> string16_char_traits;
-
-} // namespace base
-
-#elif defined(WCHAR_T_IS_UTF32)
-
-#include <stdint.h> // For uint16_t
-
-#include "include/base/cef_macros.h"
-
-namespace base {
-
-typedef uint16_t char16;
-
-// char16 versions of the functions required by string16_char_traits; these
-// are based on the wide character functions of similar names ("w" or "wcs"
-// instead of "c16").
-int c16memcmp(const char16* s1, const char16* s2, size_t n);
-size_t c16len(const char16* s);
-const char16* c16memchr(const char16* s, char16 c, size_t n);
-char16* c16memmove(char16* s1, const char16* s2, size_t n);
-char16* c16memcpy(char16* s1, const char16* s2, size_t n);
-char16* c16memset(char16* s, char16 c, size_t n);
-
-struct string16_char_traits {
- typedef char16 char_type;
- typedef int int_type;
-
- // int_type needs to be able to hold each possible value of char_type, and in
- // addition, the distinct value of eof().
- COMPILE_ASSERT(sizeof(int_type) > sizeof(char_type), unexpected_type_width);
-
- typedef std::streamoff off_type;
- typedef mbstate_t state_type;
- typedef std::fpos<state_type> pos_type;
-
- static void assign(char_type& c1, const char_type& c2) {
- c1 = c2;
- }
-
- static bool eq(const char_type& c1, const char_type& c2) {
- return c1 == c2;
- }
- static bool lt(const char_type& c1, const char_type& c2) {
- return c1 < c2;
- }
-
- static int compare(const char_type* s1, const char_type* s2, size_t n) {
- return c16memcmp(s1, s2, n);
- }
-
- static size_t length(const char_type* s) {
- return c16len(s);
- }
-
- static const char_type* find(const char_type* s, size_t n,
- const char_type& a) {
- return c16memchr(s, a, n);
- }
-
- static char_type* move(char_type* s1, const char_type* s2, int_type n) {
- return c16memmove(s1, s2, n);
- }
-
- static char_type* copy(char_type* s1, const char_type* s2, size_t n) {
- return c16memcpy(s1, s2, n);
- }
-
- static char_type* assign(char_type* s, size_t n, char_type a) {
- return c16memset(s, a, n);
- }
-
- static int_type not_eof(const int_type& c) {
- return eq_int_type(c, eof()) ? 0 : c;
- }
-
- static char_type to_char_type(const int_type& c) {
- return char_type(c);
- }
-
- static int_type to_int_type(const char_type& c) {
- return int_type(c);
- }
-
- static bool eq_int_type(const int_type& c1, const int_type& c2) {
- return c1 == c2;
- }
-
- static int_type eof() {
- return static_cast<int_type>(EOF);
- }
-};
-
-typedef std::basic_string<char16, base::string16_char_traits> string16;
-
-extern std::ostream& operator<<(std::ostream& out, const string16& str);
-
-// This is required by googletest to print a readable output on test failures.
-extern void PrintTo(const string16& str, std::ostream* out);
-
-} // namespace base
-
-// The string class will be explicitly instantiated only once, in string16.cc.
-//
-// std::basic_string<> in GNU libstdc++ contains a static data member,
-// _S_empty_rep_storage, to represent empty strings. When an operation such
-// as assignment or destruction is performed on a string, causing its existing
-// data member to be invalidated, it must not be freed if this static data
-// member is being used. Otherwise, it counts as an attempt to free static
-// (and not allocated) data, which is a memory error.
-//
-// Generally, due to C++ template magic, _S_empty_rep_storage will be marked
-// as a coalesced symbol, meaning that the linker will combine multiple
-// instances into a single one when generating output.
-//
-// If a string class is used by multiple shared libraries, a problem occurs.
-// Each library will get its own copy of _S_empty_rep_storage. When strings
-// are passed across a library boundary for alteration or destruction, memory
-// errors will result. GNU libstdc++ contains a configuration option,
-// --enable-fully-dynamic-string (_GLIBCXX_FULLY_DYNAMIC_STRING), which
-// disables the static data member optimization, but it's a good optimization
-// and non-STL code is generally at the mercy of the system's STL
-// configuration. Fully-dynamic strings are not the default for GNU libstdc++
-// libstdc++ itself or for the libstdc++ installations on the systems we care
-// about, such as Mac OS X and relevant flavors of Linux.
-//
-// See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24196 .
-//
-// To avoid problems, string classes need to be explicitly instantiated only
-// once, in exactly one library. All other string users see it via an "extern"
-// declaration. This is precisely how GNU libstdc++ handles
-// std::basic_string<char> (string) and std::basic_string<wchar_t> (wstring).
-//
-// This also works around a Mac OS X linker bug in ld64-85.2.1 (Xcode 3.1.2),
-// in which the linker does not fully coalesce symbols when dead code
-// stripping is enabled. This bug causes the memory errors described above
-// to occur even when a std::basic_string<> does not cross shared library
-// boundaries, such as in statically-linked executables.
-//
-// TODO(mark): File this bug with Apple and update this note with a bug number.
-
-extern template
-class std::basic_string<base::char16, base::string16_char_traits>;
-
-#endif // WCHAR_T_IS_UTF32
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_STRING16_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef CEF_INCLUDE_BASE_CEF_TEMPLATE_UTIL_H_
-#define CEF_INCLUDE_BASE_CEF_TEMPLATE_UTIL_H_
-#pragma once
-
-#if defined(BASE_TEMPLATE_UTIL_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/template_util.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include <cstddef> // For size_t.
-
-#include "include/base/cef_build.h"
-
-namespace base {
-
-// template definitions from tr1
-
-template<class T, T v>
-struct integral_constant {
- static const T value = v;
- typedef T value_type;
- typedef integral_constant<T, v> type;
-};
-
-template <class T, T v> const T integral_constant<T, v>::value;
-
-typedef integral_constant<bool, true> true_type;
-typedef integral_constant<bool, false> false_type;
-
-template <class T> struct is_pointer : false_type {};
-template <class T> struct is_pointer<T*> : true_type {};
-
-// Member function pointer detection up to four params. Add more as needed
-// below. This is built-in to C++ 11, and we can remove this when we switch.
-template<typename T>
-struct is_member_function_pointer : false_type {};
-
-template <typename R, typename Z>
-struct is_member_function_pointer<R(Z::*)()> : true_type {};
-template <typename R, typename Z>
-struct is_member_function_pointer<R(Z::*)() const> : true_type {};
-
-template <typename R, typename Z, typename A>
-struct is_member_function_pointer<R(Z::*)(A)> : true_type {};
-template <typename R, typename Z, typename A>
-struct is_member_function_pointer<R(Z::*)(A) const> : true_type {};
-
-template <typename R, typename Z, typename A, typename B>
-struct is_member_function_pointer<R(Z::*)(A, B)> : true_type {};
-template <typename R, typename Z, typename A, typename B>
-struct is_member_function_pointer<R(Z::*)(A, B) const> : true_type {};
-
-template <typename R, typename Z, typename A, typename B, typename C>
-struct is_member_function_pointer<R(Z::*)(A, B, C)> : true_type {};
-template <typename R, typename Z, typename A, typename B, typename C>
-struct is_member_function_pointer<R(Z::*)(A, B, C) const> : true_type {};
-
-template <typename R, typename Z, typename A, typename B, typename C,
- typename D>
-struct is_member_function_pointer<R(Z::*)(A, B, C, D)> : true_type {};
-template <typename R, typename Z, typename A, typename B, typename C,
- typename D>
-struct is_member_function_pointer<R(Z::*)(A, B, C, D) const> : true_type {};
-
-
-template <class T, class U> struct is_same : public false_type {};
-template <class T> struct is_same<T,T> : true_type {};
-
-template<class> struct is_array : public false_type {};
-template<class T, size_t n> struct is_array<T[n]> : public true_type {};
-template<class T> struct is_array<T[]> : public true_type {};
-
-template <class T> struct is_non_const_reference : false_type {};
-template <class T> struct is_non_const_reference<T&> : true_type {};
-template <class T> struct is_non_const_reference<const T&> : false_type {};
-
-template <class T> struct is_const : false_type {};
-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 cef_internal {
-
-// Types YesType and NoType are guaranteed such that sizeof(YesType) <
-// sizeof(NoType).
-typedef char YesType;
-
-struct NoType {
- YesType dummy[2];
-};
-
-// This class is an implementation detail for is_convertible, and you
-// don't need to know how it works to use is_convertible. For those
-// who care: we declare two different functions, one whose argument is
-// of type To and one with a variadic argument list. We give them
-// return types of different size, so we can use sizeof to trick the
-// compiler into telling us which function it would have chosen if we
-// had called it with an argument of type From. See Alexandrescu's
-// _Modern C++ Design_ for more details on this sort of trick.
-
-struct ConvertHelper {
- template <typename To>
- static YesType Test(To);
-
- template <typename To>
- static NoType Test(...);
-
- template <typename From>
- static From& Create();
-};
-
-// Used to determine if a type is a struct/union/class. Inspired by Boost's
-// is_class type_trait implementation.
-struct IsClassHelper {
- template <typename C>
- static YesType Test(void(C::*)(void));
-
- template <typename C>
- static NoType Test(...);
-};
-
-} // namespace cef_internal
-
-// Inherits from true_type if From is convertible to To, false_type otherwise.
-//
-// Note that if the type is convertible, this will be a true_type REGARDLESS
-// of whether or not the conversion would emit a warning.
-template <typename From, typename To>
-struct is_convertible
- : integral_constant<bool,
- 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(cef_internal::IsClassHelper::Test<T>(0)) ==
- sizeof(cef_internal::YesType)> {
-};
-
-template<bool B, class T = void>
-struct enable_if {};
-
-template<class T>
-struct enable_if<true, T> { typedef T type; };
-
-} // namespace base
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_TEMPLATE_UTIL_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef CEF_INCLUDE_BASE_THREAD_CHECKER_H_
-#define CEF_INCLUDE_BASE_THREAD_CHECKER_H_
-#pragma once
-
-#if defined(BASE_THREADING_THREAD_CHECKER_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/threading/thread_checker.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-// Apart from debug builds, we also enable the thread checker in
-// builds with DCHECK_ALWAYS_ON so that trybots and waterfall bots
-// with this define will get the same level of thread checking as
-// debug bots.
-//
-// Note that this does not perfectly match situations where DCHECK is
-// enabled. For example a non-official release build may have
-// DCHECK_ALWAYS_ON undefined (and therefore ThreadChecker would be
-// disabled) but have DCHECKs enabled at runtime.
-#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))
-#define ENABLE_THREAD_CHECKER 1
-#else
-#define ENABLE_THREAD_CHECKER 0
-#endif
-
-#include "include/base/internal/cef_thread_checker_impl.h"
-
-namespace base {
-
-// Do nothing implementation, for use in release mode.
-//
-// Note: You should almost always use the ThreadChecker class to get the
-// right version for your build configuration.
-class ThreadCheckerDoNothing {
- public:
- bool CalledOnValidThread() const {
- return true;
- }
-
- void DetachFromThread() {}
-};
-
-// ThreadChecker is a helper class used to help verify that some methods of a
-// class are called from the same thread. It provides identical functionality to
-// base::NonThreadSafe, but it is meant to be held as a member variable, rather
-// than inherited from base::NonThreadSafe.
-//
-// While inheriting from base::NonThreadSafe may give a clear indication about
-// the thread-safety of a class, it may also lead to violations of the style
-// guide with regard to multiple inheritance. The choice between having a
-// ThreadChecker member and inheriting from base::NonThreadSafe should be based
-// on whether:
-// - Derived classes need to know the thread they belong to, as opposed to
-// having that functionality fully encapsulated in the base class.
-// - Derived classes should be able to reassign the base class to another
-// thread, via DetachFromThread.
-//
-// If neither of these are true, then having a ThreadChecker member and calling
-// CalledOnValidThread is the preferable solution.
-//
-// Example:
-// class MyClass {
-// public:
-// void Foo() {
-// DCHECK(thread_checker_.CalledOnValidThread());
-// ... (do stuff) ...
-// }
-//
-// private:
-// ThreadChecker thread_checker_;
-// }
-//
-// In Release mode, CalledOnValidThread will always return true.
-#if ENABLE_THREAD_CHECKER
-class ThreadChecker : public ThreadCheckerImpl {
-};
-#else
-class ThreadChecker : public ThreadCheckerDoNothing {
-};
-#endif // ENABLE_THREAD_CHECKER
-
-#undef ENABLE_THREAD_CHECKER
-
-} // namespace base
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_THREAD_CHECKER_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef CEF_INCLUDE_BASE_CEF_THREAD_COLLISION_WARNER_H_
-#define CEF_INCLUDE_BASE_CEF_THREAD_COLLISION_WARNER_H_
-#pragma once
-
-#if defined(BASE_THREADING_THREAD_COLLISION_WARNER_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/threading/thread_collision_warner.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include <memory>
-
-#include "include/base/cef_atomicops.h"
-#include "include/base/cef_basictypes.h"
-#include "include/base/cef_build.h"
-#include "include/base/cef_macros.h"
-
-// A helper class alongside macros to be used to verify assumptions about thread
-// safety of a class.
-//
-// Example: Queue implementation non thread-safe but still usable if clients
-// are synchronized somehow.
-//
-// In this case the macro DFAKE_SCOPED_LOCK has to be
-// used, it checks that if a thread is inside the push/pop then
-// noone else is still inside the pop/push
-//
-// class NonThreadSafeQueue {
-// public:
-// ...
-// void push(int) { DFAKE_SCOPED_LOCK(push_pop_); ... }
-// int pop() { DFAKE_SCOPED_LOCK(push_pop_); ... }
-// ...
-// private:
-// DFAKE_MUTEX(push_pop_);
-// };
-//
-//
-// Example: Queue implementation non thread-safe but still usable if clients
-// are synchronized somehow, it calls a method to "protect" from
-// a "protected" method
-//
-// In this case the macro DFAKE_SCOPED_RECURSIVE_LOCK
-// has to be used, it checks that if a thread is inside the push/pop
-// then noone else is still inside the pop/push
-//
-// class NonThreadSafeQueue {
-// public:
-// void push(int) {
-// DFAKE_SCOPED_LOCK(push_pop_);
-// ...
-// }
-// int pop() {
-// DFAKE_SCOPED_RECURSIVE_LOCK(push_pop_);
-// bar();
-// ...
-// }
-// void bar() { DFAKE_SCOPED_RECURSIVE_LOCK(push_pop_); ... }
-// ...
-// private:
-// DFAKE_MUTEX(push_pop_);
-// };
-//
-//
-// Example: Queue implementation not usable even if clients are synchronized,
-// so only one thread in the class life cycle can use the two members
-// push/pop.
-//
-// In this case the macro DFAKE_SCOPED_LOCK_THREAD_LOCKED pins the
-// specified
-// critical section the first time a thread enters push or pop, from
-// that time on only that thread is allowed to execute push or pop.
-//
-// class NonThreadSafeQueue {
-// public:
-// ...
-// void push(int) { DFAKE_SCOPED_LOCK_THREAD_LOCKED(push_pop_); ... }
-// int pop() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(push_pop_); ... }
-// ...
-// private:
-// DFAKE_MUTEX(push_pop_);
-// };
-//
-//
-// Example: Class that has to be contructed/destroyed on same thread, it has
-// a "shareable" method (with external synchronization) and a not
-// shareable method (even with external synchronization).
-//
-// In this case 3 Critical sections have to be defined
-//
-// class ExoticClass {
-// public:
-// ExoticClass() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(ctor_dtor_); ... }
-// ~ExoticClass() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(ctor_dtor_); ... }
-//
-// void Shareable() { DFAKE_SCOPED_LOCK(shareable_section_); ... }
-// void NotShareable() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(ctor_dtor_); ... }
-// ...
-// private:
-// DFAKE_MUTEX(ctor_dtor_);
-// DFAKE_MUTEX(shareable_section_);
-// };
-
-
-#if !defined(NDEBUG)
-
-// Defines a class member that acts like a mutex. It is used only as a
-// verification tool.
-#define DFAKE_MUTEX(obj) \
- mutable base::ThreadCollisionWarner obj
-// Asserts the call is never called simultaneously in two threads. Used at
-// member function scope.
-#define DFAKE_SCOPED_LOCK(obj) \
- base::ThreadCollisionWarner::ScopedCheck s_check_##obj(&obj)
-// Asserts the call is never called simultaneously in two threads. Used at
-// member function scope. Same as DFAKE_SCOPED_LOCK but allows recursive locks.
-#define DFAKE_SCOPED_RECURSIVE_LOCK(obj) \
- base::ThreadCollisionWarner::ScopedRecursiveCheck sr_check_##obj(&obj)
-// Asserts the code is always executed in the same thread.
-#define DFAKE_SCOPED_LOCK_THREAD_LOCKED(obj) \
- base::ThreadCollisionWarner::Check check_##obj(&obj)
-
-#else
-
-#define DFAKE_MUTEX(obj) typedef void InternalFakeMutexType##obj
-#define DFAKE_SCOPED_LOCK(obj) ((void)0)
-#define DFAKE_SCOPED_RECURSIVE_LOCK(obj) ((void)0)
-#define DFAKE_SCOPED_LOCK_THREAD_LOCKED(obj) ((void)0)
-
-#endif
-
-namespace base {
-
-// The class ThreadCollisionWarner uses an Asserter to notify the collision
-// AsserterBase is the interfaces and DCheckAsserter is the default asserter
-// used. During the unit tests is used another class that doesn't "DCHECK"
-// in case of collision (check thread_collision_warner_unittests.cc)
-struct AsserterBase {
- virtual ~AsserterBase() {}
- virtual void warn() = 0;
-};
-
-struct DCheckAsserter : public AsserterBase {
- virtual ~DCheckAsserter() {}
- virtual void warn() OVERRIDE;
-};
-
-class ThreadCollisionWarner {
- public:
- // The parameter asserter is there only for test purpose
- explicit ThreadCollisionWarner(AsserterBase* asserter = new DCheckAsserter())
- : valid_thread_id_(0),
- counter_(0),
- asserter_(asserter) {}
-
- ~ThreadCollisionWarner() {
- delete asserter_;
- }
-
- // This class is meant to be used through the macro
- // DFAKE_SCOPED_LOCK_THREAD_LOCKED
- // it doesn't leave the critical section, as opposed to ScopedCheck,
- // because the critical section being pinned is allowed to be used only
- // from one thread
- class Check {
- public:
- explicit Check(ThreadCollisionWarner* warner)
- : warner_(warner) {
- warner_->EnterSelf();
- }
-
- ~Check() {}
-
- private:
- ThreadCollisionWarner* warner_;
-
- DISALLOW_COPY_AND_ASSIGN(Check);
- };
-
- // This class is meant to be used through the macro
- // DFAKE_SCOPED_LOCK
- class ScopedCheck {
- public:
- explicit ScopedCheck(ThreadCollisionWarner* warner)
- : warner_(warner) {
- warner_->Enter();
- }
-
- ~ScopedCheck() {
- warner_->Leave();
- }
-
- private:
- ThreadCollisionWarner* warner_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedCheck);
- };
-
- // This class is meant to be used through the macro
- // DFAKE_SCOPED_RECURSIVE_LOCK
- class ScopedRecursiveCheck {
- public:
- explicit ScopedRecursiveCheck(ThreadCollisionWarner* warner)
- : warner_(warner) {
- warner_->EnterSelf();
- }
-
- ~ScopedRecursiveCheck() {
- warner_->Leave();
- }
-
- private:
- ThreadCollisionWarner* warner_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedRecursiveCheck);
- };
-
- private:
- // This method stores the current thread identifier and does a DCHECK
- // if a another thread has already done it, it is safe if same thread
- // calls this multiple time (recursion allowed).
- void EnterSelf();
-
- // Same as EnterSelf but recursion is not allowed.
- void Enter();
-
- // Removes the thread_id stored in order to allow other threads to
- // call EnterSelf or Enter.
- void Leave();
-
- // This stores the thread id that is inside the critical section, if the
- // value is 0 then no thread is inside.
- volatile subtle::Atomic32 valid_thread_id_;
-
- // Counter to trace how many time a critical section was "pinned"
- // (when allowed) in order to unpin it when counter_ reaches 0.
- volatile subtle::Atomic32 counter_;
-
- // Here only for class unit tests purpose, during the test I need to not
- // DCHECK but notify the collision with something else.
- AsserterBase* asserter_;
-
- DISALLOW_COPY_AND_ASSIGN(ThreadCollisionWarner);
-};
-
-} // namespace base
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_THREAD_COLLISION_WARNER_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
-// Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Weak pointers are pointers to an object that do not affect its lifetime,
-// and which may be invalidated (i.e. reset to NULL) by the object, or its
-// owner, at any time, most commonly when the object is about to be deleted.
-
-// Weak pointers are useful when an object needs to be accessed safely by one
-// or more objects other than its owner, and those callers can cope with the
-// object vanishing and e.g. tasks posted to it being silently dropped.
-// Reference-counting such an object would complicate the ownership graph and
-// make it harder to reason about the object's lifetime.
-
-// EXAMPLE:
-//
-// class Controller {
-// public:
-// void SpawnWorker() { Worker::StartNew(weak_factory_.GetWeakPtr()); }
-// void WorkComplete(const Result& result) { ... }
-// private:
-// // Member variables should appear before the WeakPtrFactory, to ensure
-// // that any WeakPtrs to Controller are invalidated before its members
-// // variable's destructors are executed, rendering them invalid.
-// WeakPtrFactory<Controller> weak_factory_;
-// };
-//
-// class Worker {
-// public:
-// static void StartNew(const WeakPtr<Controller>& controller) {
-// Worker* worker = new Worker(controller);
-// // Kick off asynchronous processing...
-// }
-// private:
-// Worker(const WeakPtr<Controller>& controller)
-// : controller_(controller) {}
-// void DidCompleteAsynchronousProcessing(const Result& result) {
-// if (controller_)
-// controller_->WorkComplete(result);
-// }
-// WeakPtr<Controller> controller_;
-// };
-//
-// With this implementation a caller may use SpawnWorker() to dispatch multiple
-// Workers and subsequently delete the Controller, without waiting for all
-// Workers to have completed.
-
-// ------------------------- IMPORTANT: Thread-safety -------------------------
-
-// Weak pointers may be passed safely between threads, but must always be
-// dereferenced and invalidated on the same thread otherwise checking the
-// pointer would be racey.
-//
-// To ensure correct use, the first time a WeakPtr issued by a WeakPtrFactory
-// is dereferenced, the factory and its WeakPtrs become bound to the calling
-// thread, and cannot be dereferenced or invalidated on any other thread. Bound
-// WeakPtrs can still be handed off to other threads, e.g. to use to post tasks
-// back to object on the bound thread.
-//
-// Invalidating the factory's WeakPtrs un-binds it from the thread, allowing it
-// to be passed for a different thread to use or delete it.
-
-#ifndef CEF_INCLUDE_BASE_CEF_WEAK_PTR_H_
-#define CEF_INCLUDE_BASE_CEF_WEAK_PTR_H_
-#pragma once
-
-#if defined(BASE_MEMORY_WEAK_PTR_H_)
-// Do nothing if the Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/memory/weak_ptr.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include "include/base/cef_basictypes.h"
-#include "include/base/cef_logging.h"
-#include "include/base/cef_ref_counted.h"
-#include "include/base/cef_template_util.h"
-#include "include/base/cef_thread_checker.h"
-
-namespace base {
-
-template <typename T> class SupportsWeakPtr;
-template <typename T> class WeakPtr;
-
-namespace cef_internal {
-// These classes are part of the WeakPtr implementation.
-// DO NOT USE THESE CLASSES DIRECTLY YOURSELF.
-
-class WeakReference {
- public:
- // Although Flag is bound to a specific thread, it may be deleted from another
- // via base::WeakPtr::~WeakPtr().
- class Flag : public RefCountedThreadSafe<Flag> {
- public:
- Flag();
-
- void Invalidate();
- bool IsValid() const;
-
- private:
- friend class base::RefCountedThreadSafe<Flag>;
-
- ~Flag();
-
- // The current Chromium implementation uses SequenceChecker instead of
- // ThreadChecker to support SequencedWorkerPools. CEF does not yet expose
- // the concept of SequencedWorkerPools.
- ThreadChecker thread_checker_;
- bool is_valid_;
- };
-
- WeakReference();
- explicit WeakReference(const Flag* flag);
- ~WeakReference();
-
- bool is_valid() const;
-
- private:
- scoped_refptr<const Flag> flag_;
-};
-
-class WeakReferenceOwner {
- public:
- WeakReferenceOwner();
- ~WeakReferenceOwner();
-
- WeakReference GetRef() const;
-
- bool HasRefs() const {
- return flag_.get() && !flag_->HasOneRef();
- }
-
- void Invalidate();
-
- private:
- mutable scoped_refptr<WeakReference::Flag> flag_;
-};
-
-// This class simplifies the implementation of WeakPtr's type conversion
-// constructor by avoiding the need for a public accessor for ref_. A
-// WeakPtr<T> cannot access the private members of WeakPtr<U>, so this
-// base class gives us a way to access ref_ in a protected fashion.
-class WeakPtrBase {
- public:
- WeakPtrBase();
- ~WeakPtrBase();
-
- protected:
- explicit WeakPtrBase(const WeakReference& ref);
-
- WeakReference ref_;
-};
-
-// This class provides a common implementation of common functions that would
-// otherwise get instantiated separately for each distinct instantiation of
-// SupportsWeakPtr<>.
-class SupportsWeakPtrBase {
- public:
- // A safe static downcast of a WeakPtr<Base> to WeakPtr<Derived>. This
- // conversion will only compile if there is exists a Base which inherits
- // from SupportsWeakPtr<Base>. See base::AsWeakPtr() below for a helper
- // function that makes calling this easier.
- template<typename Derived>
- static WeakPtr<Derived> StaticAsWeakPtr(Derived* t) {
- typedef
- is_convertible<Derived, cef_internal::SupportsWeakPtrBase&> convertible;
- COMPILE_ASSERT(convertible::value,
- AsWeakPtr_argument_inherits_from_SupportsWeakPtr);
- return AsWeakPtrImpl<Derived>(t, *t);
- }
-
- private:
- // This template function uses type inference to find a Base of Derived
- // which is an instance of SupportsWeakPtr<Base>. We can then safely
- // static_cast the Base* to a Derived*.
- template <typename Derived, typename Base>
- static WeakPtr<Derived> AsWeakPtrImpl(
- Derived* t, const SupportsWeakPtr<Base>&) {
- WeakPtr<Base> ptr = t->Base::AsWeakPtr();
- return WeakPtr<Derived>(ptr.ref_, static_cast<Derived*>(ptr.ptr_));
- }
-};
-
-} // namespace cef_internal
-
-template <typename T> class WeakPtrFactory;
-
-// The WeakPtr class holds a weak reference to |T*|.
-//
-// This class is designed to be used like a normal pointer. You should always
-// null-test an object of this class before using it or invoking a method that
-// may result in the underlying object being destroyed.
-//
-// EXAMPLE:
-//
-// class Foo { ... };
-// WeakPtr<Foo> foo;
-// if (foo)
-// foo->method();
-//
-template <typename T>
-class WeakPtr : public cef_internal::WeakPtrBase {
- public:
- WeakPtr() : ptr_(NULL) {
- }
-
- // Allow conversion from U to T provided U "is a" T. Note that this
- // is separate from the (implicit) copy constructor.
- template <typename U>
- WeakPtr(const WeakPtr<U>& other) : WeakPtrBase(other), ptr_(other.ptr_) {
- }
-
- T* get() const { return ref_.is_valid() ? ptr_ : NULL; }
-
- T& operator*() const {
- DCHECK(get() != NULL);
- return *get();
- }
- T* operator->() const {
- DCHECK(get() != NULL);
- return get();
- }
-
- // Allow WeakPtr<element_type> to be used in boolean expressions, but not
- // implicitly convertible to a real bool (which is dangerous).
- //
- // Note that this trick is only safe when the == and != operators
- // are declared explicitly, as otherwise "weak_ptr1 == weak_ptr2"
- // will compile but do the wrong thing (i.e., convert to Testable
- // and then do the comparison).
- private:
- typedef T* WeakPtr::*Testable;
-
- public:
- operator Testable() const { return get() ? &WeakPtr::ptr_ : NULL; }
-
- void reset() {
- ref_ = cef_internal::WeakReference();
- ptr_ = NULL;
- }
-
- private:
- // Explicitly declare comparison operators as required by the bool
- // trick, but keep them private.
- template <class U> bool operator==(WeakPtr<U> const&) const;
- template <class U> bool operator!=(WeakPtr<U> const&) const;
-
- friend class cef_internal::SupportsWeakPtrBase;
- template <typename U> friend class WeakPtr;
- friend class SupportsWeakPtr<T>;
- friend class WeakPtrFactory<T>;
-
- WeakPtr(const cef_internal::WeakReference& ref, T* ptr)
- : WeakPtrBase(ref),
- ptr_(ptr) {
- }
-
- // This pointer is only valid when ref_.is_valid() is true. Otherwise, its
- // value is undefined (as opposed to NULL).
- T* ptr_;
-};
-
-// A class may be composed of a WeakPtrFactory and thereby
-// control how it exposes weak pointers to itself. This is helpful if you only
-// need weak pointers within the implementation of a class. This class is also
-// useful when working with primitive types. For example, you could have a
-// WeakPtrFactory<bool> that is used to pass around a weak reference to a bool.
-template <class T>
-class WeakPtrFactory {
- public:
- explicit WeakPtrFactory(T* ptr) : ptr_(ptr) {
- }
-
- ~WeakPtrFactory() {
- ptr_ = NULL;
- }
-
- WeakPtr<T> GetWeakPtr() {
- DCHECK(ptr_);
- return WeakPtr<T>(weak_reference_owner_.GetRef(), ptr_);
- }
-
- // Call this method to invalidate all existing weak pointers.
- void InvalidateWeakPtrs() {
- DCHECK(ptr_);
- weak_reference_owner_.Invalidate();
- }
-
- // Call this method to determine if any weak pointers exist.
- bool HasWeakPtrs() const {
- DCHECK(ptr_);
- return weak_reference_owner_.HasRefs();
- }
-
- private:
- cef_internal::WeakReferenceOwner weak_reference_owner_;
- T* ptr_;
- DISALLOW_IMPLICIT_CONSTRUCTORS(WeakPtrFactory);
-};
-
-// A class may extend from SupportsWeakPtr to let others take weak pointers to
-// it. This avoids the class itself implementing boilerplate to dispense weak
-// pointers. However, since SupportsWeakPtr's destructor won't invalidate
-// 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 cef_internal::SupportsWeakPtrBase {
- public:
- SupportsWeakPtr() {}
-
- WeakPtr<T> AsWeakPtr() {
- return WeakPtr<T>(weak_reference_owner_.GetRef(), static_cast<T*>(this));
- }
-
- protected:
- ~SupportsWeakPtr() {}
-
- private:
- cef_internal::WeakReferenceOwner weak_reference_owner_;
- DISALLOW_COPY_AND_ASSIGN(SupportsWeakPtr);
-};
-
-// Helper function that uses type deduction to safely return a WeakPtr<Derived>
-// when Derived doesn't directly extend SupportsWeakPtr<Derived>, instead it
-// extends a Base that extends SupportsWeakPtr<Base>.
-//
-// EXAMPLE:
-// class Base : public base::SupportsWeakPtr<Producer> {};
-// class Derived : public Base {};
-//
-// Derived derived;
-// base::WeakPtr<Derived> ptr = base::AsWeakPtr(&derived);
-//
-// Note that the following doesn't work (invalid type conversion) since
-// Derived::AsWeakPtr() is WeakPtr<Base> SupportsWeakPtr<Base>::AsWeakPtr(),
-// and there's no way to safely cast WeakPtr<Base> to WeakPtr<Derived> at
-// the caller.
-//
-// base::WeakPtr<Derived> ptr = derived.AsWeakPtr(); // Fails.
-
-template <typename Derived>
-WeakPtr<Derived> AsWeakPtr(Derived* t) {
- return cef_internal::SupportsWeakPtrBase::StaticAsWeakPtr<Derived>(t);
-}
-
-} // namespace base
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_INCLUDE_BASE_CEF_WEAK_PTR_H_
+++ /dev/null
-// Copyright (c) 2008 Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Do not include this header file directly. Use base/cef_atomicops.h
-// instead.
-
-#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_ATOMICOPS_X86_MSVC_H_
-#define CEF_INCLUDE_BASE_INTERNAL_CEF_ATOMICOPS_X86_MSVC_H_
-
-#include <windows.h>
-
-#include <intrin.h>
-
-#include "include/base/cef_macros.h"
-
-#if defined(ARCH_CPU_64_BITS)
-// windows.h #defines this (only on x64). This causes problems because the
-// public API also uses MemoryBarrier at the public name for this fence. So, on
-// X64, undef it, and call its documented
-// (http://msdn.microsoft.com/en-us/library/windows/desktop/ms684208.aspx)
-// implementation directly.
-#undef MemoryBarrier
-#endif
-
-namespace base {
-namespace subtle {
-
-inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- LONG result = _InterlockedCompareExchange(
- reinterpret_cast<volatile LONG*>(ptr),
- static_cast<LONG>(new_value),
- static_cast<LONG>(old_value));
- return static_cast<Atomic32>(result);
-}
-
-inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
- Atomic32 new_value) {
- LONG result = _InterlockedExchange(
- reinterpret_cast<volatile LONG*>(ptr),
- static_cast<LONG>(new_value));
- return static_cast<Atomic32>(result);
-}
-
-inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
- Atomic32 increment) {
- return _InterlockedExchangeAdd(
- reinterpret_cast<volatile LONG*>(ptr),
- static_cast<LONG>(increment)) + increment;
-}
-
-inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
- Atomic32 increment) {
- return Barrier_AtomicIncrement(ptr, increment);
-}
-
-#if !(defined(_MSC_VER) && _MSC_VER >= 1400)
-#error "We require at least vs2005 for MemoryBarrier"
-#endif
-inline void MemoryBarrier() {
-#if defined(ARCH_CPU_64_BITS)
- // See #undef and note at the top of this file.
- __faststorefence();
-#else
- // We use MemoryBarrier from WinNT.h
- ::MemoryBarrier();
-#endif
-}
-
-inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-}
-
-inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-}
-
-inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
- *ptr = value;
-}
-
-inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
- NoBarrier_AtomicExchange(ptr, value);
- // acts as a barrier in this implementation
-}
-
-inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
- *ptr = value; // works w/o barrier for current Intel chips as of June 2005
- // See comments in Atomic64 version of Release_Store() below.
-}
-
-inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
- return *ptr;
-}
-
-inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
- Atomic32 value = *ptr;
- return value;
-}
-
-inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
- MemoryBarrier();
- return *ptr;
-}
-
-#if defined(_WIN64)
-
-// 64-bit low-level operations on 64-bit platform.
-
-COMPILE_ASSERT(sizeof(Atomic64) == sizeof(PVOID), atomic_word_is_atomic);
-
-inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- PVOID result = InterlockedCompareExchangePointer(
- reinterpret_cast<volatile PVOID*>(ptr),
- reinterpret_cast<PVOID>(new_value), reinterpret_cast<PVOID>(old_value));
- return reinterpret_cast<Atomic64>(result);
-}
-
-inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr,
- Atomic64 new_value) {
- PVOID result = InterlockedExchangePointer(
- reinterpret_cast<volatile PVOID*>(ptr),
- reinterpret_cast<PVOID>(new_value));
- return reinterpret_cast<Atomic64>(result);
-}
-
-inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
- Atomic64 increment) {
- return InterlockedExchangeAdd64(
- reinterpret_cast<volatile LONGLONG*>(ptr),
- static_cast<LONGLONG>(increment)) + increment;
-}
-
-inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
- Atomic64 increment) {
- return Barrier_AtomicIncrement(ptr, increment);
-}
-
-inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
- *ptr = value;
-}
-
-inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
- NoBarrier_AtomicExchange(ptr, value);
- // acts as a barrier in this implementation
-}
-
-inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
- *ptr = value; // works w/o barrier for current Intel chips as of June 2005
-
- // When new chips come out, check:
- // IA-32 Intel Architecture Software Developer's Manual, Volume 3:
- // System Programming Guide, Chatper 7: Multiple-processor management,
- // Section 7.2, Memory Ordering.
- // Last seen at:
- // http://developer.intel.com/design/pentium4/manuals/index_new.htm
-}
-
-inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
- return *ptr;
-}
-
-inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
- Atomic64 value = *ptr;
- return value;
-}
-
-inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
- MemoryBarrier();
- return *ptr;
-}
-
-inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-}
-
-inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-}
-
-
-#endif // defined(_WIN64)
-
-} // namespace base::subtle
-} // namespace base
-
-#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_ATOMICOPS_X86_MSVC_H_
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Do not include this header file directly. Use base/cef_bind.h instead.
-
-#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_H_
-#define CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_H_
-
-#include "include/base/cef_bind_helpers.h"
-#include "include/base/cef_build.h"
-#include "include/base/cef_template_util.h"
-#include "include/base/cef_weak_ptr.h"
-#include "include/base/internal/cef_callback_internal.h"
-#include "include/base/internal/cef_raw_scoped_refptr_mismatch_checker.h"
-
-#if defined(OS_WIN)
-#include "include/base/internal/cef_bind_internal_win.h"
-#endif
-
-namespace base {
-namespace cef_internal {
-
-// See base/callback.h for user documentation.
-//
-//
-// CONCEPTS:
-// Runnable -- A type (really a type class) that has a single Run() method
-// and a RunType typedef that corresponds to the type of Run().
-// A Runnable can declare that it should treated like a method
-// call by including a typedef named IsMethod. The value of
-// this typedef is NOT inspected, only the existence. When a
-// Runnable declares itself a method, Bind() will enforce special
-// refcounting + WeakPtr handling semantics for the first
-// parameter which is expected to be an object.
-// Functor -- A copyable type representing something that should be called.
-// All function pointers, Callback<>, and Runnables are functors
-// even if the invocation syntax differs.
-// RunType -- A function type (as opposed to function _pointer_ type) for
-// a Run() function. Usually just a convenience typedef.
-// (Bound)ArgsType -- A function type that is being (ab)used to store the
-// types of set of arguments. The "return" type is always
-// void here. We use this hack so that we do not need
-// a new type name for each arity of type. (eg.,
-// BindState1, BindState2). This makes forward
-// declarations and friending much much easier.
-//
-// Types:
-// RunnableAdapter<> -- Wraps the various "function" pointer types into an
-// object that adheres to the Runnable interface.
-// There are |3*ARITY| RunnableAdapter types.
-// FunctionTraits<> -- Type traits that unwrap a function signature into a
-// a set of easier to use typedefs. Used mainly for
-// compile time asserts.
-// There are |ARITY| FunctionTraits types.
-// ForceVoidReturn<> -- Helper class for translating function signatures to
-// equivalent forms with a "void" return type.
-// There are |ARITY| ForceVoidReturn types.
-// FunctorTraits<> -- Type traits used determine the correct RunType and
-// RunnableType for a Functor. This is where function
-// signature adapters are applied.
-// There are |ARITY| ForceVoidReturn types.
-// MakeRunnable<> -- Takes a Functor and returns an object in the Runnable
-// type class that represents the underlying Functor.
-// There are |O(1)| MakeRunnable types.
-// InvokeHelper<> -- Take a Runnable + arguments and actully invokes it.
-// Handle the differing syntaxes needed for WeakPtr<> support,
-// and for ignoring return values. This is separate from
-// Invoker to avoid creating multiple version of Invoker<>
-// which grows at O(n^2) with the arity.
-// There are |k*ARITY| InvokeHelper types.
-// Invoker<> -- Unwraps the curried parameters and executes the Runnable.
-// There are |(ARITY^2 + ARITY)/2| Invoketypes.
-// BindState<> -- Stores the curried parameters, and is the main entry point
-// into the Bind() system, doing most of the type resolution.
-// There are ARITY BindState types.
-
-// RunnableAdapter<>
-//
-// The RunnableAdapter<> templates provide a uniform interface for invoking
-// a function pointer, method pointer, or const method pointer. The adapter
-// exposes a Run() method with an appropriate signature. Using this wrapper
-// allows for writing code that supports all three pointer types without
-// undue repetition. Without it, a lot of code would need to be repeated 3
-// times.
-//
-// For method pointers and const method pointers the first argument to Run()
-// is considered to be the received of the method. This is similar to STL's
-// mem_fun().
-//
-// This class also exposes a RunType typedef that is the function type of the
-// Run() function.
-//
-// If and only if the wrapper contains a method or const method pointer, an
-// IsMethod typedef is exposed. The existence of this typedef (NOT the value)
-// marks that the wrapper should be considered a method wrapper.
-
-template <typename Functor>
-class RunnableAdapter;
-
-// Function: Arity 0.
-template <typename R>
-class RunnableAdapter<R(*)()> {
- public:
- typedef R (RunType)();
-
- explicit RunnableAdapter(R(*function)())
- : function_(function) {
- }
-
- R Run() {
- return function_();
- }
-
- private:
- R (*function_)();
-};
-
-// Method: Arity 0.
-template <typename R, typename T>
-class RunnableAdapter<R(T::*)()> {
- public:
- typedef R (RunType)(T*);
- typedef true_type IsMethod;
-
- explicit RunnableAdapter(R(T::*method)())
- : method_(method) {
- }
-
- R Run(T* object) {
- return (object->*method_)();
- }
-
- private:
- R (T::*method_)();
-};
-
-// Const Method: Arity 0.
-template <typename R, typename T>
-class RunnableAdapter<R(T::*)() const> {
- public:
- typedef R (RunType)(const T*);
- typedef true_type IsMethod;
-
- explicit RunnableAdapter(R(T::*method)() const)
- : method_(method) {
- }
-
- R Run(const T* object) {
- return (object->*method_)();
- }
-
- private:
- R (T::*method_)() const;
-};
-
-// Function: Arity 1.
-template <typename R, typename A1>
-class RunnableAdapter<R(*)(A1)> {
- public:
- typedef R (RunType)(A1);
-
- explicit RunnableAdapter(R(*function)(A1))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1) {
- return function_(CallbackForward(a1));
- }
-
- private:
- R (*function_)(A1);
-};
-
-// Method: Arity 1.
-template <typename R, typename T, typename A1>
-class RunnableAdapter<R(T::*)(A1)> {
- public:
- typedef R (RunType)(T*, A1);
- typedef true_type IsMethod;
-
- explicit RunnableAdapter(R(T::*method)(A1))
- : method_(method) {
- }
-
- R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1) {
- return (object->*method_)(CallbackForward(a1));
- }
-
- private:
- R (T::*method_)(A1);
-};
-
-// Const Method: Arity 1.
-template <typename R, typename T, typename A1>
-class RunnableAdapter<R(T::*)(A1) const> {
- public:
- typedef R (RunType)(const T*, A1);
- typedef true_type IsMethod;
-
- explicit RunnableAdapter(R(T::*method)(A1) const)
- : method_(method) {
- }
-
- R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1) {
- return (object->*method_)(CallbackForward(a1));
- }
-
- private:
- R (T::*method_)(A1) const;
-};
-
-// Function: Arity 2.
-template <typename R, typename A1, typename A2>
-class RunnableAdapter<R(*)(A1, A2)> {
- public:
- typedef R (RunType)(A1, A2);
-
- explicit RunnableAdapter(R(*function)(A1, A2))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2) {
- return function_(CallbackForward(a1), CallbackForward(a2));
- }
-
- private:
- R (*function_)(A1, A2);
-};
-
-// Method: Arity 2.
-template <typename R, typename T, typename A1, typename A2>
-class RunnableAdapter<R(T::*)(A1, A2)> {
- public:
- typedef R (RunType)(T*, A1, A2);
- typedef true_type IsMethod;
-
- explicit RunnableAdapter(R(T::*method)(A1, A2))
- : method_(method) {
- }
-
- R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2) {
- return (object->*method_)(CallbackForward(a1), CallbackForward(a2));
- }
-
- private:
- R (T::*method_)(A1, A2);
-};
-
-// Const Method: Arity 2.
-template <typename R, typename T, typename A1, typename A2>
-class RunnableAdapter<R(T::*)(A1, A2) const> {
- public:
- typedef R (RunType)(const T*, A1, A2);
- typedef true_type IsMethod;
-
- explicit RunnableAdapter(R(T::*method)(A1, A2) const)
- : method_(method) {
- }
-
- R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2) {
- return (object->*method_)(CallbackForward(a1), CallbackForward(a2));
- }
-
- private:
- R (T::*method_)(A1, A2) const;
-};
-
-// Function: Arity 3.
-template <typename R, typename A1, typename A2, typename A3>
-class RunnableAdapter<R(*)(A1, A2, A3)> {
- public:
- typedef R (RunType)(A1, A2, A3);
-
- explicit RunnableAdapter(R(*function)(A1, A2, A3))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3) {
- return function_(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3));
- }
-
- private:
- R (*function_)(A1, A2, A3);
-};
-
-// Method: Arity 3.
-template <typename R, typename T, typename A1, typename A2, typename A3>
-class RunnableAdapter<R(T::*)(A1, A2, A3)> {
- public:
- typedef R (RunType)(T*, A1, A2, A3);
- typedef true_type IsMethod;
-
- explicit RunnableAdapter(R(T::*method)(A1, A2, A3))
- : method_(method) {
- }
-
- R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3) {
- return (object->*method_)(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3));
- }
-
- private:
- R (T::*method_)(A1, A2, A3);
-};
-
-// Const Method: Arity 3.
-template <typename R, typename T, typename A1, typename A2, typename A3>
-class RunnableAdapter<R(T::*)(A1, A2, A3) const> {
- public:
- typedef R (RunType)(const T*, A1, A2, A3);
- typedef true_type IsMethod;
-
- explicit RunnableAdapter(R(T::*method)(A1, A2, A3) const)
- : method_(method) {
- }
-
- R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3) {
- return (object->*method_)(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3));
- }
-
- private:
- R (T::*method_)(A1, A2, A3) const;
-};
-
-// Function: Arity 4.
-template <typename R, typename A1, typename A2, typename A3, typename A4>
-class RunnableAdapter<R(*)(A1, A2, A3, A4)> {
- public:
- typedef R (RunType)(A1, A2, A3, A4);
-
- explicit RunnableAdapter(R(*function)(A1, A2, A3, A4))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4) {
- return function_(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3), CallbackForward(a4));
- }
-
- private:
- R (*function_)(A1, A2, A3, A4);
-};
-
-// Method: Arity 4.
-template <typename R, typename T, typename A1, typename A2, typename A3,
- typename A4>
-class RunnableAdapter<R(T::*)(A1, A2, A3, A4)> {
- public:
- typedef R (RunType)(T*, A1, A2, A3, A4);
- typedef true_type IsMethod;
-
- explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4))
- : method_(method) {
- }
-
- R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4) {
- return (object->*method_)(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3), CallbackForward(a4));
- }
-
- private:
- R (T::*method_)(A1, A2, A3, A4);
-};
-
-// Const Method: Arity 4.
-template <typename R, typename T, typename A1, typename A2, typename A3,
- typename A4>
-class RunnableAdapter<R(T::*)(A1, A2, A3, A4) const> {
- public:
- typedef R (RunType)(const T*, A1, A2, A3, A4);
- typedef true_type IsMethod;
-
- explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4) const)
- : method_(method) {
- }
-
- R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4) {
- return (object->*method_)(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3), CallbackForward(a4));
- }
-
- private:
- R (T::*method_)(A1, A2, A3, A4) const;
-};
-
-// Function: Arity 5.
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5>
-class RunnableAdapter<R(*)(A1, A2, A3, A4, A5)> {
- public:
- typedef R (RunType)(A1, A2, A3, A4, A5);
-
- explicit RunnableAdapter(R(*function)(A1, A2, A3, A4, A5))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4,
- typename CallbackParamTraits<A5>::ForwardType a5) {
- return function_(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3), CallbackForward(a4), CallbackForward(a5));
- }
-
- private:
- R (*function_)(A1, A2, A3, A4, A5);
-};
-
-// Method: Arity 5.
-template <typename R, typename T, typename A1, typename A2, typename A3,
- typename A4, typename A5>
-class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5)> {
- public:
- typedef R (RunType)(T*, A1, A2, A3, A4, A5);
- typedef true_type IsMethod;
-
- explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5))
- : method_(method) {
- }
-
- R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4,
- typename CallbackParamTraits<A5>::ForwardType a5) {
- return (object->*method_)(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3), CallbackForward(a4), CallbackForward(a5));
- }
-
- private:
- R (T::*method_)(A1, A2, A3, A4, A5);
-};
-
-// Const Method: Arity 5.
-template <typename R, typename T, typename A1, typename A2, typename A3,
- typename A4, typename A5>
-class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5) const> {
- public:
- typedef R (RunType)(const T*, A1, A2, A3, A4, A5);
- typedef true_type IsMethod;
-
- explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5) const)
- : method_(method) {
- }
-
- R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4,
- typename CallbackParamTraits<A5>::ForwardType a5) {
- return (object->*method_)(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3), CallbackForward(a4), CallbackForward(a5));
- }
-
- private:
- R (T::*method_)(A1, A2, A3, A4, A5) const;
-};
-
-// Function: Arity 6.
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6>
-class RunnableAdapter<R(*)(A1, A2, A3, A4, A5, A6)> {
- public:
- typedef R (RunType)(A1, A2, A3, A4, A5, A6);
-
- explicit RunnableAdapter(R(*function)(A1, A2, A3, A4, A5, A6))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4,
- typename CallbackParamTraits<A5>::ForwardType a5,
- typename CallbackParamTraits<A6>::ForwardType a6) {
- return function_(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3), CallbackForward(a4), CallbackForward(a5),
- CallbackForward(a6));
- }
-
- private:
- R (*function_)(A1, A2, A3, A4, A5, A6);
-};
-
-// Method: Arity 6.
-template <typename R, typename T, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6>
-class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6)> {
- public:
- typedef R (RunType)(T*, A1, A2, A3, A4, A5, A6);
- typedef true_type IsMethod;
-
- explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6))
- : method_(method) {
- }
-
- R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4,
- typename CallbackParamTraits<A5>::ForwardType a5,
- typename CallbackParamTraits<A6>::ForwardType a6) {
- return (object->*method_)(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3), CallbackForward(a4), CallbackForward(a5),
- CallbackForward(a6));
- }
-
- private:
- R (T::*method_)(A1, A2, A3, A4, A5, A6);
-};
-
-// Const Method: Arity 6.
-template <typename R, typename T, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6>
-class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6) const> {
- public:
- typedef R (RunType)(const T*, A1, A2, A3, A4, A5, A6);
- typedef true_type IsMethod;
-
- explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6) const)
- : method_(method) {
- }
-
- R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4,
- typename CallbackParamTraits<A5>::ForwardType a5,
- typename CallbackParamTraits<A6>::ForwardType a6) {
- return (object->*method_)(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3), CallbackForward(a4), CallbackForward(a5),
- CallbackForward(a6));
- }
-
- private:
- R (T::*method_)(A1, A2, A3, A4, A5, A6) const;
-};
-
-// Function: Arity 7.
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7>
-class RunnableAdapter<R(*)(A1, A2, A3, A4, A5, A6, A7)> {
- public:
- typedef R (RunType)(A1, A2, A3, A4, A5, A6, A7);
-
- explicit RunnableAdapter(R(*function)(A1, A2, A3, A4, A5, A6, A7))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4,
- typename CallbackParamTraits<A5>::ForwardType a5,
- typename CallbackParamTraits<A6>::ForwardType a6,
- typename CallbackParamTraits<A7>::ForwardType a7) {
- return function_(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3), CallbackForward(a4), CallbackForward(a5),
- CallbackForward(a6), CallbackForward(a7));
- }
-
- private:
- R (*function_)(A1, A2, A3, A4, A5, A6, A7);
-};
-
-// Method: Arity 7.
-template <typename R, typename T, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7>
-class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6, A7)> {
- public:
- typedef R (RunType)(T*, A1, A2, A3, A4, A5, A6, A7);
- typedef true_type IsMethod;
-
- explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6, A7))
- : method_(method) {
- }
-
- R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4,
- typename CallbackParamTraits<A5>::ForwardType a5,
- typename CallbackParamTraits<A6>::ForwardType a6,
- typename CallbackParamTraits<A7>::ForwardType a7) {
- return (object->*method_)(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3), CallbackForward(a4), CallbackForward(a5),
- CallbackForward(a6), CallbackForward(a7));
- }
-
- private:
- R (T::*method_)(A1, A2, A3, A4, A5, A6, A7);
-};
-
-// Const Method: Arity 7.
-template <typename R, typename T, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7>
-class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6, A7) const> {
- public:
- typedef R (RunType)(const T*, A1, A2, A3, A4, A5, A6, A7);
- typedef true_type IsMethod;
-
- explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6, A7) const)
- : method_(method) {
- }
-
- R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4,
- typename CallbackParamTraits<A5>::ForwardType a5,
- typename CallbackParamTraits<A6>::ForwardType a6,
- typename CallbackParamTraits<A7>::ForwardType a7) {
- return (object->*method_)(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3), CallbackForward(a4), CallbackForward(a5),
- CallbackForward(a6), CallbackForward(a7));
- }
-
- private:
- R (T::*method_)(A1, A2, A3, A4, A5, A6, A7) const;
-};
-
-
-// FunctionTraits<>
-//
-// Breaks a function signature apart into typedefs for easier introspection.
-template <typename Sig>
-struct FunctionTraits;
-
-template <typename R>
-struct FunctionTraits<R()> {
- typedef R ReturnType;
-};
-
-template <typename R, typename A1>
-struct FunctionTraits<R(A1)> {
- typedef R ReturnType;
- typedef A1 A1Type;
-};
-
-template <typename R, typename A1, typename A2>
-struct FunctionTraits<R(A1, A2)> {
- typedef R ReturnType;
- typedef A1 A1Type;
- typedef A2 A2Type;
-};
-
-template <typename R, typename A1, typename A2, typename A3>
-struct FunctionTraits<R(A1, A2, A3)> {
- typedef R ReturnType;
- typedef A1 A1Type;
- typedef A2 A2Type;
- typedef A3 A3Type;
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4>
-struct FunctionTraits<R(A1, A2, A3, A4)> {
- typedef R ReturnType;
- typedef A1 A1Type;
- typedef A2 A2Type;
- typedef A3 A3Type;
- typedef A4 A4Type;
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5>
-struct FunctionTraits<R(A1, A2, A3, A4, A5)> {
- typedef R ReturnType;
- typedef A1 A1Type;
- typedef A2 A2Type;
- typedef A3 A3Type;
- typedef A4 A4Type;
- typedef A5 A5Type;
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6>
-struct FunctionTraits<R(A1, A2, A3, A4, A5, A6)> {
- typedef R ReturnType;
- typedef A1 A1Type;
- typedef A2 A2Type;
- typedef A3 A3Type;
- typedef A4 A4Type;
- typedef A5 A5Type;
- typedef A6 A6Type;
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7>
-struct FunctionTraits<R(A1, A2, A3, A4, A5, A6, A7)> {
- typedef R ReturnType;
- typedef A1 A1Type;
- typedef A2 A2Type;
- typedef A3 A3Type;
- typedef A4 A4Type;
- typedef A5 A5Type;
- typedef A6 A6Type;
- typedef A7 A7Type;
-};
-
-
-// ForceVoidReturn<>
-//
-// Set of templates that support forcing the function return type to void.
-template <typename Sig>
-struct ForceVoidReturn;
-
-template <typename R>
-struct ForceVoidReturn<R()> {
- typedef void(RunType)();
-};
-
-template <typename R, typename A1>
-struct ForceVoidReturn<R(A1)> {
- typedef void(RunType)(A1);
-};
-
-template <typename R, typename A1, typename A2>
-struct ForceVoidReturn<R(A1, A2)> {
- typedef void(RunType)(A1, A2);
-};
-
-template <typename R, typename A1, typename A2, typename A3>
-struct ForceVoidReturn<R(A1, A2, A3)> {
- typedef void(RunType)(A1, A2, A3);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4>
-struct ForceVoidReturn<R(A1, A2, A3, A4)> {
- typedef void(RunType)(A1, A2, A3, A4);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5>
-struct ForceVoidReturn<R(A1, A2, A3, A4, A5)> {
- typedef void(RunType)(A1, A2, A3, A4, A5);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6>
-struct ForceVoidReturn<R(A1, A2, A3, A4, A5, A6)> {
- typedef void(RunType)(A1, A2, A3, A4, A5, A6);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7>
-struct ForceVoidReturn<R(A1, A2, A3, A4, A5, A6, A7)> {
- typedef void(RunType)(A1, A2, A3, A4, A5, A6, A7);
-};
-
-
-// FunctorTraits<>
-//
-// See description at top of file.
-template <typename T>
-struct FunctorTraits {
- typedef RunnableAdapter<T> RunnableType;
- typedef typename RunnableType::RunType RunType;
-};
-
-template <typename T>
-struct FunctorTraits<IgnoreResultHelper<T> > {
- typedef typename FunctorTraits<T>::RunnableType RunnableType;
- typedef typename ForceVoidReturn<
- typename RunnableType::RunType>::RunType RunType;
-};
-
-template <typename T>
-struct FunctorTraits<Callback<T> > {
- typedef Callback<T> RunnableType;
- typedef typename Callback<T>::RunType RunType;
-};
-
-
-// MakeRunnable<>
-//
-// Converts a passed in functor to a RunnableType using type inference.
-
-template <typename T>
-typename FunctorTraits<T>::RunnableType MakeRunnable(const T& t) {
- return RunnableAdapter<T>(t);
-}
-
-template <typename T>
-typename FunctorTraits<T>::RunnableType
-MakeRunnable(const IgnoreResultHelper<T>& t) {
- return MakeRunnable(t.functor_);
-}
-
-template <typename T>
-const typename FunctorTraits<Callback<T> >::RunnableType&
-MakeRunnable(const Callback<T>& t) {
- DCHECK(!t.is_null());
- return t;
-}
-
-
-// InvokeHelper<>
-//
-// There are 3 logical InvokeHelper<> specializations: normal, void-return,
-// WeakCalls.
-//
-// The normal type just calls the underlying runnable.
-//
-// We need a InvokeHelper to handle void return types in order to support
-// IgnoreResult(). Normally, if the Runnable's RunType had a void return,
-// the template system would just accept "return functor.Run()" ignoring
-// the fact that a void function is being used with return. This piece of
-// sugar breaks though when the Runnable's RunType is not void. Thus, we
-// need a partial specialization to change the syntax to drop the "return"
-// from the invocation call.
-//
-// WeakCalls similarly need special syntax that is applied to the first
-// argument to check if they should no-op themselves.
-template <bool IsWeakCall, typename ReturnType, typename Runnable,
- typename ArgsType>
-struct InvokeHelper;
-
-template <typename ReturnType, typename Runnable>
-struct InvokeHelper<false, ReturnType, Runnable,
- void()> {
- static ReturnType MakeItSo(Runnable runnable) {
- return runnable.Run();
- }
-};
-
-template <typename Runnable>
-struct InvokeHelper<false, void, Runnable,
- void()> {
- static void MakeItSo(Runnable runnable) {
- runnable.Run();
- }
-};
-
-template <typename ReturnType, typename Runnable,typename A1>
-struct InvokeHelper<false, ReturnType, Runnable,
- void(A1)> {
- static ReturnType MakeItSo(Runnable runnable, A1 a1) {
- return runnable.Run(CallbackForward(a1));
- }
-};
-
-template <typename Runnable,typename A1>
-struct InvokeHelper<false, void, Runnable,
- void(A1)> {
- static void MakeItSo(Runnable runnable, A1 a1) {
- runnable.Run(CallbackForward(a1));
- }
-};
-
-template <typename Runnable, typename BoundWeakPtr>
-struct InvokeHelper<true, void, Runnable,
- void(BoundWeakPtr)> {
- static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr) {
- if (!weak_ptr.get()) {
- return;
- }
- runnable.Run(weak_ptr.get());
- }
-};
-
-template <typename ReturnType, typename Runnable,typename A1, typename A2>
-struct InvokeHelper<false, ReturnType, Runnable,
- void(A1, A2)> {
- static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2) {
- return runnable.Run(CallbackForward(a1), CallbackForward(a2));
- }
-};
-
-template <typename Runnable,typename A1, typename A2>
-struct InvokeHelper<false, void, Runnable,
- void(A1, A2)> {
- static void MakeItSo(Runnable runnable, A1 a1, A2 a2) {
- runnable.Run(CallbackForward(a1), CallbackForward(a2));
- }
-};
-
-template <typename Runnable, typename BoundWeakPtr, typename A2>
-struct InvokeHelper<true, void, Runnable,
- void(BoundWeakPtr, A2)> {
- static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2) {
- if (!weak_ptr.get()) {
- return;
- }
- runnable.Run(weak_ptr.get(), CallbackForward(a2));
- }
-};
-
-template <typename ReturnType, typename Runnable,typename A1, typename A2,
- typename A3>
-struct InvokeHelper<false, ReturnType, Runnable,
- void(A1, A2, A3)> {
- static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3) {
- return runnable.Run(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3));
- }
-};
-
-template <typename Runnable,typename A1, typename A2, typename A3>
-struct InvokeHelper<false, void, Runnable,
- void(A1, A2, A3)> {
- static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3) {
- runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3));
- }
-};
-
-template <typename Runnable, typename BoundWeakPtr, typename A2, typename A3>
-struct InvokeHelper<true, void, Runnable,
- void(BoundWeakPtr, A2, A3)> {
- static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2, A3 a3) {
- if (!weak_ptr.get()) {
- return;
- }
- runnable.Run(weak_ptr.get(), CallbackForward(a2), CallbackForward(a3));
- }
-};
-
-template <typename ReturnType, typename Runnable,typename A1, typename A2,
- typename A3, typename A4>
-struct InvokeHelper<false, ReturnType, Runnable,
- void(A1, A2, A3, A4)> {
- static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4) {
- return runnable.Run(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3), CallbackForward(a4));
- }
-};
-
-template <typename Runnable,typename A1, typename A2, typename A3, typename A4>
-struct InvokeHelper<false, void, Runnable,
- void(A1, A2, A3, A4)> {
- static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4) {
- runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3),
- CallbackForward(a4));
- }
-};
-
-template <typename Runnable, typename BoundWeakPtr, typename A2, typename A3,
- typename A4>
-struct InvokeHelper<true, void, Runnable,
- void(BoundWeakPtr, A2, A3, A4)> {
- static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2, A3 a3,
- A4 a4) {
- if (!weak_ptr.get()) {
- return;
- }
- runnable.Run(weak_ptr.get(), CallbackForward(a2), CallbackForward(a3),
- CallbackForward(a4));
- }
-};
-
-template <typename ReturnType, typename Runnable,typename A1, typename A2,
- typename A3, typename A4, typename A5>
-struct InvokeHelper<false, ReturnType, Runnable,
- void(A1, A2, A3, A4, A5)> {
- static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4,
- A5 a5) {
- return runnable.Run(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3), CallbackForward(a4), CallbackForward(a5));
- }
-};
-
-template <typename Runnable,typename A1, typename A2, typename A3, typename A4,
- typename A5>
-struct InvokeHelper<false, void, Runnable,
- void(A1, A2, A3, A4, A5)> {
- static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {
- runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3),
- CallbackForward(a4), CallbackForward(a5));
- }
-};
-
-template <typename Runnable, typename BoundWeakPtr, typename A2, typename A3,
- typename A4, typename A5>
-struct InvokeHelper<true, void, Runnable,
- void(BoundWeakPtr, A2, A3, A4, A5)> {
- static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2, A3 a3,
- A4 a4, A5 a5) {
- if (!weak_ptr.get()) {
- return;
- }
- runnable.Run(weak_ptr.get(), CallbackForward(a2), CallbackForward(a3),
- CallbackForward(a4), CallbackForward(a5));
- }
-};
-
-template <typename ReturnType, typename Runnable,typename A1, typename A2,
- typename A3, typename A4, typename A5, typename A6>
-struct InvokeHelper<false, ReturnType, Runnable,
- void(A1, A2, A3, A4, A5, A6)> {
- static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4,
- A5 a5, A6 a6) {
- return runnable.Run(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3), CallbackForward(a4), CallbackForward(a5),
- CallbackForward(a6));
- }
-};
-
-template <typename Runnable,typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6>
-struct InvokeHelper<false, void, Runnable,
- void(A1, A2, A3, A4, A5, A6)> {
- static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5,
- A6 a6) {
- runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3),
- CallbackForward(a4), CallbackForward(a5), CallbackForward(a6));
- }
-};
-
-template <typename Runnable, typename BoundWeakPtr, typename A2, typename A3,
- typename A4, typename A5, typename A6>
-struct InvokeHelper<true, void, Runnable,
- void(BoundWeakPtr, A2, A3, A4, A5, A6)> {
- static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2, A3 a3,
- A4 a4, A5 a5, A6 a6) {
- if (!weak_ptr.get()) {
- return;
- }
- runnable.Run(weak_ptr.get(), CallbackForward(a2), CallbackForward(a3),
- CallbackForward(a4), CallbackForward(a5), CallbackForward(a6));
- }
-};
-
-template <typename ReturnType, typename Runnable,typename A1, typename A2,
- typename A3, typename A4, typename A5, typename A6, typename A7>
-struct InvokeHelper<false, ReturnType, Runnable,
- void(A1, A2, A3, A4, A5, A6, A7)> {
- static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4,
- A5 a5, A6 a6, A7 a7) {
- return runnable.Run(CallbackForward(a1), CallbackForward(a2),
- CallbackForward(a3), CallbackForward(a4), CallbackForward(a5),
- CallbackForward(a6), CallbackForward(a7));
- }
-};
-
-template <typename Runnable,typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7>
-struct InvokeHelper<false, void, Runnable,
- void(A1, A2, A3, A4, A5, A6, A7)> {
- static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5,
- A6 a6, A7 a7) {
- runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3),
- CallbackForward(a4), CallbackForward(a5), CallbackForward(a6),
- CallbackForward(a7));
- }
-};
-
-template <typename Runnable, typename BoundWeakPtr, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7>
-struct InvokeHelper<true, void, Runnable,
- void(BoundWeakPtr, A2, A3, A4, A5, A6, A7)> {
- static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2, A3 a3,
- A4 a4, A5 a5, A6 a6, A7 a7) {
- if (!weak_ptr.get()) {
- return;
- }
- runnable.Run(weak_ptr.get(), CallbackForward(a2), CallbackForward(a3),
- CallbackForward(a4), CallbackForward(a5), CallbackForward(a6),
- CallbackForward(a7));
- }
-};
-
-#if !defined(_MSC_VER)
-
-template <typename ReturnType, typename Runnable, typename ArgsType>
-struct InvokeHelper<true, ReturnType, Runnable, ArgsType> {
- // WeakCalls are only supported for functions with a void return type.
- // Otherwise, the function result would be undefined if the the WeakPtr<>
- // is invalidated.
- COMPILE_ASSERT(is_void<ReturnType>::value,
- weak_ptrs_can_only_bind_to_methods_without_return_values);
-};
-
-#endif
-
-// Invoker<>
-//
-// See description at the top of the file.
-template <int NumBound, typename Storage, typename RunType>
-struct Invoker;
-
-// Arity 0 -> 0.
-template <typename StorageType, typename R>
-struct Invoker<0, StorageType, R()> {
- typedef R(RunType)(BindStateBase*);
-
- typedef R(UnboundRunType)();
-
- static R Run(BindStateBase* base) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
-
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void()>
- ::MakeItSo(storage->runnable_);
- }
-};
-
-// Arity 1 -> 1.
-template <typename StorageType, typename R,typename X1>
-struct Invoker<0, StorageType, R(X1)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X1>::ForwardType);
-
- typedef R(UnboundRunType)(X1);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X1>::ForwardType x1) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
-
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename CallbackParamTraits<X1>::ForwardType x1)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1));
- }
-};
-
-// Arity 1 -> 0.
-template <typename StorageType, typename R,typename X1>
-struct Invoker<1, StorageType, R(X1)> {
- typedef R(RunType)(BindStateBase*);
-
- typedef R(UnboundRunType)();
-
- static R Run(BindStateBase* base) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1));
- }
-};
-
-// Arity 2 -> 2.
-template <typename StorageType, typename R,typename X1, typename X2>
-struct Invoker<0, StorageType, R(X1, X2)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X1>::ForwardType,
- typename CallbackParamTraits<X2>::ForwardType);
-
- typedef R(UnboundRunType)(X1, X2);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X1>::ForwardType x1,
- typename CallbackParamTraits<X2>::ForwardType x2) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
-
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename CallbackParamTraits<X1>::ForwardType x1,
- typename CallbackParamTraits<X2>::ForwardType x2)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2));
- }
-};
-
-// Arity 2 -> 1.
-template <typename StorageType, typename R,typename X1, typename X2>
-struct Invoker<1, StorageType, R(X1, X2)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X2>::ForwardType);
-
- typedef R(UnboundRunType)(X2);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X2>::ForwardType x2) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X2>::ForwardType x2)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2));
- }
-};
-
-// Arity 2 -> 0.
-template <typename StorageType, typename R,typename X1, typename X2>
-struct Invoker<2, StorageType, R(X1, X2)> {
- typedef R(RunType)(BindStateBase*);
-
- typedef R(UnboundRunType)();
-
- static R Run(BindStateBase* base) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2));
- }
-};
-
-// Arity 3 -> 3.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3>
-struct Invoker<0, StorageType, R(X1, X2, X3)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X1>::ForwardType,
- typename CallbackParamTraits<X2>::ForwardType,
- typename CallbackParamTraits<X3>::ForwardType);
-
- typedef R(UnboundRunType)(X1, X2, X3);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X1>::ForwardType x1,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
-
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename CallbackParamTraits<X1>::ForwardType x1,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3));
- }
-};
-
-// Arity 3 -> 2.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3>
-struct Invoker<1, StorageType, R(X1, X2, X3)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X2>::ForwardType,
- typename CallbackParamTraits<X3>::ForwardType);
-
- typedef R(UnboundRunType)(X2, X3);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3));
- }
-};
-
-// Arity 3 -> 1.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3>
-struct Invoker<2, StorageType, R(X1, X2, X3)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X3>::ForwardType);
-
- typedef R(UnboundRunType)(X3);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X3>::ForwardType x3) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X3>::ForwardType x3)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3));
- }
-};
-
-// Arity 3 -> 0.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3>
-struct Invoker<3, StorageType, R(X1, X2, X3)> {
- typedef R(RunType)(BindStateBase*);
-
- typedef R(UnboundRunType)();
-
- static R Run(BindStateBase* base) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
- typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- typename Bound3UnwrapTraits::ForwardType x3 =
- Bound3UnwrapTraits::Unwrap(storage->p3_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename Bound3UnwrapTraits::ForwardType)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3));
- }
-};
-
-// Arity 4 -> 4.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4>
-struct Invoker<0, StorageType, R(X1, X2, X3, X4)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X1>::ForwardType,
- typename CallbackParamTraits<X2>::ForwardType,
- typename CallbackParamTraits<X3>::ForwardType,
- typename CallbackParamTraits<X4>::ForwardType);
-
- typedef R(UnboundRunType)(X1, X2, X3, X4);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X1>::ForwardType x1,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
-
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename CallbackParamTraits<X1>::ForwardType x1,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4));
- }
-};
-
-// Arity 4 -> 3.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4>
-struct Invoker<1, StorageType, R(X1, X2, X3, X4)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X2>::ForwardType,
- typename CallbackParamTraits<X3>::ForwardType,
- typename CallbackParamTraits<X4>::ForwardType);
-
- typedef R(UnboundRunType)(X2, X3, X4);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4));
- }
-};
-
-// Arity 4 -> 2.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4>
-struct Invoker<2, StorageType, R(X1, X2, X3, X4)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X3>::ForwardType,
- typename CallbackParamTraits<X4>::ForwardType);
-
- typedef R(UnboundRunType)(X3, X4);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4));
- }
-};
-
-// Arity 4 -> 1.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4>
-struct Invoker<3, StorageType, R(X1, X2, X3, X4)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X4>::ForwardType);
-
- typedef R(UnboundRunType)(X4);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X4>::ForwardType x4) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
- typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- typename Bound3UnwrapTraits::ForwardType x3 =
- Bound3UnwrapTraits::Unwrap(storage->p3_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename Bound3UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X4>::ForwardType x4)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4));
- }
-};
-
-// Arity 4 -> 0.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4>
-struct Invoker<4, StorageType, R(X1, X2, X3, X4)> {
- typedef R(RunType)(BindStateBase*);
-
- typedef R(UnboundRunType)();
-
- static R Run(BindStateBase* base) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
- typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;
- typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- typename Bound3UnwrapTraits::ForwardType x3 =
- Bound3UnwrapTraits::Unwrap(storage->p3_);
- typename Bound4UnwrapTraits::ForwardType x4 =
- Bound4UnwrapTraits::Unwrap(storage->p4_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename Bound3UnwrapTraits::ForwardType,
- typename Bound4UnwrapTraits::ForwardType)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4));
- }
-};
-
-// Arity 5 -> 5.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5>
-struct Invoker<0, StorageType, R(X1, X2, X3, X4, X5)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X1>::ForwardType,
- typename CallbackParamTraits<X2>::ForwardType,
- typename CallbackParamTraits<X3>::ForwardType,
- typename CallbackParamTraits<X4>::ForwardType,
- typename CallbackParamTraits<X5>::ForwardType);
-
- typedef R(UnboundRunType)(X1, X2, X3, X4, X5);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X1>::ForwardType x1,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
-
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename CallbackParamTraits<X1>::ForwardType x1,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5));
- }
-};
-
-// Arity 5 -> 4.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5>
-struct Invoker<1, StorageType, R(X1, X2, X3, X4, X5)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X2>::ForwardType,
- typename CallbackParamTraits<X3>::ForwardType,
- typename CallbackParamTraits<X4>::ForwardType,
- typename CallbackParamTraits<X5>::ForwardType);
-
- typedef R(UnboundRunType)(X2, X3, X4, X5);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5));
- }
-};
-
-// Arity 5 -> 3.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5>
-struct Invoker<2, StorageType, R(X1, X2, X3, X4, X5)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X3>::ForwardType,
- typename CallbackParamTraits<X4>::ForwardType,
- typename CallbackParamTraits<X5>::ForwardType);
-
- typedef R(UnboundRunType)(X3, X4, X5);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5));
- }
-};
-
-// Arity 5 -> 2.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5>
-struct Invoker<3, StorageType, R(X1, X2, X3, X4, X5)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X4>::ForwardType,
- typename CallbackParamTraits<X5>::ForwardType);
-
- typedef R(UnboundRunType)(X4, X5);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
- typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- typename Bound3UnwrapTraits::ForwardType x3 =
- Bound3UnwrapTraits::Unwrap(storage->p3_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename Bound3UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5));
- }
-};
-
-// Arity 5 -> 1.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5>
-struct Invoker<4, StorageType, R(X1, X2, X3, X4, X5)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X5>::ForwardType);
-
- typedef R(UnboundRunType)(X5);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X5>::ForwardType x5) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
- typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;
- typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- typename Bound3UnwrapTraits::ForwardType x3 =
- Bound3UnwrapTraits::Unwrap(storage->p3_);
- typename Bound4UnwrapTraits::ForwardType x4 =
- Bound4UnwrapTraits::Unwrap(storage->p4_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename Bound3UnwrapTraits::ForwardType,
- typename Bound4UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X5>::ForwardType x5)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5));
- }
-};
-
-// Arity 5 -> 0.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5>
-struct Invoker<5, StorageType, R(X1, X2, X3, X4, X5)> {
- typedef R(RunType)(BindStateBase*);
-
- typedef R(UnboundRunType)();
-
- static R Run(BindStateBase* base) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
- typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;
- typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;
- typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- typename Bound3UnwrapTraits::ForwardType x3 =
- Bound3UnwrapTraits::Unwrap(storage->p3_);
- typename Bound4UnwrapTraits::ForwardType x4 =
- Bound4UnwrapTraits::Unwrap(storage->p4_);
- typename Bound5UnwrapTraits::ForwardType x5 =
- Bound5UnwrapTraits::Unwrap(storage->p5_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename Bound3UnwrapTraits::ForwardType,
- typename Bound4UnwrapTraits::ForwardType,
- typename Bound5UnwrapTraits::ForwardType)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5));
- }
-};
-
-// Arity 6 -> 6.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5, typename X6>
-struct Invoker<0, StorageType, R(X1, X2, X3, X4, X5, X6)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X1>::ForwardType,
- typename CallbackParamTraits<X2>::ForwardType,
- typename CallbackParamTraits<X3>::ForwardType,
- typename CallbackParamTraits<X4>::ForwardType,
- typename CallbackParamTraits<X5>::ForwardType,
- typename CallbackParamTraits<X6>::ForwardType);
-
- typedef R(UnboundRunType)(X1, X2, X3, X4, X5, X6);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X1>::ForwardType x1,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
-
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename CallbackParamTraits<X1>::ForwardType x1,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5),
- CallbackForward(x6));
- }
-};
-
-// Arity 6 -> 5.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5, typename X6>
-struct Invoker<1, StorageType, R(X1, X2, X3, X4, X5, X6)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X2>::ForwardType,
- typename CallbackParamTraits<X3>::ForwardType,
- typename CallbackParamTraits<X4>::ForwardType,
- typename CallbackParamTraits<X5>::ForwardType,
- typename CallbackParamTraits<X6>::ForwardType);
-
- typedef R(UnboundRunType)(X2, X3, X4, X5, X6);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5),
- CallbackForward(x6));
- }
-};
-
-// Arity 6 -> 4.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5, typename X6>
-struct Invoker<2, StorageType, R(X1, X2, X3, X4, X5, X6)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X3>::ForwardType,
- typename CallbackParamTraits<X4>::ForwardType,
- typename CallbackParamTraits<X5>::ForwardType,
- typename CallbackParamTraits<X6>::ForwardType);
-
- typedef R(UnboundRunType)(X3, X4, X5, X6);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5),
- CallbackForward(x6));
- }
-};
-
-// Arity 6 -> 3.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5, typename X6>
-struct Invoker<3, StorageType, R(X1, X2, X3, X4, X5, X6)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X4>::ForwardType,
- typename CallbackParamTraits<X5>::ForwardType,
- typename CallbackParamTraits<X6>::ForwardType);
-
- typedef R(UnboundRunType)(X4, X5, X6);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
- typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- typename Bound3UnwrapTraits::ForwardType x3 =
- Bound3UnwrapTraits::Unwrap(storage->p3_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename Bound3UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5),
- CallbackForward(x6));
- }
-};
-
-// Arity 6 -> 2.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5, typename X6>
-struct Invoker<4, StorageType, R(X1, X2, X3, X4, X5, X6)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X5>::ForwardType,
- typename CallbackParamTraits<X6>::ForwardType);
-
- typedef R(UnboundRunType)(X5, X6);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
- typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;
- typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- typename Bound3UnwrapTraits::ForwardType x3 =
- Bound3UnwrapTraits::Unwrap(storage->p3_);
- typename Bound4UnwrapTraits::ForwardType x4 =
- Bound4UnwrapTraits::Unwrap(storage->p4_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename Bound3UnwrapTraits::ForwardType,
- typename Bound4UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5),
- CallbackForward(x6));
- }
-};
-
-// Arity 6 -> 1.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5, typename X6>
-struct Invoker<5, StorageType, R(X1, X2, X3, X4, X5, X6)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X6>::ForwardType);
-
- typedef R(UnboundRunType)(X6);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X6>::ForwardType x6) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
- typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;
- typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;
- typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- typename Bound3UnwrapTraits::ForwardType x3 =
- Bound3UnwrapTraits::Unwrap(storage->p3_);
- typename Bound4UnwrapTraits::ForwardType x4 =
- Bound4UnwrapTraits::Unwrap(storage->p4_);
- typename Bound5UnwrapTraits::ForwardType x5 =
- Bound5UnwrapTraits::Unwrap(storage->p5_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename Bound3UnwrapTraits::ForwardType,
- typename Bound4UnwrapTraits::ForwardType,
- typename Bound5UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X6>::ForwardType x6)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5),
- CallbackForward(x6));
- }
-};
-
-// Arity 6 -> 0.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5, typename X6>
-struct Invoker<6, StorageType, R(X1, X2, X3, X4, X5, X6)> {
- typedef R(RunType)(BindStateBase*);
-
- typedef R(UnboundRunType)();
-
- static R Run(BindStateBase* base) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
- typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;
- typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;
- typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits;
- typedef typename StorageType::Bound6UnwrapTraits Bound6UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- typename Bound3UnwrapTraits::ForwardType x3 =
- Bound3UnwrapTraits::Unwrap(storage->p3_);
- typename Bound4UnwrapTraits::ForwardType x4 =
- Bound4UnwrapTraits::Unwrap(storage->p4_);
- typename Bound5UnwrapTraits::ForwardType x5 =
- Bound5UnwrapTraits::Unwrap(storage->p5_);
- typename Bound6UnwrapTraits::ForwardType x6 =
- Bound6UnwrapTraits::Unwrap(storage->p6_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename Bound3UnwrapTraits::ForwardType,
- typename Bound4UnwrapTraits::ForwardType,
- typename Bound5UnwrapTraits::ForwardType,
- typename Bound6UnwrapTraits::ForwardType)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5),
- CallbackForward(x6));
- }
-};
-
-// Arity 7 -> 7.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5, typename X6, typename X7>
-struct Invoker<0, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X1>::ForwardType,
- typename CallbackParamTraits<X2>::ForwardType,
- typename CallbackParamTraits<X3>::ForwardType,
- typename CallbackParamTraits<X4>::ForwardType,
- typename CallbackParamTraits<X5>::ForwardType,
- typename CallbackParamTraits<X6>::ForwardType,
- typename CallbackParamTraits<X7>::ForwardType);
-
- typedef R(UnboundRunType)(X1, X2, X3, X4, X5, X6, X7);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X1>::ForwardType x1,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6,
- typename CallbackParamTraits<X7>::ForwardType x7) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
-
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename CallbackParamTraits<X1>::ForwardType x1,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6,
- typename CallbackParamTraits<X7>::ForwardType x7)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5),
- CallbackForward(x6), CallbackForward(x7));
- }
-};
-
-// Arity 7 -> 6.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5, typename X6, typename X7>
-struct Invoker<1, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X2>::ForwardType,
- typename CallbackParamTraits<X3>::ForwardType,
- typename CallbackParamTraits<X4>::ForwardType,
- typename CallbackParamTraits<X5>::ForwardType,
- typename CallbackParamTraits<X6>::ForwardType,
- typename CallbackParamTraits<X7>::ForwardType);
-
- typedef R(UnboundRunType)(X2, X3, X4, X5, X6, X7);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6,
- typename CallbackParamTraits<X7>::ForwardType x7) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X2>::ForwardType x2,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6,
- typename CallbackParamTraits<X7>::ForwardType x7)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5),
- CallbackForward(x6), CallbackForward(x7));
- }
-};
-
-// Arity 7 -> 5.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5, typename X6, typename X7>
-struct Invoker<2, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X3>::ForwardType,
- typename CallbackParamTraits<X4>::ForwardType,
- typename CallbackParamTraits<X5>::ForwardType,
- typename CallbackParamTraits<X6>::ForwardType,
- typename CallbackParamTraits<X7>::ForwardType);
-
- typedef R(UnboundRunType)(X3, X4, X5, X6, X7);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6,
- typename CallbackParamTraits<X7>::ForwardType x7) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X3>::ForwardType x3,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6,
- typename CallbackParamTraits<X7>::ForwardType x7)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5),
- CallbackForward(x6), CallbackForward(x7));
- }
-};
-
-// Arity 7 -> 4.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5, typename X6, typename X7>
-struct Invoker<3, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X4>::ForwardType,
- typename CallbackParamTraits<X5>::ForwardType,
- typename CallbackParamTraits<X6>::ForwardType,
- typename CallbackParamTraits<X7>::ForwardType);
-
- typedef R(UnboundRunType)(X4, X5, X6, X7);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6,
- typename CallbackParamTraits<X7>::ForwardType x7) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
- typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- typename Bound3UnwrapTraits::ForwardType x3 =
- Bound3UnwrapTraits::Unwrap(storage->p3_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename Bound3UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X4>::ForwardType x4,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6,
- typename CallbackParamTraits<X7>::ForwardType x7)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5),
- CallbackForward(x6), CallbackForward(x7));
- }
-};
-
-// Arity 7 -> 3.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5, typename X6, typename X7>
-struct Invoker<4, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X5>::ForwardType,
- typename CallbackParamTraits<X6>::ForwardType,
- typename CallbackParamTraits<X7>::ForwardType);
-
- typedef R(UnboundRunType)(X5, X6, X7);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6,
- typename CallbackParamTraits<X7>::ForwardType x7) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
- typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;
- typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- typename Bound3UnwrapTraits::ForwardType x3 =
- Bound3UnwrapTraits::Unwrap(storage->p3_);
- typename Bound4UnwrapTraits::ForwardType x4 =
- Bound4UnwrapTraits::Unwrap(storage->p4_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename Bound3UnwrapTraits::ForwardType,
- typename Bound4UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X5>::ForwardType x5,
- typename CallbackParamTraits<X6>::ForwardType x6,
- typename CallbackParamTraits<X7>::ForwardType x7)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5),
- CallbackForward(x6), CallbackForward(x7));
- }
-};
-
-// Arity 7 -> 2.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5, typename X6, typename X7>
-struct Invoker<5, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X6>::ForwardType,
- typename CallbackParamTraits<X7>::ForwardType);
-
- typedef R(UnboundRunType)(X6, X7);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X6>::ForwardType x6,
- typename CallbackParamTraits<X7>::ForwardType x7) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
- typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;
- typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;
- typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- typename Bound3UnwrapTraits::ForwardType x3 =
- Bound3UnwrapTraits::Unwrap(storage->p3_);
- typename Bound4UnwrapTraits::ForwardType x4 =
- Bound4UnwrapTraits::Unwrap(storage->p4_);
- typename Bound5UnwrapTraits::ForwardType x5 =
- Bound5UnwrapTraits::Unwrap(storage->p5_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename Bound3UnwrapTraits::ForwardType,
- typename Bound4UnwrapTraits::ForwardType,
- typename Bound5UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X6>::ForwardType x6,
- typename CallbackParamTraits<X7>::ForwardType x7)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5),
- CallbackForward(x6), CallbackForward(x7));
- }
-};
-
-// Arity 7 -> 1.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5, typename X6, typename X7>
-struct Invoker<6, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> {
- typedef R(RunType)(BindStateBase*,
- typename CallbackParamTraits<X7>::ForwardType);
-
- typedef R(UnboundRunType)(X7);
-
- static R Run(BindStateBase* base,
- typename CallbackParamTraits<X7>::ForwardType x7) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
- typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;
- typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;
- typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits;
- typedef typename StorageType::Bound6UnwrapTraits Bound6UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- typename Bound3UnwrapTraits::ForwardType x3 =
- Bound3UnwrapTraits::Unwrap(storage->p3_);
- typename Bound4UnwrapTraits::ForwardType x4 =
- Bound4UnwrapTraits::Unwrap(storage->p4_);
- typename Bound5UnwrapTraits::ForwardType x5 =
- Bound5UnwrapTraits::Unwrap(storage->p5_);
- typename Bound6UnwrapTraits::ForwardType x6 =
- Bound6UnwrapTraits::Unwrap(storage->p6_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename Bound3UnwrapTraits::ForwardType,
- typename Bound4UnwrapTraits::ForwardType,
- typename Bound5UnwrapTraits::ForwardType,
- typename Bound6UnwrapTraits::ForwardType,
- typename CallbackParamTraits<X7>::ForwardType x7)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5),
- CallbackForward(x6), CallbackForward(x7));
- }
-};
-
-// Arity 7 -> 0.
-template <typename StorageType, typename R,typename X1, typename X2,
- typename X3, typename X4, typename X5, typename X6, typename X7>
-struct Invoker<7, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> {
- typedef R(RunType)(BindStateBase*);
-
- typedef R(UnboundRunType)();
-
- static R Run(BindStateBase* base) {
- StorageType* storage = static_cast<StorageType*>(base);
-
- // Local references to make debugger stepping easier. If in a debugger,
- // you really want to warp ahead and step through the
- // InvokeHelper<>::MakeItSo() call below.
- typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits;
- typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits;
- typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits;
- typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits;
- typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits;
- typedef typename StorageType::Bound6UnwrapTraits Bound6UnwrapTraits;
- typedef typename StorageType::Bound7UnwrapTraits Bound7UnwrapTraits;
-
- typename Bound1UnwrapTraits::ForwardType x1 =
- Bound1UnwrapTraits::Unwrap(storage->p1_);
- typename Bound2UnwrapTraits::ForwardType x2 =
- Bound2UnwrapTraits::Unwrap(storage->p2_);
- typename Bound3UnwrapTraits::ForwardType x3 =
- Bound3UnwrapTraits::Unwrap(storage->p3_);
- typename Bound4UnwrapTraits::ForwardType x4 =
- Bound4UnwrapTraits::Unwrap(storage->p4_);
- typename Bound5UnwrapTraits::ForwardType x5 =
- Bound5UnwrapTraits::Unwrap(storage->p5_);
- typename Bound6UnwrapTraits::ForwardType x6 =
- Bound6UnwrapTraits::Unwrap(storage->p6_);
- typename Bound7UnwrapTraits::ForwardType x7 =
- Bound7UnwrapTraits::Unwrap(storage->p7_);
- return InvokeHelper<StorageType::IsWeakCall::value, R,
- typename StorageType::RunnableType,
- void(typename Bound1UnwrapTraits::ForwardType,
- typename Bound2UnwrapTraits::ForwardType,
- typename Bound3UnwrapTraits::ForwardType,
- typename Bound4UnwrapTraits::ForwardType,
- typename Bound5UnwrapTraits::ForwardType,
- typename Bound6UnwrapTraits::ForwardType,
- typename Bound7UnwrapTraits::ForwardType)>
- ::MakeItSo(storage->runnable_, CallbackForward(x1),
- CallbackForward(x2), CallbackForward(x3),
- CallbackForward(x4), CallbackForward(x5),
- CallbackForward(x6), CallbackForward(x7));
- }
-};
-
-
-// BindState<>
-//
-// This stores all the state passed into Bind() and is also where most
-// of the template resolution magic occurs.
-//
-// Runnable is the functor we are binding arguments to.
-// RunType is type of the Run() function that the Invoker<> should use.
-// Normally, this is the same as the RunType of the Runnable, but it can
-// be different if an adapter like IgnoreResult() has been used.
-//
-// BoundArgsType contains the storage type for all the bound arguments by
-// (ab)using a function type.
-template <typename Runnable, typename RunType, typename BoundArgsType>
-struct BindState;
-
-template <typename Runnable, typename RunType>
-struct BindState<Runnable, RunType, void()> : public BindStateBase {
- typedef Runnable RunnableType;
- typedef false_type IsWeakCall;
- typedef Invoker<0, BindState, RunType> InvokerType;
- typedef typename InvokerType::UnboundRunType UnboundRunType;
- explicit BindState(const Runnable& runnable)
- : runnable_(runnable) {
- }
-
- virtual ~BindState() { }
-
- RunnableType runnable_;
-};
-
-template <typename Runnable, typename RunType, typename P1>
-struct BindState<Runnable, RunType, void(P1)> : public BindStateBase {
- typedef Runnable RunnableType;
- typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
- typedef Invoker<1, BindState, RunType> InvokerType;
- typedef typename InvokerType::UnboundRunType UnboundRunType;
-
- // Convenience typedefs for bound argument types.
- typedef UnwrapTraits<P1> Bound1UnwrapTraits;
-
- BindState(const Runnable& runnable, const P1& p1)
- : runnable_(runnable),
- p1_(p1) {
- MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
- }
-
- virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
- P1>::Release(p1_); }
-
- RunnableType runnable_;
- P1 p1_;
-};
-
-template <typename Runnable, typename RunType, typename P1, typename P2>
-struct BindState<Runnable, RunType, void(P1, P2)> : public BindStateBase {
- typedef Runnable RunnableType;
- typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
- typedef Invoker<2, BindState, RunType> InvokerType;
- typedef typename InvokerType::UnboundRunType UnboundRunType;
-
- // Convenience typedefs for bound argument types.
- typedef UnwrapTraits<P1> Bound1UnwrapTraits;
- typedef UnwrapTraits<P2> Bound2UnwrapTraits;
-
- BindState(const Runnable& runnable, const P1& p1, const P2& p2)
- : runnable_(runnable),
- p1_(p1),
- p2_(p2) {
- MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
- }
-
- virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
- P1>::Release(p1_); }
-
- RunnableType runnable_;
- P1 p1_;
- P2 p2_;
-};
-
-template <typename Runnable, typename RunType, typename P1, typename P2,
- typename P3>
-struct BindState<Runnable, RunType, void(P1, P2, P3)> : public BindStateBase {
- typedef Runnable RunnableType;
- typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
- typedef Invoker<3, BindState, RunType> InvokerType;
- typedef typename InvokerType::UnboundRunType UnboundRunType;
-
- // Convenience typedefs for bound argument types.
- typedef UnwrapTraits<P1> Bound1UnwrapTraits;
- typedef UnwrapTraits<P2> Bound2UnwrapTraits;
- typedef UnwrapTraits<P3> Bound3UnwrapTraits;
-
- BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3)
- : runnable_(runnable),
- p1_(p1),
- p2_(p2),
- p3_(p3) {
- MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
- }
-
- virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
- P1>::Release(p1_); }
-
- RunnableType runnable_;
- P1 p1_;
- P2 p2_;
- P3 p3_;
-};
-
-template <typename Runnable, typename RunType, typename P1, typename P2,
- typename P3, typename P4>
-struct BindState<Runnable, RunType, void(P1, P2, P3,
- P4)> : public BindStateBase {
- typedef Runnable RunnableType;
- typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
- typedef Invoker<4, BindState, RunType> InvokerType;
- typedef typename InvokerType::UnboundRunType UnboundRunType;
-
- // Convenience typedefs for bound argument types.
- typedef UnwrapTraits<P1> Bound1UnwrapTraits;
- typedef UnwrapTraits<P2> Bound2UnwrapTraits;
- typedef UnwrapTraits<P3> Bound3UnwrapTraits;
- typedef UnwrapTraits<P4> Bound4UnwrapTraits;
-
- BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3,
- const P4& p4)
- : runnable_(runnable),
- p1_(p1),
- p2_(p2),
- p3_(p3),
- p4_(p4) {
- MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
- }
-
- virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
- P1>::Release(p1_); }
-
- RunnableType runnable_;
- P1 p1_;
- P2 p2_;
- P3 p3_;
- P4 p4_;
-};
-
-template <typename Runnable, typename RunType, typename P1, typename P2,
- typename P3, typename P4, typename P5>
-struct BindState<Runnable, RunType, void(P1, P2, P3, P4,
- P5)> : public BindStateBase {
- typedef Runnable RunnableType;
- typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
- typedef Invoker<5, BindState, RunType> InvokerType;
- typedef typename InvokerType::UnboundRunType UnboundRunType;
-
- // Convenience typedefs for bound argument types.
- typedef UnwrapTraits<P1> Bound1UnwrapTraits;
- typedef UnwrapTraits<P2> Bound2UnwrapTraits;
- typedef UnwrapTraits<P3> Bound3UnwrapTraits;
- typedef UnwrapTraits<P4> Bound4UnwrapTraits;
- typedef UnwrapTraits<P5> Bound5UnwrapTraits;
-
- BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3,
- const P4& p4, const P5& p5)
- : runnable_(runnable),
- p1_(p1),
- p2_(p2),
- p3_(p3),
- p4_(p4),
- p5_(p5) {
- MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
- }
-
- virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
- P1>::Release(p1_); }
-
- RunnableType runnable_;
- P1 p1_;
- P2 p2_;
- P3 p3_;
- P4 p4_;
- P5 p5_;
-};
-
-template <typename Runnable, typename RunType, typename P1, typename P2,
- typename P3, typename P4, typename P5, typename P6>
-struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5,
- P6)> : public BindStateBase {
- typedef Runnable RunnableType;
- typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
- typedef Invoker<6, BindState, RunType> InvokerType;
- typedef typename InvokerType::UnboundRunType UnboundRunType;
-
- // Convenience typedefs for bound argument types.
- typedef UnwrapTraits<P1> Bound1UnwrapTraits;
- typedef UnwrapTraits<P2> Bound2UnwrapTraits;
- typedef UnwrapTraits<P3> Bound3UnwrapTraits;
- typedef UnwrapTraits<P4> Bound4UnwrapTraits;
- typedef UnwrapTraits<P5> Bound5UnwrapTraits;
- typedef UnwrapTraits<P6> Bound6UnwrapTraits;
-
- BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3,
- const P4& p4, const P5& p5, const P6& p6)
- : runnable_(runnable),
- p1_(p1),
- p2_(p2),
- p3_(p3),
- p4_(p4),
- p5_(p5),
- p6_(p6) {
- MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
- }
-
- virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
- P1>::Release(p1_); }
-
- RunnableType runnable_;
- P1 p1_;
- P2 p2_;
- P3 p3_;
- P4 p4_;
- P5 p5_;
- P6 p6_;
-};
-
-template <typename Runnable, typename RunType, typename P1, typename P2,
- typename P3, typename P4, typename P5, typename P6, typename P7>
-struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5, P6,
- P7)> : public BindStateBase {
- typedef Runnable RunnableType;
- typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
- typedef Invoker<7, BindState, RunType> InvokerType;
- typedef typename InvokerType::UnboundRunType UnboundRunType;
-
- // Convenience typedefs for bound argument types.
- typedef UnwrapTraits<P1> Bound1UnwrapTraits;
- typedef UnwrapTraits<P2> Bound2UnwrapTraits;
- typedef UnwrapTraits<P3> Bound3UnwrapTraits;
- typedef UnwrapTraits<P4> Bound4UnwrapTraits;
- typedef UnwrapTraits<P5> Bound5UnwrapTraits;
- typedef UnwrapTraits<P6> Bound6UnwrapTraits;
- typedef UnwrapTraits<P7> Bound7UnwrapTraits;
-
- BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3,
- const P4& p4, const P5& p5, const P6& p6, const P7& p7)
- : runnable_(runnable),
- p1_(p1),
- p2_(p2),
- p3_(p3),
- p4_(p4),
- p5_(p5),
- p6_(p6),
- p7_(p7) {
- MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
- }
-
- virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
- P1>::Release(p1_); }
-
- RunnableType runnable_;
- P1 p1_;
- P2 p2_;
- P3 p3_;
- P4 p4_;
- P5 p5_;
- P6 p6_;
- P7 p7_;
-};
-
-} // namespace cef_internal
-} // namespace base
-
-#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_H_
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Do not include this header file directly. Use base/cef_bind.h instead.
-
-// Specializations of RunnableAdapter<> for Windows specific calling
-// conventions. Please see base/bind_internal.h for more info.
-
-#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_WIN_H_
-#define CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_WIN_H_
-
-// In the x64 architecture in Windows, __fastcall, __stdcall, etc, are all
-// the same as __cdecl which would turn the following specializations into
-// multiple definitions.
-#if !defined(ARCH_CPU_X86_64)
-
-namespace base {
-namespace cef_internal {
-
-template <typename Functor>
-class RunnableAdapter;
-
-// __stdcall Function: Arity 0.
-template <typename R>
-class RunnableAdapter<R(__stdcall *)()> {
- public:
- typedef R (RunType)();
-
- explicit RunnableAdapter(R(__stdcall *function)())
- : function_(function) {
- }
-
- R Run() {
- return function_();
- }
-
- private:
- R (__stdcall *function_)();
-};
-
-// __fastcall Function: Arity 0.
-template <typename R>
-class RunnableAdapter<R(__fastcall *)()> {
- public:
- typedef R (RunType)();
-
- explicit RunnableAdapter(R(__fastcall *function)())
- : function_(function) {
- }
-
- R Run() {
- return function_();
- }
-
- private:
- R (__fastcall *function_)();
-};
-
-// __stdcall Function: Arity 1.
-template <typename R, typename A1>
-class RunnableAdapter<R(__stdcall *)(A1)> {
- public:
- typedef R (RunType)(A1);
-
- explicit RunnableAdapter(R(__stdcall *function)(A1))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1) {
- return function_(a1);
- }
-
- private:
- R (__stdcall *function_)(A1);
-};
-
-// __fastcall Function: Arity 1.
-template <typename R, typename A1>
-class RunnableAdapter<R(__fastcall *)(A1)> {
- public:
- typedef R (RunType)(A1);
-
- explicit RunnableAdapter(R(__fastcall *function)(A1))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1) {
- return function_(a1);
- }
-
- private:
- R (__fastcall *function_)(A1);
-};
-
-// __stdcall Function: Arity 2.
-template <typename R, typename A1, typename A2>
-class RunnableAdapter<R(__stdcall *)(A1, A2)> {
- public:
- typedef R (RunType)(A1, A2);
-
- explicit RunnableAdapter(R(__stdcall *function)(A1, A2))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2) {
- return function_(a1, a2);
- }
-
- private:
- R (__stdcall *function_)(A1, A2);
-};
-
-// __fastcall Function: Arity 2.
-template <typename R, typename A1, typename A2>
-class RunnableAdapter<R(__fastcall *)(A1, A2)> {
- public:
- typedef R (RunType)(A1, A2);
-
- explicit RunnableAdapter(R(__fastcall *function)(A1, A2))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2) {
- return function_(a1, a2);
- }
-
- private:
- R (__fastcall *function_)(A1, A2);
-};
-
-// __stdcall Function: Arity 3.
-template <typename R, typename A1, typename A2, typename A3>
-class RunnableAdapter<R(__stdcall *)(A1, A2, A3)> {
- public:
- typedef R (RunType)(A1, A2, A3);
-
- explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3) {
- return function_(a1, a2, a3);
- }
-
- private:
- R (__stdcall *function_)(A1, A2, A3);
-};
-
-// __fastcall Function: Arity 3.
-template <typename R, typename A1, typename A2, typename A3>
-class RunnableAdapter<R(__fastcall *)(A1, A2, A3)> {
- public:
- typedef R (RunType)(A1, A2, A3);
-
- explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3) {
- return function_(a1, a2, a3);
- }
-
- private:
- R (__fastcall *function_)(A1, A2, A3);
-};
-
-// __stdcall Function: Arity 4.
-template <typename R, typename A1, typename A2, typename A3, typename A4>
-class RunnableAdapter<R(__stdcall *)(A1, A2, A3, A4)> {
- public:
- typedef R (RunType)(A1, A2, A3, A4);
-
- explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3, A4))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4) {
- return function_(a1, a2, a3, a4);
- }
-
- private:
- R (__stdcall *function_)(A1, A2, A3, A4);
-};
-
-// __fastcall Function: Arity 4.
-template <typename R, typename A1, typename A2, typename A3, typename A4>
-class RunnableAdapter<R(__fastcall *)(A1, A2, A3, A4)> {
- public:
- typedef R (RunType)(A1, A2, A3, A4);
-
- explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3, A4))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4) {
- return function_(a1, a2, a3, a4);
- }
-
- private:
- R (__fastcall *function_)(A1, A2, A3, A4);
-};
-
-// __stdcall Function: Arity 5.
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5>
-class RunnableAdapter<R(__stdcall *)(A1, A2, A3, A4, A5)> {
- public:
- typedef R (RunType)(A1, A2, A3, A4, A5);
-
- explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3, A4, A5))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4,
- typename CallbackParamTraits<A5>::ForwardType a5) {
- return function_(a1, a2, a3, a4, a5);
- }
-
- private:
- R (__stdcall *function_)(A1, A2, A3, A4, A5);
-};
-
-// __fastcall Function: Arity 5.
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5>
-class RunnableAdapter<R(__fastcall *)(A1, A2, A3, A4, A5)> {
- public:
- typedef R (RunType)(A1, A2, A3, A4, A5);
-
- explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3, A4, A5))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4,
- typename CallbackParamTraits<A5>::ForwardType a5) {
- return function_(a1, a2, a3, a4, a5);
- }
-
- private:
- R (__fastcall *function_)(A1, A2, A3, A4, A5);
-};
-
-// __stdcall Function: Arity 6.
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6>
-class RunnableAdapter<R(__stdcall *)(A1, A2, A3, A4, A5, A6)> {
- public:
- typedef R (RunType)(A1, A2, A3, A4, A5, A6);
-
- explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3, A4, A5, A6))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4,
- typename CallbackParamTraits<A5>::ForwardType a5,
- typename CallbackParamTraits<A6>::ForwardType a6) {
- return function_(a1, a2, a3, a4, a5, a6);
- }
-
- private:
- R (__stdcall *function_)(A1, A2, A3, A4, A5, A6);
-};
-
-// __fastcall Function: Arity 6.
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6>
-class RunnableAdapter<R(__fastcall *)(A1, A2, A3, A4, A5, A6)> {
- public:
- typedef R (RunType)(A1, A2, A3, A4, A5, A6);
-
- explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3, A4, A5, A6))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4,
- typename CallbackParamTraits<A5>::ForwardType a5,
- typename CallbackParamTraits<A6>::ForwardType a6) {
- return function_(a1, a2, a3, a4, a5, a6);
- }
-
- private:
- R (__fastcall *function_)(A1, A2, A3, A4, A5, A6);
-};
-
-// __stdcall Function: Arity 7.
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7>
-class RunnableAdapter<R(__stdcall *)(A1, A2, A3, A4, A5, A6, A7)> {
- public:
- typedef R (RunType)(A1, A2, A3, A4, A5, A6, A7);
-
- explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3, A4, A5, A6, A7))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4,
- typename CallbackParamTraits<A5>::ForwardType a5,
- typename CallbackParamTraits<A6>::ForwardType a6,
- typename CallbackParamTraits<A7>::ForwardType a7) {
- return function_(a1, a2, a3, a4, a5, a6, a7);
- }
-
- private:
- R (__stdcall *function_)(A1, A2, A3, A4, A5, A6, A7);
-};
-
-// __fastcall Function: Arity 7.
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7>
-class RunnableAdapter<R(__fastcall *)(A1, A2, A3, A4, A5, A6, A7)> {
- public:
- typedef R (RunType)(A1, A2, A3, A4, A5, A6, A7);
-
- explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3, A4, A5, A6, A7))
- : function_(function) {
- }
-
- R Run(typename CallbackParamTraits<A1>::ForwardType a1,
- typename CallbackParamTraits<A2>::ForwardType a2,
- typename CallbackParamTraits<A3>::ForwardType a3,
- typename CallbackParamTraits<A4>::ForwardType a4,
- typename CallbackParamTraits<A5>::ForwardType a5,
- typename CallbackParamTraits<A6>::ForwardType a6,
- typename CallbackParamTraits<A7>::ForwardType a7) {
- return function_(a1, a2, a3, a4, a5, a6, a7);
- }
-
- private:
- R (__fastcall *function_)(A1, A2, A3, A4, A5, A6, A7);
-};
-
-} // namespace cef_internal
-} // namespace base
-
-#endif // !defined(ARCH_CPU_X86_64)
-
-#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_WIN_H_
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Do not include this header file directly. Use base/cef_bind.h or
-// base/cef_callback.h instead.
-
-// This file contains utility functions and classes that help the
-// implementation, and management of the Callback objects.
-
-#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_CALLBACK_INTERNAL_H_
-#define CEF_INCLUDE_BASE_INTERNAL_CEF_CALLBACK_INTERNAL_H_
-
-#include <stddef.h>
-
-#include "include/base/cef_ref_counted.h"
-#include "include/base/cef_scoped_ptr.h"
-
-template <typename T>
-class ScopedVector;
-
-namespace base {
-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
-// behaves as an existential type that is used by a corresponding
-// DoInvoke function to perform the function execution. This allows
-// us to shield the Callback class from the types of the bound argument via
-// "type erasure."
-class BindStateBase : public RefCountedThreadSafe<BindStateBase> {
- protected:
- friend class RefCountedThreadSafe<BindStateBase>;
- virtual ~BindStateBase() {}
-};
-
-// Holds the Callback methods that don't require specialization to reduce
-// template bloat.
-class CallbackBase {
- public:
- // Returns true if Callback is null (doesn't refer to anything).
- bool is_null() const { return bind_state_.get() == NULL; }
-
- // Returns the Callback into an uninitialized state.
- void Reset();
-
- protected:
- // In C++, it is safe to cast function pointers to function pointers of
- // another type. It is not okay to use void*. We create a InvokeFuncStorage
- // that that can store our function pointer, and then cast it back to
- // the original type on usage.
- typedef void(*InvokeFuncStorage)(void);
-
- // Returns true if this callback equals |other|. |other| may be null.
- bool Equals(const CallbackBase& other) const;
-
- // Allow initializing of |bind_state_| via the constructor to avoid default
- // initialization of the scoped_refptr. We do not also initialize
- // |polymorphic_invoke_| here because doing a normal assignment in the
- // derived Callback templates makes for much nicer compiler errors.
- explicit CallbackBase(BindStateBase* bind_state);
-
- // Force the destructor to be instantiated inside this translation unit so
- // that our subclasses will not get inlined versions. Avoids more template
- // bloat.
- ~CallbackBase();
-
- scoped_refptr<BindStateBase> bind_state_;
- InvokeFuncStorage polymorphic_invoke_;
-};
-
-// A helper template to determine if given type is non-const move-only-type,
-// i.e. if a value of the given type should be passed via .Pass() in a
-// destructive way.
-template <typename T> struct IsMoveOnlyType {
- template <typename U>
- static YesType Test(const typename U::MoveOnlyTypeForCPP03*);
-
- template <typename U>
- static NoType Test(...);
-
- static const bool value = sizeof(Test<T>(0)) == sizeof(YesType) &&
- !is_const<T>::value;
-};
-
-// This is a typetraits object that's used to take an argument type, and
-// extract a suitable type for storing and forwarding arguments.
-//
-// In particular, it strips off references, and converts arrays to
-// pointers for storage; and it avoids accidentally trying to create a
-// "reference of a reference" if the argument is a reference type.
-//
-// This array type becomes an issue for storage because we are passing bound
-// parameters by const reference. In this case, we end up passing an actual
-// array type in the initializer list which C++ does not allow. This will
-// break passing of C-string literals.
-template <typename T, bool is_move_only = IsMoveOnlyType<T>::value>
-struct CallbackParamTraits {
- typedef const T& ForwardType;
- typedef T StorageType;
-};
-
-// The Storage should almost be impossible to trigger unless someone manually
-// specifies type of the bind parameters. However, in case they do,
-// this will guard against us accidentally storing a reference parameter.
-//
-// The ForwardType should only be used for unbound arguments.
-template <typename T>
-struct CallbackParamTraits<T&, false> {
- typedef T& ForwardType;
- typedef T StorageType;
-};
-
-// Note that for array types, we implicitly add a const in the conversion. This
-// means that it is not possible to bind array arguments to functions that take
-// a non-const pointer. Trying to specialize the template based on a "const
-// T[n]" does not seem to match correctly, so we are stuck with this
-// restriction.
-template <typename T, size_t n>
-struct CallbackParamTraits<T[n], false> {
- typedef const T* ForwardType;
- typedef const T* StorageType;
-};
-
-// See comment for CallbackParamTraits<T[n]>.
-template <typename T>
-struct CallbackParamTraits<T[], false> {
- typedef const T* ForwardType;
- typedef const T* StorageType;
-};
-
-// Parameter traits for movable-but-not-copyable scopers.
-//
-// Callback<>/Bind() understands movable-but-not-copyable semantics where
-// the type cannot be copied but can still have its state destructively
-// transferred (aka. moved) to another instance of the same type by calling a
-// helper function. When used with Bind(), this signifies transferal of the
-// object's state to the target function.
-//
-// For these types, the ForwardType must not be a const reference, or a
-// reference. A const reference is inappropriate, and would break const
-// correctness, because we are implementing a destructive move. A non-const
-// reference cannot be used with temporaries which means the result of a
-// function or a cast would not be usable with Callback<> or Bind().
-template <typename T>
-struct CallbackParamTraits<T, true> {
- typedef T ForwardType;
- typedef T StorageType;
-};
-
-// CallbackForward() is a very limited simulation of C++11's std::forward()
-// used by the Callback/Bind system for a set of movable-but-not-copyable
-// types. It is needed because forwarding a movable-but-not-copyable
-// argument to another function requires us to invoke the proper move
-// operator to create a rvalue version of the type. The supported types are
-// whitelisted below as overloads of the CallbackForward() function. The
-// default template compiles out to be a no-op.
-//
-// In C++11, std::forward would replace all uses of this function. However, it
-// is impossible to implement a general std::forward with C++11 due to a lack
-// of rvalue references.
-//
-// In addition to Callback/Bind, this is used by PostTaskAndReplyWithResult to
-// simulate std::forward() and forward the result of one Callback as a
-// parameter to another callback. This is to support Callbacks that return
-// the movable-but-not-copyable types whitelisted above.
-template <typename T>
-typename enable_if<!IsMoveOnlyType<T>::value, T>::type& CallbackForward(T& t) {
- return t;
-}
-
-template <typename T>
-typename enable_if<IsMoveOnlyType<T>::value, T>::type CallbackForward(T& t) {
- return t.Pass();
-}
-
-} // namespace cef_internal
-} // namespace base
-
-#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_CALLBACK_INTERNAL_H_
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Do not include this header file directly. Use base/cef_lock.h instead.
-
-#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_LOCK_IMPL_H_
-#define CEF_INCLUDE_BASE_INTERNAL_CEF_LOCK_IMPL_H_
-
-#include "include/base/cef_build.h"
-
-#if defined(OS_WIN)
-#include <windows.h>
-#elif defined(OS_POSIX)
-#include <pthread.h>
-#endif
-
-#include "include/base/cef_macros.h"
-
-namespace base {
-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
-// should instead use Lock.
-class LockImpl {
- public:
-#if defined(OS_WIN)
- typedef CRITICAL_SECTION NativeHandle;
-#elif defined(OS_POSIX)
- typedef pthread_mutex_t NativeHandle;
-#endif
-
- LockImpl();
- ~LockImpl();
-
- // If the lock is not held, take it and return true. If the lock is already
- // held by something else, immediately return false.
- bool Try();
-
- // Take the lock, blocking until it is available if necessary.
- void Lock();
-
- // Release the lock. This must only be called by the lock's holder: after
- // a successful call to Try, or a call to Lock.
- void Unlock();
-
- // Return the native underlying lock.
- // TODO(awalker): refactor lock and condition variables so that this is
- // unnecessary.
- NativeHandle* native_handle() { return &native_handle_; }
-
- private:
- NativeHandle native_handle_;
-
- DISALLOW_COPY_AND_ASSIGN(LockImpl);
-};
-
-} // namespace cef_internal
-} // namespace base
-
-#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_LOCK_IMPL_H_
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Do not include this header file directly. Use base/cef_callback.h instead.
-
-#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_
-#define CEF_INCLUDE_BASE_INTERNAL_CEF_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_
-
-#include "include/base/cef_build.h"
-#include "include/base/cef_ref_counted.h"
-#include "include/base/cef_template_util.h"
-#include "include/base/cef_tuple.h"
-
-// It is dangerous to post a task with a T* argument where T is a subtype of
-// RefCounted(Base|ThreadSafeBase), since by the time the parameter is used, the
-// object may already have been deleted since it was not held with a
-// scoped_refptr. Example: http://crbug.com/27191
-// The following set of traits are designed to generate a compile error
-// whenever this antipattern is attempted.
-
-namespace base {
-
-namespace cef_internal {
-
-template <typename T>
-struct NeedsScopedRefptrButGetsRawPtr {
-#if defined(OS_WIN)
- enum {
- value = base::false_type::value
- };
-#else
- enum {
- // Human readable translation: you needed to be a scoped_refptr if you are a
- // raw pointer type and are convertible to a RefCounted(Base|ThreadSafeBase)
- // type.
- value = (is_pointer<T>::value &&
- (is_convertible<T, subtle::RefCountedBase*>::value ||
- is_convertible<T, subtle::RefCountedThreadSafeBase*>::value))
- };
-#endif
-};
-
-template <typename Params>
-struct ParamsUseScopedRefptrCorrectly {
- enum { value = 0 };
-};
-
-template <>
-struct ParamsUseScopedRefptrCorrectly<Tuple0> {
- enum { value = 1 };
-};
-
-template <typename A>
-struct ParamsUseScopedRefptrCorrectly<Tuple1<A> > {
- enum { value = !NeedsScopedRefptrButGetsRawPtr<A>::value };
-};
-
-template <typename A, typename B>
-struct ParamsUseScopedRefptrCorrectly<Tuple2<A, B> > {
- enum { value = !(NeedsScopedRefptrButGetsRawPtr<A>::value ||
- NeedsScopedRefptrButGetsRawPtr<B>::value) };
-};
-
-template <typename A, typename B, typename C>
-struct ParamsUseScopedRefptrCorrectly<Tuple3<A, B, C> > {
- enum { value = !(NeedsScopedRefptrButGetsRawPtr<A>::value ||
- NeedsScopedRefptrButGetsRawPtr<B>::value ||
- NeedsScopedRefptrButGetsRawPtr<C>::value) };
-};
-
-template <typename A, typename B, typename C, typename D>
-struct ParamsUseScopedRefptrCorrectly<Tuple4<A, B, C, D> > {
- enum { value = !(NeedsScopedRefptrButGetsRawPtr<A>::value ||
- NeedsScopedRefptrButGetsRawPtr<B>::value ||
- NeedsScopedRefptrButGetsRawPtr<C>::value ||
- NeedsScopedRefptrButGetsRawPtr<D>::value) };
-};
-
-template <typename A, typename B, typename C, typename D, typename E>
-struct ParamsUseScopedRefptrCorrectly<Tuple5<A, B, C, D, E> > {
- enum { value = !(NeedsScopedRefptrButGetsRawPtr<A>::value ||
- NeedsScopedRefptrButGetsRawPtr<B>::value ||
- NeedsScopedRefptrButGetsRawPtr<C>::value ||
- NeedsScopedRefptrButGetsRawPtr<D>::value ||
- NeedsScopedRefptrButGetsRawPtr<E>::value) };
-};
-
-template <typename A, typename B, typename C, typename D, typename E,
- typename F>
-struct ParamsUseScopedRefptrCorrectly<Tuple6<A, B, C, D, E, F> > {
- enum { value = !(NeedsScopedRefptrButGetsRawPtr<A>::value ||
- NeedsScopedRefptrButGetsRawPtr<B>::value ||
- NeedsScopedRefptrButGetsRawPtr<C>::value ||
- NeedsScopedRefptrButGetsRawPtr<D>::value ||
- NeedsScopedRefptrButGetsRawPtr<E>::value ||
- NeedsScopedRefptrButGetsRawPtr<F>::value) };
-};
-
-template <typename A, typename B, typename C, typename D, typename E,
- typename F, typename G>
-struct ParamsUseScopedRefptrCorrectly<Tuple7<A, B, C, D, E, F, G> > {
- enum { value = !(NeedsScopedRefptrButGetsRawPtr<A>::value ||
- NeedsScopedRefptrButGetsRawPtr<B>::value ||
- NeedsScopedRefptrButGetsRawPtr<C>::value ||
- NeedsScopedRefptrButGetsRawPtr<D>::value ||
- NeedsScopedRefptrButGetsRawPtr<E>::value ||
- NeedsScopedRefptrButGetsRawPtr<F>::value ||
- NeedsScopedRefptrButGetsRawPtr<G>::value) };
-};
-
-template <typename A, typename B, typename C, typename D, typename E,
- typename F, typename G, typename H>
-struct ParamsUseScopedRefptrCorrectly<Tuple8<A, B, C, D, E, F, G, H> > {
- enum { value = !(NeedsScopedRefptrButGetsRawPtr<A>::value ||
- NeedsScopedRefptrButGetsRawPtr<B>::value ||
- NeedsScopedRefptrButGetsRawPtr<C>::value ||
- NeedsScopedRefptrButGetsRawPtr<D>::value ||
- NeedsScopedRefptrButGetsRawPtr<E>::value ||
- NeedsScopedRefptrButGetsRawPtr<F>::value ||
- NeedsScopedRefptrButGetsRawPtr<G>::value ||
- NeedsScopedRefptrButGetsRawPtr<H>::value) };
-};
-
-} // namespace cef_internal
-
-} // namespace base
-
-#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Do not include this header file directly. Use base/cef_thread_checker.h
-// instead.
-
-#ifndef CEF_INCLUDE_BASE_INTERNAL_THREAD_CHECKER_IMPL_H_
-#define CEF_INCLUDE_BASE_INTERNAL_THREAD_CHECKER_IMPL_H_
-
-#include "include/base/cef_lock.h"
-#include "include/base/cef_platform_thread.h"
-
-namespace base {
-
-// Real implementation of ThreadChecker, for use in debug mode, or
-// for temporary use in release mode (e.g. to CHECK on a threading issue
-// seen only in the wild).
-//
-// Note: You should almost always use the ThreadChecker class to get the
-// right version for your build configuration.
-class ThreadCheckerImpl {
- public:
- ThreadCheckerImpl();
- ~ThreadCheckerImpl();
-
- bool CalledOnValidThread() const;
-
- // Changes the thread that is checked for in CalledOnValidThread. This may
- // be useful when an object may be created on one thread and then used
- // exclusively on another thread.
- void DetachFromThread();
-
- private:
- void EnsureThreadIdAssigned() const;
-
- mutable base::Lock lock_;
- // This is mutable so that CalledOnValidThread can set it.
- // It's guarded by |lock_|.
- mutable PlatformThreadRef valid_thread_id_;
-};
-
-} // namespace base
-
-#endif // CEF_INCLUDE_BASE_INTERNAL_THREAD_CHECKER_IMPL_H_
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
#ifndef CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_
-#include <stdint.h>
-
#include "include/internal/cef_export.h"
#include "include/internal/cef_string.h"
#include "include/internal/cef_string_list.h"
size_t size;
///
- // Called to increment the reference count for the object. Should be called
- // for every new copy of a pointer to a given object.
+ // Increment the reference count.
///
- void (CEF_CALLBACK *add_ref)(struct _cef_base_t* self);
+ int (CEF_CALLBACK *add_ref)(struct _cef_base_t* self);
///
- // Called to decrement the reference count for the object. If the reference
- // count falls to 0 the object should self-delete. Returns true (1) if the
- // resulting reference count is 0.
+ // Decrement the reference count. Delete this object when no references
+ // remain.
///
int (CEF_CALLBACK *release)(struct _cef_base_t* self);
///
- // Returns true (1) if the current reference count is 1.
+ // Returns the current number of references.
///
- int (CEF_CALLBACK *has_one_ref)(struct _cef_base_t* self);
+ int (CEF_CALLBACK *get_refct)(struct _cef_base_t* self);
} cef_base_t;
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
#pragma once
#include "include/capi/cef_base_capi.h"
-#include "include/capi/cef_drag_data_capi.h"
#include "include/capi/cef_frame_capi.h"
-#include "include/capi/cef_navigation_entry_capi.h"
#include "include/capi/cef_process_message_capi.h"
#include "include/capi/cef_request_context_capi.h"
cef_base_t base;
///
- // Called asynchronously after the file dialog is dismissed.
- // |selected_accept_filter| is the 0-based index of the value selected from
- // the accept filters array passed to cef_browser_host_t::RunFileDialog.
- // |file_paths| will be a single value or a list of values depending on the
- // dialog mode. If the selection was cancelled |file_paths| will be NULL.
+ // Called asynchronously after the file dialog is dismissed. If the selection
+ // was successful |file_paths| will be a single value or a list of values
+ // depending on the dialog mode. If the selection was cancelled |file_paths|
+ // will be NULL.
///
- void (CEF_CALLBACK *on_file_dialog_dismissed)(
- struct _cef_run_file_dialog_callback_t* self, int selected_accept_filter,
- cef_string_list_t file_paths);
+ void (CEF_CALLBACK *cont)(struct _cef_run_file_dialog_callback_t* self,
+ struct _cef_browser_host_t* browser_host, cef_string_list_t file_paths);
} cef_run_file_dialog_callback_t;
-///
-// Callback structure for cef_browser_host_t::GetNavigationEntries. The
-// functions of this structure will be called on the browser process UI thread.
-///
-typedef struct _cef_navigation_entry_visitor_t {
- ///
- // Base structure.
- ///
- cef_base_t base;
-
- ///
- // Method that will be executed. Do not keep a reference to |entry| outside of
- // this callback. Return true (1) to continue visiting entries or false (0) to
- // stop. |current| is true (1) if this entry is the currently loaded
- // navigation entry. |index| is the 0-based index of this entry and |total| is
- // the total number of entries.
- ///
- int (CEF_CALLBACK *visit)(struct _cef_navigation_entry_visitor_t* self,
- struct _cef_navigation_entry_t* entry, int current, int index,
- int total);
-} cef_navigation_entry_visitor_t;
-
-
///
// Structure used to represent the browser process aspects of a browser window.
// The functions of this structure can only be called in the browser process.
struct _cef_browser_t* (CEF_CALLBACK *get_browser)(
struct _cef_browser_host_t* self);
+ ///
+ // Call this function before destroying a contained browser window. This
+ // function performs any internal cleanup that may be needed before the
+ // browser window is destroyed. See cef_life_span_handler_t::do_close()
+ // documentation for additional usage information.
+ ///
+ void (CEF_CALLBACK *parent_window_will_close)(
+ struct _cef_browser_host_t* self);
+
///
// Request that the browser close. The JavaScript 'onbeforeunload' event will
// be fired. If |force_close| is false (0) the event handler, if any, will be
// Call to run a file chooser dialog. Only a single file chooser dialog may be
// pending at any given time. |mode| represents the type of dialog to display.
// |title| to the title to be used for the dialog and may be NULL to show the
- // default title ("Open" or "Save" depending on the mode). |default_file_path|
- // is the path with optional directory and/or file name component that will be
- // initially selected in the dialog. |accept_filters| are used to restrict the
- // selectable file types and may any combination of (a) valid lower-cased MIME
- // types (e.g. "text/*" or "image/*"), (b) individual file extensions (e.g.
- // ".txt" or ".png"), or (c) combined description and file extension delimited
- // using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg").
- // |selected_accept_filter| is the 0-based index of the filter that will be
- // selected by default. |callback| will be executed after the dialog is
- // dismissed or immediately if another dialog is already pending. The dialog
- // will be initiated asynchronously on the UI thread.
+ // default title ("Open" or "Save" depending on the mode). |default_file_name|
+ // is the default file name to select in the dialog. |accept_types| is a list
+ // of valid lower-cased MIME types or file extensions specified in an input
+ // element and is used to restrict selectable files to such types. |callback|
+ // will be executed after the dialog is dismissed or immediately if another
+ // dialog is already pending. The dialog will be initiated asynchronously on
+ // the UI thread.
///
void (CEF_CALLBACK *run_file_dialog)(struct _cef_browser_host_t* self,
cef_file_dialog_mode_t mode, const cef_string_t* title,
- const cef_string_t* default_file_path, cef_string_list_t accept_filters,
- int selected_accept_filter,
+ const cef_string_t* default_file_name, cef_string_list_t accept_types,
struct _cef_run_file_dialog_callback_t* callback);
///
// running simultaniously. |forward| indicates whether to search forward or
// backward within the page. |matchCase| indicates whether the search should
// be case-sensitive. |findNext| indicates whether this is the first request
- // or a follow-up. The cef_find_handler_t instance, if any, returned via
- // cef_client_t::GetFindHandler will be called to report find results.
+ // or a follow-up.
///
void (CEF_CALLBACK *find)(struct _cef_browser_host_t* self, int identifier,
const cef_string_t* searchText, int forward, int matchCase,
int clearSelection);
///
- // Open developer tools in its own window. If |inspect_element_at| is non-
- // NULL the element at the specified (x,y) location will be inspected.
+ // Open developer tools in its own window.
///
void (CEF_CALLBACK *show_dev_tools)(struct _cef_browser_host_t* self,
const struct _cef_window_info_t* windowInfo,
struct _cef_client_t* client,
- const struct _cef_browser_settings_t* settings,
- const cef_point_t* inspect_element_at);
+ const struct _cef_browser_settings_t* settings);
///
// Explicitly close the developer tools window if one exists for this browser
///
void (CEF_CALLBACK *close_dev_tools)(struct _cef_browser_host_t* self);
- ///
- // Retrieve a snapshot of current navigation entries as values sent to the
- // specified visitor. If |current_only| is true (1) only the current
- // navigation entry will be sent, otherwise all navigation entries will be
- // sent.
- ///
- ///
- void (CEF_CALLBACK *get_navigation_entries)(struct _cef_browser_host_t* self,
- struct _cef_navigation_entry_visitor_t* visitor, int current_only);
-
///
// Set whether mouse cursor change is disabled.
///
int (CEF_CALLBACK *is_mouse_cursor_change_disabled)(
struct _cef_browser_host_t* self);
- ///
- // If a misspelled word is currently selected in an editable node calling this
- // function will replace it with the specified |word|.
- ///
- void (CEF_CALLBACK *replace_misspelling)(struct _cef_browser_host_t* self,
- const cef_string_t* word);
-
- ///
- // Add the specified |word| to the spelling dictionary.
- ///
- void (CEF_CALLBACK *add_word_to_dictionary)(struct _cef_browser_host_t* self,
- const cef_string_t* word);
-
///
// Returns true (1) if window rendering is disabled.
///
struct _cef_browser_host_t* self);
///
- // Invalidate the view. The browser will call cef_render_handler_t::OnPaint
- // asynchronously. This function is only used when window rendering is
- // disabled.
+ // Invalidate the |dirtyRect| region of the view. The browser will call
+ // cef_render_handler_t::OnPaint asynchronously with the updated regions. This
+ // function is only used when window rendering is disabled.
///
void (CEF_CALLBACK *invalidate)(struct _cef_browser_host_t* self,
- cef_paint_element_type_t type);
+ const cef_rect_t* dirtyRect, cef_paint_element_type_t type);
///
// Send a key event to the browser.
void (CEF_CALLBACK *send_capture_lost_event)(
struct _cef_browser_host_t* self);
- ///
- // Notify the browser that the window hosting it is about to be moved or
- // resized. This function is only used on Windows and Linux.
- ///
- void (CEF_CALLBACK *notify_move_or_resize_started)(
- struct _cef_browser_host_t* self);
-
///
// Get the NSTextInputContext implementation for enabling IME on Mac when
// window rendering is disabled.
///
void (CEF_CALLBACK *handle_key_event_after_text_input_client)(
struct _cef_browser_host_t* self, cef_event_handle_t keyEvent);
-
- ///
- // Call this function when the user drags the mouse into the web view (before
- // calling DragTargetDragOver/DragTargetLeave/DragTargetDrop). |drag_data|
- // should not contain file contents as this type of data is not allowed to be
- // dragged into the web view. File contents can be removed using
- // cef_drag_data_t::ResetFileContents (for example, if |drag_data| comes from
- // cef_render_handler_t::StartDragging). This function is only used when
- // window rendering is disabled.
- ///
- void (CEF_CALLBACK *drag_target_drag_enter)(struct _cef_browser_host_t* self,
- struct _cef_drag_data_t* drag_data,
- const struct _cef_mouse_event_t* event,
- cef_drag_operations_mask_t allowed_ops);
-
- ///
- // Call this function each time the mouse is moved across the web view during
- // a drag operation (after calling DragTargetDragEnter and before calling
- // DragTargetDragLeave/DragTargetDrop). This function is only used when window
- // rendering is disabled.
- ///
- void (CEF_CALLBACK *drag_target_drag_over)(struct _cef_browser_host_t* self,
- const struct _cef_mouse_event_t* event,
- cef_drag_operations_mask_t allowed_ops);
-
- ///
- // Call this function when the user drags the mouse out of the web view (after
- // calling DragTargetDragEnter). This function is only used when window
- // rendering is disabled.
- ///
- void (CEF_CALLBACK *drag_target_drag_leave)(struct _cef_browser_host_t* self);
-
- ///
- // Call this function when the user completes the drag operation by dropping
- // the object onto the web view (after calling DragTargetDragEnter). The
- // object being dropped is |drag_data|, given as an argument to the previous
- // DragTargetDragEnter call. This function is only used when window rendering
- // is disabled.
- ///
- void (CEF_CALLBACK *drag_target_drop)(struct _cef_browser_host_t* self,
- const struct _cef_mouse_event_t* event);
-
- ///
- // Call this function when the drag operation started by a
- // cef_render_handler_t::StartDragging call has ended either in a drop or by
- // being cancelled. |x| and |y| are mouse coordinates relative to the upper-
- // left corner of the view. If the web view is both the drag source and the
- // drag target then all DragTarget* functions should be called before
- // DragSource* mthods. This function is only used when window rendering is
- // disabled.
- ///
- void (CEF_CALLBACK *drag_source_ended_at)(struct _cef_browser_host_t* self,
- int x, int y, cef_drag_operations_mask_t op);
-
- ///
- // Call this function when the drag operation started by a
- // cef_render_handler_t::StartDragging call has completed. This function may
- // be called immediately without first calling DragSourceEndedAt to cancel a
- // drag operation. If the web view is both the drag source and the drag target
- // then all DragTarget* functions should be called before DragSource* mthods.
- // This function is only used when window rendering is disabled.
- ///
- void (CEF_CALLBACK *drag_source_system_drag_ended)(
- struct _cef_browser_host_t* self);
} cef_browser_host_t;
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
#include "include/capi/cef_base_capi.h"
#include "include/capi/cef_command_line_capi.h"
-#include "include/capi/cef_print_handler_capi.h"
#include "include/capi/cef_values_capi.h"
#ifdef __cplusplus
void (CEF_CALLBACK *on_render_process_thread_created)(
struct _cef_browser_process_handler_t* self,
struct _cef_list_value_t* extra_info);
-
- ///
- // Return the handler for printing on Linux. If a print handler is not
- // provided then printing will not be supported on the Linux platform.
- ///
- struct _cef_print_handler_t* (CEF_CALLBACK *get_print_handler)(
- struct _cef_browser_process_handler_t* self);
} cef_browser_process_handler_t;
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
///
// Generic callback structure used for asynchronous completion.
///
-typedef struct _cef_completion_callback_t {
+typedef struct _cef_completion_handler_t {
///
// Base structure.
///
///
// Method that will be called once the task is complete.
///
- void (CEF_CALLBACK *on_complete)(struct _cef_completion_callback_t* self);
-} cef_completion_callback_t;
+ void (CEF_CALLBACK *on_complete)(struct _cef_completion_handler_t* self);
+} cef_completion_handler_t;
#ifdef __cplusplus
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
#include "include/capi/cef_display_handler_capi.h"
#include "include/capi/cef_download_handler_capi.h"
#include "include/capi/cef_drag_handler_capi.h"
-#include "include/capi/cef_find_handler_capi.h"
#include "include/capi/cef_focus_handler_capi.h"
#include "include/capi/cef_geolocation_handler_capi.h"
#include "include/capi/cef_jsdialog_handler_capi.h"
struct _cef_drag_handler_t* (CEF_CALLBACK *get_drag_handler)(
struct _cef_client_t* self);
- ///
- // Return the handler for find result events.
- ///
- struct _cef_find_handler_t* (CEF_CALLBACK *get_find_handler)(
- struct _cef_client_t* self);
-
///
// Return the handler for focus events.
///
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
cef_string_userfree_t (CEF_CALLBACK *get_selection_text)(
struct _cef_context_menu_params_t* self);
- ///
- // Returns the text of the misspelled word, if any, that the context menu was
- // invoked on.
- ///
- // The resulting string must be freed by calling cef_string_userfree_free().
- cef_string_userfree_t (CEF_CALLBACK *get_misspelled_word)(
- struct _cef_context_menu_params_t* self);
-
- ///
- // Returns true (1) if suggestions exist, false (0) otherwise. Fills in
- // |suggestions| from the spell check service for the misspelled word if there
- // is one.
- ///
- int (CEF_CALLBACK *get_dictionary_suggestions)(
- struct _cef_context_menu_params_t* self, cef_string_list_t suggestions);
-
///
// Returns true (1) if the context menu was invoked on an editable node.
///
///
// Returns true (1) if the context menu was invoked on an editable node where
- // spell-check is enabled.
+ // speech-input is enabled.
///
- int (CEF_CALLBACK *is_spell_check_enabled)(
+ int (CEF_CALLBACK *is_speech_input_enabled)(
struct _cef_context_menu_params_t* self);
///
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
#endif
struct _cef_cookie_visitor_t;
-struct _cef_delete_cookies_callback_t;
-struct _cef_set_cookie_callback_t;
///
// Structure used for managing cookies. The functions of this structure may be
///
// Set the schemes supported by this manager. By default only "http" and
- // "https" schemes are supported. If |callback| is non-NULL it will be
- // executed asnychronously on the IO thread after the change has been applied.
- // Must be called before any cookies are accessed.
+ // "https" schemes are supported. Must be called before any cookies are
+ // accessed.
///
void (CEF_CALLBACK *set_supported_schemes)(struct _cef_cookie_manager_t* self,
- cef_string_list_t schemes, struct _cef_completion_callback_t* callback);
+ cef_string_list_t schemes);
///
- // Visit all cookies on the IO thread. The returned cookies are ordered by
- // longest path, then by earliest creation date. Returns false (0) if cookies
- // cannot be accessed.
+ // Visit all cookies. The returned cookies are ordered by longest path, then
+ // by earliest creation date. Returns false (0) if cookies cannot be accessed.
///
int (CEF_CALLBACK *visit_all_cookies)(struct _cef_cookie_manager_t* self,
struct _cef_cookie_visitor_t* visitor);
///
- // Visit a subset of cookies on the IO thread. The results are filtered by the
- // given url scheme, host, domain and path. If |includeHttpOnly| is true (1)
- // HTTP-only cookies will also be included in the results. The returned
- // cookies are ordered by longest path, then by earliest creation date.
- // Returns false (0) if cookies cannot be accessed.
+ // Visit a subset of cookies. The results are filtered by the given url
+ // scheme, host, domain and path. If |includeHttpOnly| is true (1) HTTP-only
+ // cookies will also be included in the results. The returned cookies are
+ // ordered by longest path, then by earliest creation date. Returns false (0)
+ // if cookies cannot be accessed.
///
int (CEF_CALLBACK *visit_url_cookies)(struct _cef_cookie_manager_t* self,
const cef_string_t* url, int includeHttpOnly,
// Sets a cookie given a valid URL and explicit user-provided cookie
// attributes. This function expects each attribute to be well-formed. It will
// check for disallowed characters (e.g. the ';' character is disallowed
- // within the cookie value attribute) and fail without setting the cookie if
- // such characters are found. If |callback| is non-NULL it will be executed
- // asnychronously on the IO thread after the cookie has been set. Returns
- // false (0) if an invalid URL is specified or if cookies cannot be accessed.
+ // within the cookie value attribute) and will return false (0) without
+ // setting the cookie if such characters are found. This function must be
+ // called on the IO thread.
///
int (CEF_CALLBACK *set_cookie)(struct _cef_cookie_manager_t* self,
- const cef_string_t* url, const struct _cef_cookie_t* cookie,
- struct _cef_set_cookie_callback_t* callback);
+ const cef_string_t* url, const struct _cef_cookie_t* cookie);
///
// Delete all cookies that match the specified parameters. If both |url| and
- // |cookie_name| values are specified all host and domain cookies matching
+ // values |cookie_name| are specified all host and domain cookies matching
// both will be deleted. If only |url| is specified all host cookies (but not
// domain cookies) irrespective of path will be deleted. If |url| is NULL all
- // cookies for all hosts and domains will be deleted. If |callback| is non-
- // NULL it will be executed asnychronously on the IO thread after the cookies
- // have been deleted. Returns false (0) if a non-NULL invalid URL is specified
- // or if cookies cannot be accessed. Cookies can alternately be deleted using
- // the Visit*Cookies() functions.
+ // cookies for all hosts and domains will be deleted. Returns false (0) if a
+ // non- NULL invalid URL is specified or if cookies cannot be accessed. This
+ // function must be called on the IO thread.
///
int (CEF_CALLBACK *delete_cookies)(struct _cef_cookie_manager_t* self,
- const cef_string_t* url, const cef_string_t* cookie_name,
- struct _cef_delete_cookies_callback_t* callback);
+ const cef_string_t* url, const cef_string_t* cookie_name);
///
// Sets the directory path that will be used for storing cookie data. If
// stored at the specified |path|. To persist session cookies (cookies without
// an expiry date or validity interval) set |persist_session_cookies| to true
// (1). Session cookies are generally intended to be transient and most Web
- // browsers do not persist them. If |callback| is non-NULL it will be executed
- // asnychronously on the IO thread after the manager's storage has been
- // initialized. Returns false (0) if cookies cannot be accessed.
+ // browsers do not persist them. Returns false (0) if cookies cannot be
+ // accessed.
///
int (CEF_CALLBACK *set_storage_path)(struct _cef_cookie_manager_t* self,
- const cef_string_t* path, int persist_session_cookies,
- struct _cef_completion_callback_t* callback);
+ const cef_string_t* path, int persist_session_cookies);
///
- // Flush the backing store (if any) to disk. If |callback| is non-NULL it will
- // be executed asnychronously on the IO thread after the flush is complete.
- // Returns false (0) if cookies cannot be accessed.
+ // Flush the backing store (if any) to disk and execute the specified
+ // |handler| on the IO thread when done. Returns false (0) if cookies cannot
+ // be accessed.
///
int (CEF_CALLBACK *flush_store)(struct _cef_cookie_manager_t* self,
- struct _cef_completion_callback_t* callback);
+ struct _cef_completion_handler_t* handler);
} cef_cookie_manager_t;
///
// Returns the global cookie manager. By default data will be stored at
-// CefSettings.cache_path if specified or in memory otherwise. If |callback| is
-// non-NULL it will be executed asnychronously on the IO thread after the
-// manager's storage has been initialized. Using this function is equivalent to
-// calling cef_request_tContext::cef_request_context_get_global_context()->get_d
-// efault_cookie_manager().
+// CefSettings.cache_path if specified or in memory otherwise.
///
-CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_get_global_manager(
- struct _cef_completion_callback_t* callback);
+CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_get_global_manager();
///
// Creates a new cookie manager. If |path| is NULL data will be stored in memory
// only. Otherwise, data will be stored at the specified |path|. To persist
// session cookies (cookies without an expiry date or validity interval) set
// |persist_session_cookies| to true (1). Session cookies are generally intended
-// to be transient and most Web browsers do not persist them. If |callback| is
-// non-NULL it will be executed asnychronously on the IO thread after the
-// manager's storage has been initialized.
+// to be transient and most Web browsers do not persist them. Returns NULL if
+// creation fails.
///
CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_create_manager(
- const cef_string_t* path, int persist_session_cookies,
- struct _cef_completion_callback_t* callback);
+ const cef_string_t* path, int persist_session_cookies);
///
} cef_cookie_visitor_t;
-///
-// Structure to implement to be notified of asynchronous completion via
-// cef_cookie_manager_t::set_cookie().
-///
-typedef struct _cef_set_cookie_callback_t {
- ///
- // Base structure.
- ///
- cef_base_t base;
-
- ///
- // Method that will be called upon completion. |success| will be true (1) if
- // the cookie was set successfully.
- ///
- void (CEF_CALLBACK *on_complete)(struct _cef_set_cookie_callback_t* self,
- int success);
-} cef_set_cookie_callback_t;
-
-
-///
-// Structure to implement to be notified of asynchronous completion via
-// cef_cookie_manager_t::delete_cookies().
-///
-typedef struct _cef_delete_cookies_callback_t {
- ///
- // Base structure.
- ///
- cef_base_t base;
-
- ///
- // Method that will be called upon completion. |num_deleted| will be the
- // number of cookies that were deleted or -1 if unknown.
- ///
- void (CEF_CALLBACK *on_complete)(struct _cef_delete_cookies_callback_t* self,
- int num_deleted);
-} cef_delete_cookies_callback_t;
-
-
#ifdef __cplusplus
}
#endif
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
cef_base_t base;
///
- // Continue the file selection. |selected_accept_filter| should be the 0-based
- // index of the value selected from the accept filters array passed to
- // cef_dialog_handler_t::OnFileDialog. |file_paths| should be a single value
- // or a list of values depending on the dialog mode. An NULL |file_paths|
+ // Continue the file selection with the specified |file_paths|. This may be a
+ // single value or a list of values depending on the dialog mode. An NULL
// value is treated the same as calling cancel().
///
void (CEF_CALLBACK *cont)(struct _cef_file_dialog_callback_t* self,
- int selected_accept_filter, cef_string_list_t file_paths);
+ cef_string_list_t file_paths);
///
// Cancel the file selection.
// Called to run a file chooser dialog. |mode| represents the type of dialog
// to display. |title| to the title to be used for the dialog and may be NULL
// to show the default title ("Open" or "Save" depending on the mode).
- // |default_file_path| is the path with optional directory and/or file name
- // component that should be initially selected in the dialog. |accept_filters|
- // are used to restrict the selectable file types and may any combination of
- // (a) valid lower-cased MIME types (e.g. "text/*" or "image/*"), (b)
- // individual file extensions (e.g. ".txt" or ".png"), or (c) combined
- // description and file extension delimited using "|" and ";" (e.g. "Image
- // Types|.png;.gif;.jpg"). |selected_accept_filter| is the 0-based index of
- // the filter that should be selected by default. To display a custom dialog
- // return true (1) and execute |callback| either inline or at a later time. To
- // display the default dialog return false (0).
+ // |default_file_name| is the default file name to select in the dialog.
+ // |accept_types| is a list of valid lower-cased MIME types or file extensions
+ // specified in an input element and is used to restrict selectable files to
+ // such types. To display a custom dialog return true (1) and execute
+ // |callback| either inline or at a later time. To display the default dialog
+ // return false (0).
///
int (CEF_CALLBACK *on_file_dialog)(struct _cef_dialog_handler_t* self,
struct _cef_browser_t* browser, cef_file_dialog_mode_t mode,
- const cef_string_t* title, const cef_string_t* default_file_path,
- cef_string_list_t accept_filters, int selected_accept_filter,
+ const cef_string_t* title, const cef_string_t* default_file_name,
+ cef_string_list_t accept_types,
struct _cef_file_dialog_callback_t* callback);
} cef_dialog_handler_t;
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
void (CEF_CALLBACK *on_title_change)(struct _cef_display_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* title);
- ///
- // Called when the page icon changes.
- ///
- void (CEF_CALLBACK *on_favicon_urlchange)(struct _cef_display_handler_t* self,
- struct _cef_browser_t* browser, cef_string_list_t icon_urls);
-
///
// Called when the browser is about to display a tooltip. |text| contains the
// text that will be displayed in the tooltip. To handle the display of the
struct _cef_browser_t* browser, cef_string_t* text);
///
- // Called when the browser receives a status message. |value| contains the
- // text that will be displayed in the status message.
+ // Called when the browser receives a status message. |text| contains the text
+ // that will be displayed in the status message and |type| indicates the
+ // status message type.
///
void (CEF_CALLBACK *on_status_message)(struct _cef_display_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* value);
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
#endif
struct _cef_domdocument_t;
+struct _cef_domevent_listener_t;
struct _cef_domnode_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.
///
struct _cef_domnode_t* (CEF_CALLBACK *get_last_child)(
struct _cef_domnode_t* self);
+ ///
+ // Add an event listener to this node for the specified event type. If
+ // |useCapture| is true (1) then this listener will be considered a capturing
+ // listener. Capturing listeners will recieve all events of the specified type
+ // before the events are dispatched to any other event targets beneath the
+ // current node in the tree. Events which are bubbling upwards through the
+ // tree will not trigger a capturing listener. Separate calls to this function
+ // can be used to register the same listener with and without capture. See
+ // WebCore/dom/EventNames.h for the list of supported event types.
+ ///
+ void (CEF_CALLBACK *add_event_listener)(struct _cef_domnode_t* self,
+ const cef_string_t* eventType, struct _cef_domevent_listener_t* listener,
+ int useCapture);
+
// The following functions are valid only for element nodes.
} cef_domnode_t;
+///
+// Structure used to represent a DOM event. The functions of this structure
+// should only be called on the render process main thread.
+///
+typedef struct _cef_domevent_t {
+ ///
+ // Base structure.
+ ///
+ cef_base_t base;
+
+ ///
+ // Returns the event type.
+ ///
+ // The resulting string must be freed by calling cef_string_userfree_free().
+ cef_string_userfree_t (CEF_CALLBACK *get_type)(struct _cef_domevent_t* self);
+
+ ///
+ // Returns the event category.
+ ///
+ cef_dom_event_category_t (CEF_CALLBACK *get_category)(
+ struct _cef_domevent_t* self);
+
+ ///
+ // Returns the event processing phase.
+ ///
+ cef_dom_event_phase_t (CEF_CALLBACK *get_phase)(struct _cef_domevent_t* self);
+
+ ///
+ // Returns true (1) if the event can bubble up the tree.
+ ///
+ int (CEF_CALLBACK *can_bubble)(struct _cef_domevent_t* self);
+
+ ///
+ // Returns true (1) if the event can be canceled.
+ ///
+ int (CEF_CALLBACK *can_cancel)(struct _cef_domevent_t* self);
+
+ ///
+ // Returns the document associated with this event.
+ ///
+ struct _cef_domdocument_t* (CEF_CALLBACK *get_document)(
+ struct _cef_domevent_t* self);
+
+ ///
+ // Returns the target of the event.
+ ///
+ struct _cef_domnode_t* (CEF_CALLBACK *get_target)(
+ struct _cef_domevent_t* self);
+
+ ///
+ // Returns the current target of the event.
+ ///
+ struct _cef_domnode_t* (CEF_CALLBACK *get_current_target)(
+ struct _cef_domevent_t* self);
+} cef_domevent_t;
+
+
+///
+// Structure to implement for handling DOM events. The functions of this
+// structure will be called on the render process main thread.
+///
+typedef struct _cef_domevent_listener_t {
+ ///
+ // Base structure.
+ ///
+ cef_base_t base;
+
+ ///
+ // Called when an event is received. The event object passed to this function
+ // contains a snapshot of the DOM at the time this function is executed. DOM
+ // objects are only valid for the scope of this function. Do not keep
+ // references to or attempt to access any DOM objects outside the scope of
+ // this function.
+ ///
+ void (CEF_CALLBACK *handle_event)(struct _cef_domevent_listener_t* self,
+ struct _cef_domevent_t* event);
+} cef_domevent_listener_t;
+
+
#ifdef __cplusplus
}
#endif
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// Call to cancel the download.
///
void (CEF_CALLBACK *cancel)(struct _cef_download_item_callback_t* self);
-
- ///
- // Call to pause the download.
- ///
- void (CEF_CALLBACK *pause)(struct _cef_download_item_callback_t* self);
-
- ///
- // Call to resume the download.
- ///
- void (CEF_CALLBACK *resume)(struct _cef_download_item_callback_t* self);
} cef_download_item_callback_t;
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
cef_string_userfree_t (CEF_CALLBACK *get_url)(
struct _cef_download_item_t* self);
- ///
- // Returns the original URL before any redirections.
- ///
- // The resulting string must be freed by calling cef_string_userfree_free().
- cef_string_userfree_t (CEF_CALLBACK *get_original_url)(
- struct _cef_download_item_t* self);
-
///
// Returns the suggested file name.
///
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
#pragma once
#include "include/capi/cef_base_capi.h"
-#include "include/capi/cef_stream_capi.h"
#ifdef __cplusplus
extern "C" {
///
cef_base_t base;
- ///
- // Returns a copy of the current object.
- ///
- struct _cef_drag_data_t* (CEF_CALLBACK *clone)(struct _cef_drag_data_t* self);
-
- ///
- // Returns true (1) if this object is read-only.
- ///
- int (CEF_CALLBACK *is_read_only)(struct _cef_drag_data_t* self);
-
///
// Returns true (1) if the drag data is a link.
///
cef_string_userfree_t (CEF_CALLBACK *get_file_name)(
struct _cef_drag_data_t* self);
- ///
- // Write the contents of the file being dragged out of the web view into
- // |writer|. Returns the number of bytes sent to |writer|. If |writer| is NULL
- // this function will return the size of the file contents in bytes. Call
- // get_file_name() to get a suggested name for the file.
- ///
- size_t (CEF_CALLBACK *get_file_contents)(struct _cef_drag_data_t* self,
- struct _cef_stream_writer_t* writer);
-
///
// Retrieve the list of file names that are being dragged into the browser
// window.
///
int (CEF_CALLBACK *get_file_names)(struct _cef_drag_data_t* self,
cef_string_list_t names);
-
- ///
- // Set the link URL that is being dragged.
- ///
- void (CEF_CALLBACK *set_link_url)(struct _cef_drag_data_t* self,
- const cef_string_t* url);
-
- ///
- // Set the title associated with the link being dragged.
- ///
- void (CEF_CALLBACK *set_link_title)(struct _cef_drag_data_t* self,
- const cef_string_t* title);
-
- ///
- // Set the metadata associated with the link being dragged.
- ///
- void (CEF_CALLBACK *set_link_metadata)(struct _cef_drag_data_t* self,
- const cef_string_t* data);
-
- ///
- // Set the plain text fragment that is being dragged.
- ///
- void (CEF_CALLBACK *set_fragment_text)(struct _cef_drag_data_t* self,
- const cef_string_t* text);
-
- ///
- // Set the text/html fragment that is being dragged.
- ///
- void (CEF_CALLBACK *set_fragment_html)(struct _cef_drag_data_t* self,
- const cef_string_t* html);
-
- ///
- // Set the base URL that the fragment came from.
- ///
- void (CEF_CALLBACK *set_fragment_base_url)(struct _cef_drag_data_t* self,
- const cef_string_t* base_url);
-
- ///
- // Reset the file contents. You should do this before calling
- // cef_browser_host_t::DragTargetDragEnter as the web view does not allow us
- // to drag in this kind of data.
- ///
- void (CEF_CALLBACK *reset_file_contents)(struct _cef_drag_data_t* self);
-
- ///
- // Add a file that is being dragged into the webview.
- ///
- void (CEF_CALLBACK *add_file)(struct _cef_drag_data_t* self,
- const cef_string_t* path, const cef_string_t* display_name);
} cef_drag_data_t;
-///
-// Create a new cef_drag_data_t object.
-///
-CEF_EXPORT cef_drag_data_t* cef_drag_data_create();
-
-
#ifdef __cplusplus
}
#endif
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
///
// Implement this structure to handle events related to geolocation permission
// requests. The functions of this structure will be called on the browser
-// process UI thread.
+// process IO thread.
///
typedef struct _cef_geolocation_handler_t {
///
///
// Called when a page requests permission to access geolocation information.
// |requesting_url| is the URL requesting permission and |request_id| is the
- // unique ID for the permission request. Return true (1) and call
- // cef_geolocation_callback_t::cont() either in this function or at a later
- // time to continue or cancel the request. Return false (0) to cancel the
- // request immediately.
+ // unique ID for the permission request. Call
+ // cef_geolocation_callback_t::Continue to allow or deny the permission
+ // request.
///
- int (CEF_CALLBACK *on_request_geolocation_permission)(
+ void (CEF_CALLBACK *on_request_geolocation_permission)(
struct _cef_geolocation_handler_t* self, struct _cef_browser_t* browser,
const cef_string_t* requesting_url, int request_id,
struct _cef_geolocation_callback_t* callback);
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
cef_base_t base;
///
- // Called on the IO thread before a new popup browser is created. The
- // |browser| and |frame| values represent the source of the popup request. The
- // |target_url| and |target_frame_name| values indicate where the popup
- // browser should navigate and may be NULL if not specified with the request.
- // The |target_disposition| value indicates where the user intended to open
- // the popup (e.g. current tab, new tab, etc). The |user_gesture| value will
- // be true (1) if the popup was opened via explicit user gesture (e.g.
- // clicking a link) or false (0) if the popup opened automatically (e.g. via
- // the DomContentLoaded event). The |popupFeatures| structure contains
- // additional information about the requested popup window. To allow creation
- // of the popup browser optionally modify |windowInfo|, |client|, |settings|
- // and |no_javascript_access| and return false (0). To cancel creation of the
- // popup browser return true (1). The |client| and |settings| values will
- // default to the source browser's values. If the |no_javascript_access| value
- // is set to false (0) the new browser will not be scriptable and may not be
- // hosted in the same renderer process as the source browser.
+ // Called on the IO thread before a new popup window is created. The |browser|
+ // and |frame| parameters represent the source of the popup request. The
+ // |target_url| and |target_frame_name| values may be NULL if none were
+ // specified with the request. The |popupFeatures| structure contains
+ // information about the requested popup window. To allow creation of the
+ // popup window optionally modify |windowInfo|, |client|, |settings| and
+ // |no_javascript_access| and return false (0). To cancel creation of the
+ // popup window return true (1). The |client| and |settings| values will
+ // default to the source browser's values. The |no_javascript_access| value
+ // indicates whether the new browser window should be scriptable and in the
+ // same process as the source browser.
int (CEF_CALLBACK *on_before_popup)(struct _cef_life_span_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
const cef_string_t* target_url, const cef_string_t* target_frame_name,
- cef_window_open_disposition_t target_disposition, int user_gesture,
const struct _cef_popup_features_t* popupFeatures,
struct _cef_window_info_t* windowInfo, struct _cef_client_t** client,
struct _cef_browser_settings_t* settings, int* no_javascript_access);
// opportunity to process the 'onbeforeunload' event and optionally cancel the
// close before do_close() is called.
//
- // The cef_life_span_handler_t::on_before_close() function will be called
+ // The cef_life_span_handler_t::OnBeforeclose() function will be called
// immediately before the browser object is destroyed. The application should
- // only exit after on_before_close() has been called for all existing
- // browsers.
+ // only exit after OnBeforeclose() has been called for all existing browsers.
//
// If the browser represents a modal window and a custom modal loop
// implementation was provided in cef_life_span_handler_t::run_modal() this
// CefJSDialogHandler::OnBeforeUnloadDialog()).
// 4. User approves the close. 5. JavaScript 'onunload' handler executes. 6.
// Application's do_close() handler is called. Application will:
- // A. Set a flag to indicate that the next close attempt will be allowed.
- // B. Return false.
+ // A. Call CefBrowserHost::ParentWindowWillClose() to notify CEF that the
+ // parent window will be closing.
+ // B. Set a flag to indicate that the next close attempt will be allowed.
+ // C. Return false.
// 7. CEF sends an OS close notification. 8. Application's top-level window
// receives the OS close notification and
// allows the window to close based on the flag from #6B.
// 9. Browser OS window is destroyed. 10. Application's
- // cef_life_span_handler_t::on_before_close() handler is called and
+ // cef_life_span_handler_t::OnBeforeclose() handler is called and
// the browser object is destroyed.
// 11. Application exits by calling cef_quit_message_loop() if no other
// browsers
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
+++ /dev/null
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// ---------------------------------------------------------------------------
-//
-// This file was generated by the CEF translator tool and should not edited
-// by hand. See the translator.README.txt file in the tools directory for
-// more information.
-//
-
-#ifndef CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_
-#define CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_
-#pragma once
-
-#include "include/capi/cef_base_capi.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-///
-// Structure used to represent an entry in navigation history.
-///
-typedef struct _cef_navigation_entry_t {
- ///
- // Base structure.
- ///
- cef_base_t base;
-
- ///
- // Returns true (1) if this object is valid. Do not call any other functions
- // if this function returns false (0).
- ///
- int (CEF_CALLBACK *is_valid)(struct _cef_navigation_entry_t* self);
-
- ///
- // Returns the actual URL of the page. For some pages this may be data: URL or
- // similar. Use get_display_url() to return a display-friendly version.
- ///
- // The resulting string must be freed by calling cef_string_userfree_free().
- cef_string_userfree_t (CEF_CALLBACK *get_url)(
- struct _cef_navigation_entry_t* self);
-
- ///
- // Returns a display-friendly version of the URL.
- ///
- // The resulting string must be freed by calling cef_string_userfree_free().
- cef_string_userfree_t (CEF_CALLBACK *get_display_url)(
- struct _cef_navigation_entry_t* self);
-
- ///
- // Returns the original URL that was entered by the user before any redirects.
- ///
- // The resulting string must be freed by calling cef_string_userfree_free().
- cef_string_userfree_t (CEF_CALLBACK *get_original_url)(
- struct _cef_navigation_entry_t* self);
-
- ///
- // Returns the title set by the page. This value may be NULL.
- ///
- // The resulting string must be freed by calling cef_string_userfree_free().
- cef_string_userfree_t (CEF_CALLBACK *get_title)(
- struct _cef_navigation_entry_t* self);
-
- ///
- // Returns the transition type which indicates what the user did to move to
- // this page from the previous page.
- ///
- cef_transition_type_t (CEF_CALLBACK *get_transition_type)(
- struct _cef_navigation_entry_t* self);
-
- ///
- // Returns true (1) if this navigation includes post data.
- ///
- int (CEF_CALLBACK *has_post_data)(struct _cef_navigation_entry_t* self);
-
- ///
- // Returns the name of the sub-frame that navigated or an NULL value if the
- // main frame navigated.
- ///
- // The resulting string must be freed by calling cef_string_userfree_free().
- cef_string_userfree_t (CEF_CALLBACK *get_frame_name)(
- struct _cef_navigation_entry_t* self);
-
- ///
- // Returns the time for the last known successful navigation completion. A
- // navigation may be completed more than once if the page is reloaded. May be
- // 0 if the navigation has not yet completed.
- ///
- cef_time_t (CEF_CALLBACK *get_completion_time)(
- struct _cef_navigation_entry_t* self);
-
- ///
- // Returns the HTTP status code for the last known successful navigation
- // response. May be 0 if the response has not yet been received or if the
- // navigation has not yet completed.
- ///
- int (CEF_CALLBACK *get_http_status_code)(
- struct _cef_navigation_entry_t* self);
-} cef_navigation_entry_t;
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
+++ /dev/null
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// ---------------------------------------------------------------------------
-//
-// This file was generated by the CEF translator tool and should not edited
-// by hand. See the translator.README.txt file in the tools directory for
-// more information.
-//
-
-#ifndef CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_
-#define CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_
-#pragma once
-
-#include "include/capi/cef_base_capi.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-///
-// Parse the specified |url| into its component parts. Returns false (0) if the
-// URL is NULL or invalid.
-///
-CEF_EXPORT int cef_parse_url(const cef_string_t* url,
- struct _cef_urlparts_t* parts);
-
-///
-// Creates a URL from the specified |parts|, which must contain a non-NULL spec
-// or a non-NULL host and path (at a minimum), but not both. Returns false (0)
-// if |parts| isn't initialized as described.
-///
-CEF_EXPORT int cef_create_url(const struct _cef_urlparts_t* parts,
- cef_string_t* url);
-
-///
-// Returns the mime type for the specified file extension or an NULL string if
-// unknown.
-///
-// The resulting string must be freed by calling cef_string_userfree_free().
-CEF_EXPORT cef_string_userfree_t cef_get_mime_type(
- const cef_string_t* extension);
-
-// Get the extensions associated with the given mime type. This should be passed
-// in lower case. There could be multiple extensions for a given mime type, like
-// "html,htm" for "text/html", or "txt,text,html,..." for "text/*". Any existing
-// elements in the provided vector will not be erased.
-CEF_EXPORT void cef_get_extensions_for_mime_type(const cef_string_t* mime_type,
- cef_string_list_t extensions);
-
-///
-// Encodes |data| as a base64 string.
-///
-// The resulting string must be freed by calling cef_string_userfree_free().
-CEF_EXPORT cef_string_userfree_t cef_base64encode(const void* data,
- size_t data_size);
-
-///
-// Decodes the base64 encoded string |data|. The returned value will be NULL if
-// the decoding fails.
-///
-CEF_EXPORT struct _cef_binary_value_t* cef_base64decode(
- const cef_string_t* data);
-
-///
-// Escapes characters in |text| which are unsuitable for use as a query
-// parameter value. Everything except alphanumerics and -_.!~*'() will be
-// converted to "%XX". If |use_plus| is true (1) spaces will change to "+". The
-// result is basically the same as encodeURIComponent in Javacript.
-///
-// The resulting string must be freed by calling cef_string_userfree_free().
-CEF_EXPORT cef_string_userfree_t cef_uriencode(const cef_string_t* text,
- int use_plus);
-
-///
-// Unescapes |text| and returns the result. Unescaping consists of looking for
-// the exact pattern "%XX" where each X is a hex digit and converting to the
-// character with the numerical value of those digits (e.g. "i%20=%203%3b"
-// unescapes to "i = 3;"). If |convert_to_utf8| is true (1) this function will
-// attempt to interpret the initial decoded result as UTF-8. If the result is
-// convertable into UTF-8 it will be returned as converted. Otherwise the
-// initial decoded result will be returned. The |unescape_rule| parameter
-// supports further customization the decoding process.
-///
-// The resulting string must be freed by calling cef_string_userfree_free().
-CEF_EXPORT cef_string_userfree_t cef_uridecode(const cef_string_t* text,
- int convert_to_utf8, cef_uri_unescape_rule_t unescape_rule);
-
-///
-// Parses |string| which represents a CSS color value. If |strict| is true (1)
-// strict parsing rules will be applied. Returns true (1) on success or false
-// (0) on error. If parsing succeeds |color| will be set to the color value
-// otherwise |color| will remain unchanged.
-///
-CEF_EXPORT int cef_parse_csscolor(const cef_string_t* string, int strict,
- cef_color_t* color);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
+++ /dev/null
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// ---------------------------------------------------------------------------
-//
-// This file was generated by the CEF translator tool and should not edited
-// by hand. See the translator.README.txt file in the tools directory for
-// more information.
-//
-
-#ifndef CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_
-#define CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_
-#pragma once
-
-#include "include/capi/cef_base_capi.h"
-#include "include/capi/cef_browser_capi.h"
-#include "include/capi/cef_print_settings_capi.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-///
-// Callback structure for asynchronous continuation of print dialog requests.
-///
-typedef struct _cef_print_dialog_callback_t {
- ///
- // Base structure.
- ///
- cef_base_t base;
-
- ///
- // Continue printing with the specified |settings|.
- ///
- void (CEF_CALLBACK *cont)(struct _cef_print_dialog_callback_t* self,
- struct _cef_print_settings_t* settings);
-
- ///
- // Cancel the printing.
- ///
- void (CEF_CALLBACK *cancel)(struct _cef_print_dialog_callback_t* self);
-} cef_print_dialog_callback_t;
-
-
-///
-// Callback structure for asynchronous continuation of print job requests.
-///
-typedef struct _cef_print_job_callback_t {
- ///
- // Base structure.
- ///
- cef_base_t base;
-
- ///
- // Indicate completion of the print job.
- ///
- void (CEF_CALLBACK *cont)(struct _cef_print_job_callback_t* self);
-} cef_print_job_callback_t;
-
-
-///
-// Implement this structure to handle printing on Linux. The functions of this
-// structure will be called on the browser process UI thread.
-///
-typedef struct _cef_print_handler_t {
- ///
- // Base structure.
- ///
- cef_base_t base;
-
- ///
- // Synchronize |settings| with client state. If |get_defaults| is true (1)
- // then populate |settings| with the default print settings. Do not keep a
- // reference to |settings| outside of this callback.
- ///
- void (CEF_CALLBACK *on_print_settings)(struct _cef_print_handler_t* self,
- struct _cef_print_settings_t* settings, int get_defaults);
-
- ///
- // Show the print dialog. Execute |callback| once the dialog is dismissed.
- // Return true (1) if the dialog will be displayed or false (0) to cancel the
- // printing immediately.
- ///
- int (CEF_CALLBACK *on_print_dialog)(struct _cef_print_handler_t* self,
- int has_selection, struct _cef_print_dialog_callback_t* callback);
-
- ///
- // Send the print job to the printer. Execute |callback| once the job is
- // completed. Return true (1) if the job will proceed or false (0) to cancel
- // the job immediately.
- ///
- int (CEF_CALLBACK *on_print_job)(struct _cef_print_handler_t* self,
- const cef_string_t* document_name, const cef_string_t* pdf_file_path,
- struct _cef_print_job_callback_t* callback);
-
- ///
- // Reset client state related to printing.
- ///
- void (CEF_CALLBACK *on_print_reset)(struct _cef_print_handler_t* self);
-} cef_print_handler_t;
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_
+++ /dev/null
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// ---------------------------------------------------------------------------
-//
-// This file was generated by the CEF translator tool and should not edited
-// by hand. See the translator.README.txt file in the tools directory for
-// more information.
-//
-
-#ifndef CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_
-#define CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_
-#pragma once
-
-#include "include/capi/cef_base_capi.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-///
-// Structure representing print settings.
-///
-typedef struct _cef_print_settings_t {
- ///
- // Base structure.
- ///
- cef_base_t base;
-
- ///
- // Returns true (1) if this object is valid. Do not call any other functions
- // if this function returns false (0).
- ///
- int (CEF_CALLBACK *is_valid)(struct _cef_print_settings_t* self);
-
- ///
- // Returns true (1) if the values of this object are read-only. Some APIs may
- // expose read-only objects.
- ///
- int (CEF_CALLBACK *is_read_only)(struct _cef_print_settings_t* self);
-
- ///
- // Returns a writable copy of this object.
- ///
- struct _cef_print_settings_t* (CEF_CALLBACK *copy)(
- struct _cef_print_settings_t* self);
-
- ///
- // Set the page orientation.
- ///
- void (CEF_CALLBACK *set_orientation)(struct _cef_print_settings_t* self,
- int landscape);
-
- ///
- // Returns true (1) if the orientation is landscape.
- ///
- int (CEF_CALLBACK *is_landscape)(struct _cef_print_settings_t* self);
-
- ///
- // Set the printer printable area in device units. Some platforms already
- // provide flipped area. Set |landscape_needs_flip| to false (0) on those
- // platforms to avoid double flipping.
- ///
- void (CEF_CALLBACK *set_printer_printable_area)(
- struct _cef_print_settings_t* self,
- const cef_size_t* physical_size_device_units,
- const cef_rect_t* printable_area_device_units,
- int landscape_needs_flip);
-
- ///
- // Set the device name.
- ///
- void (CEF_CALLBACK *set_device_name)(struct _cef_print_settings_t* self,
- const cef_string_t* name);
-
- ///
- // Get the device name.
- ///
- // The resulting string must be freed by calling cef_string_userfree_free().
- cef_string_userfree_t (CEF_CALLBACK *get_device_name)(
- struct _cef_print_settings_t* self);
-
- ///
- // Set the DPI (dots per inch).
- ///
- void (CEF_CALLBACK *set_dpi)(struct _cef_print_settings_t* self, int dpi);
-
- ///
- // Get the DPI (dots per inch).
- ///
- int (CEF_CALLBACK *get_dpi)(struct _cef_print_settings_t* self);
-
- ///
- // Set the page ranges.
- ///
- void (CEF_CALLBACK *set_page_ranges)(struct _cef_print_settings_t* self,
- size_t rangesCount, cef_page_range_t const* ranges);
-
- ///
- // Returns the number of page ranges that currently exist.
- ///
- size_t (CEF_CALLBACK *get_page_ranges_count)(
- struct _cef_print_settings_t* self);
-
- ///
- // Retrieve the page ranges.
- ///
- void (CEF_CALLBACK *get_page_ranges)(struct _cef_print_settings_t* self,
- size_t* rangesCount, cef_page_range_t* ranges);
-
- ///
- // Set whether only the selection will be printed.
- ///
- void (CEF_CALLBACK *set_selection_only)(struct _cef_print_settings_t* self,
- int selection_only);
-
- ///
- // Returns true (1) if only the selection will be printed.
- ///
- int (CEF_CALLBACK *is_selection_only)(struct _cef_print_settings_t* self);
-
- ///
- // Set whether pages will be collated.
- ///
- void (CEF_CALLBACK *set_collate)(struct _cef_print_settings_t* self,
- int collate);
-
- ///
- // Returns true (1) if pages will be collated.
- ///
- int (CEF_CALLBACK *will_collate)(struct _cef_print_settings_t* self);
-
- ///
- // Set the color model.
- ///
- void (CEF_CALLBACK *set_color_model)(struct _cef_print_settings_t* self,
- cef_color_model_t model);
-
- ///
- // Get the color model.
- ///
- cef_color_model_t (CEF_CALLBACK *get_color_model)(
- struct _cef_print_settings_t* self);
-
- ///
- // Set the number of copies.
- ///
- void (CEF_CALLBACK *set_copies)(struct _cef_print_settings_t* self,
- int copies);
-
- ///
- // Get the number of copies.
- ///
- int (CEF_CALLBACK *get_copies)(struct _cef_print_settings_t* self);
-
- ///
- // Set the duplex mode.
- ///
- void (CEF_CALLBACK *set_duplex_mode)(struct _cef_print_settings_t* self,
- cef_duplex_mode_t mode);
-
- ///
- // Get the duplex mode.
- ///
- cef_duplex_mode_t (CEF_CALLBACK *get_duplex_mode)(
- struct _cef_print_settings_t* self);
-} cef_print_settings_t;
-
-
-///
-// Create a new cef_print_settings_t object.
-///
-CEF_EXPORT cef_print_settings_t* cef_print_settings_create();
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
#include "include/capi/cef_base_capi.h"
#include "include/capi/cef_browser_capi.h"
-#include "include/capi/cef_drag_data_capi.h"
#ifdef __cplusplus
extern "C" {
///
// Called when the browser wants to move or resize the popup widget. |rect|
- // contains the new location and size in view coordinates.
+ // contains the new location and size.
///
void (CEF_CALLBACK *on_popup_size)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, const cef_rect_t* rect);
///
- // Called when an element should be painted. Pixel values passed to this
- // function are scaled relative to view coordinates based on the value of
- // CefScreenInfo.device_scale_factor returned from GetScreenInfo. |type|
- // indicates whether the element is the view or the popup widget. |buffer|
- // contains the pixel data for the whole image. |dirtyRects| contains the set
- // of rectangles in pixel coordinates that need to be repainted. |buffer| will
- // be |width|*|height|*4 bytes in size and represents a BGRA image with an
- // upper-left origin.
+ // Called when an element should be painted. |type| indicates whether the
+ // element is the view or the popup widget. |buffer| contains the pixel data
+ // for the whole image. |dirtyRects| contains the set of rectangles that need
+ // to be repainted. On Windows |buffer| will be |width|*|height|*4 bytes in
+ // size and represents a BGRA image with an upper-left origin.
///
void (CEF_CALLBACK *on_paint)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, cef_paint_element_type_t type,
int width, int height);
///
- // Called when the browser's cursor has changed. If |type| is CT_CUSTOM then
- // |custom_cursor_info| will be populated with the custom cursor information.
+ // Called when the browser window's cursor has changed.
///
void (CEF_CALLBACK *on_cursor_change)(struct _cef_render_handler_t* self,
- struct _cef_browser_t* browser, cef_cursor_handle_t cursor,
- cef_cursor_type_t type,
- const struct _cef_cursor_info_t* custom_cursor_info);
-
- ///
- // Called when the user starts dragging content in the web view. Contextual
- // information about the dragged content is supplied by |drag_data|. (|x|,
- // |y|) is the drag start location in screen coordinates. OS APIs that run a
- // system message loop may be used within the StartDragging call.
- //
- // Return false (0) to abort the drag operation. Don't call any of
- // cef_browser_host_t::DragSource*Ended* functions after returning false (0).
- //
- // Return true (1) to handle the drag operation. Call
- // cef_browser_host_t::DragSourceEndedAt and DragSourceSystemDragEnded either
- // synchronously or asynchronously to inform the web view that the drag
- // operation has ended.
- ///
- int (CEF_CALLBACK *start_dragging)(struct _cef_render_handler_t* self,
- struct _cef_browser_t* browser, struct _cef_drag_data_t* drag_data,
- cef_drag_operations_mask_t allowed_ops, int x, int y);
-
- ///
- // Called when the web view wants to update the mouse cursor during a drag &
- // drop operation. |operation| describes the allowed operation (none, move,
- // copy, link).
- ///
- void (CEF_CALLBACK *update_drag_cursor)(struct _cef_render_handler_t* self,
- struct _cef_browser_t* browser, cef_drag_operations_mask_t operation);
+ struct _cef_browser_t* browser, cef_cursor_handle_t cursor);
///
// Called when the scroll offset has changed.
///
void (CEF_CALLBACK *on_scroll_offset_changed)(
- struct _cef_render_handler_t* self, struct _cef_browser_t* browser,
- double x, double y);
+ struct _cef_render_handler_t* self, struct _cef_browser_t* browser);
} cef_render_handler_t;
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
const cef_string_t* url);
///
- // Get the resource type for this request. Only available in the browser
- // process.
+ // Get the resource type for this request. Accurate resource type information
+ // may only be available in the browser process.
///
cef_resource_type_t (CEF_CALLBACK *get_resource_type)(
struct _cef_request_t* self);
///
cef_transition_type_t (CEF_CALLBACK *get_transition_type)(
struct _cef_request_t* self);
-
- ///
- // Returns the globally unique identifier for this request or 0 if not
- // specified. Can be used by cef_request_tHandler implementations in the
- // browser process to track a single request across multiple callbacks.
- ///
- uint64 (CEF_CALLBACK *get_identifier)(struct _cef_request_t* self);
} cef_request_t;
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
#define CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_
#pragma once
-#include "include/capi/cef_cookie_capi.h"
#include "include/capi/cef_request_context_handler_capi.h"
#ifdef __cplusplus
extern "C" {
#endif
-struct _cef_scheme_handler_factory_t;
///
-// A request context provides request handling for a set of related browser or
-// URL request objects. A request context can be specified when creating a new
-// browser via the cef_browser_host_t static factory functions or when creating
-// a new URL request via the cef_urlrequest_t static factory functions. Browser
-// objects with different request contexts will never be hosted in the same
-// render process. Browser objects with the same request context may or may not
-// be hosted in the same render process depending on the process model. Browser
-// objects created indirectly via the JavaScript window.open function or
-// targeted links will share the same render process and the same request
-// context as the source browser. When running in single-process mode there is
-// only a single render process (the main process) and so all browsers created
-// in single-process mode will share the same request context. This will be the
-// first request context passed into a cef_browser_host_t static factory
-// function and all other request context objects will be ignored.
+// A request context provides request handling for a set of related browser
+// objects. A request context is specified when creating a new browser object
+// via the cef_browser_host_t static factory functions. Browser objects with
+// different request contexts will never be hosted in the same render process.
+// Browser objects with the same request context may or may not be hosted in the
+// same render process depending on the process model. Browser objects created
+// indirectly via the JavaScript window.open function or targeted links will
+// share the same render process and the same request context as the source
+// browser. When running in single-process mode there is only a single render
+// process (the main process) and so all browsers created in single-process mode
+// will share the same request context. This will be the first request context
+// passed into a cef_browser_host_t static factory function and all other
+// request context objects will be ignored.
///
typedef struct _cef_request_context_t {
///
struct _cef_request_context_t* other);
///
- // Returns true (1) if this object is sharing the same storage as |that|
- // object.
- ///
- int (CEF_CALLBACK *is_sharing_with)(struct _cef_request_context_t* self,
- struct _cef_request_context_t* other);
-
- ///
- // Returns true (1) if this object is the global context. The global context
- // is used by default when creating a browser or URL request with a NULL
- // context argument.
+ // Returns true (1) if this object is the global context.
///
int (CEF_CALLBACK *is_global)(struct _cef_request_context_t* self);
///
struct _cef_request_context_handler_t* (CEF_CALLBACK *get_handler)(
struct _cef_request_context_t* self);
-
- ///
- // Returns the cache path for this object. If NULL an "incognito mode" in-
- // memory cache is being used.
- ///
- // The resulting string must be freed by calling cef_string_userfree_free().
- cef_string_userfree_t (CEF_CALLBACK *get_cache_path)(
- struct _cef_request_context_t* self);
-
- ///
- // Returns the default cookie manager for this object. This will be the global
- // cookie manager if this object is the global request context. Otherwise,
- // this will be the default cookie manager used when this request context does
- // not receive a value via cef_request_tContextHandler::get_cookie_manager().
- // If |callback| is non-NULL it will be executed asnychronously on the IO
- // thread after the manager's storage has been initialized.
- ///
- struct _cef_cookie_manager_t* (CEF_CALLBACK *get_default_cookie_manager)(
- struct _cef_request_context_t* self,
- struct _cef_completion_callback_t* callback);
-
- ///
- // Register a scheme handler factory for the specified |scheme_name| and
- // optional |domain_name|. An NULL |domain_name| value for a standard scheme
- // will cause the factory to match all domain names. The |domain_name| value
- // will be ignored for non-standard schemes. If |scheme_name| is a built-in
- // scheme and no handler is returned by |factory| then the built-in scheme
- // handler factory will be called. If |scheme_name| is a custom scheme then
- // you must also implement the cef_app_t::on_register_custom_schemes()
- // function in all processes. This function may be called multiple times to
- // change or remove the factory that matches the specified |scheme_name| and
- // optional |domain_name|. Returns false (0) if an error occurs. This function
- // may be called on any thread in the browser process.
- ///
- int (CEF_CALLBACK *register_scheme_handler_factory)(
- struct _cef_request_context_t* self, const cef_string_t* scheme_name,
- const cef_string_t* domain_name,
- struct _cef_scheme_handler_factory_t* factory);
-
- ///
- // Clear all registered scheme handler factories. Returns false (0) on error.
- // This function may be called on any thread in the browser process.
- ///
- int (CEF_CALLBACK *clear_scheme_handler_factories)(
- struct _cef_request_context_t* self);
} cef_request_context_t;
CEF_EXPORT cef_request_context_t* cef_request_context_get_global_context();
///
-// Creates a new context object with the specified |settings| and optional
-// |handler|.
+// Creates a new context object with the specified handler.
///
CEF_EXPORT cef_request_context_t* cef_request_context_create_context(
- const struct _cef_request_context_settings_t* settings,
- struct _cef_request_context_handler_t* handler);
-
-///
-// Creates a new context object that shares storage with |other| and uses an
-// optional |handler|.
-///
-CEF_EXPORT cef_request_context_t* create_context_shared(
- cef_request_context_t* other,
struct _cef_request_context_handler_t* handler);
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
///
-// Implement this structure to provide handler implementations. The handler
-// instance will not be released until all objects related to the context have
-// been destroyed.
+// Implement this structure to provide handler implementations.
///
typedef struct _cef_request_context_handler_t {
///
cef_base_t base;
///
- // Called on the IO thread to retrieve the cookie manager. If this function
- // returns NULL the default cookie manager retrievable via
- // cef_request_tContext::get_default_cookie_manager() will be used.
+ // Called on the IO thread to retrieve the cookie manager. The global cookie
+ // manager will be used if this function returns NULL.
///
struct _cef_cookie_manager_t* (CEF_CALLBACK *get_cookie_manager)(
struct _cef_request_context_handler_t* self);
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
#include "include/capi/cef_request_capi.h"
#include "include/capi/cef_resource_handler_capi.h"
#include "include/capi/cef_response_capi.h"
-#include "include/capi/cef_ssl_info_capi.h"
#include "include/capi/cef_web_plugin_capi.h"
#ifdef __cplusplus
///
-// Callback structure used for asynchronous continuation of url requests.
+// Callback structure used for asynchronous continuation of quota requests.
///
-typedef struct _cef_request_callback_t {
+typedef struct _cef_quota_callback_t {
///
// Base structure.
///
cef_base_t base;
///
- // Continue the url request. If |allow| is true (1) the request will be
- // continued. Otherwise, the request will be canceled.
+ // Continue the quota request. If |allow| is true (1) the request will be
+ // allowed. Otherwise, the request will be denied.
+ ///
+ void (CEF_CALLBACK *cont)(struct _cef_quota_callback_t* self, int allow);
+
///
- void (CEF_CALLBACK *cont)(struct _cef_request_callback_t* self, int allow);
+ // Cancel the quota request.
+ ///
+ void (CEF_CALLBACK *cancel)(struct _cef_quota_callback_t* self);
+} cef_quota_callback_t;
+
+
+///
+// Callback structure used for asynchronous continuation of url requests when
+// invalid SSL certificates are encountered.
+///
+typedef struct _cef_allow_certificate_error_callback_t {
+ ///
+ // Base structure.
+ ///
+ cef_base_t base;
///
- // Cancel the url request.
+ // Continue the url request. If |allow| is true (1) the request will be
+ // continued. Otherwise, the request will be canceled.
///
- void (CEF_CALLBACK *cancel)(struct _cef_request_callback_t* self);
-} cef_request_callback_t;
+ void (CEF_CALLBACK *cont)(
+ struct _cef_allow_certificate_error_callback_t* self, int allow);
+} cef_allow_certificate_error_callback_t;
///
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
struct _cef_request_t* request, int is_redirect);
- ///
- // Called on the UI thread before OnBeforeBrowse in certain limited cases
- // where navigating a new or different browser might be desirable. This
- // includes user-initiated navigation that might open in a special way (e.g.
- // links clicked via middle-click or ctrl + left-click) and certain types of
- // cross-origin navigation initiated from the renderer process (e.g.
- // navigating the top-level frame to/from a file URL). The |browser| and
- // |frame| values represent the source of the navigation. The
- // |target_disposition| value indicates where the user intended to navigate
- // the browser based on standard Chromium behaviors (e.g. current tab, new
- // tab, etc). The |user_gesture| value will be true (1) if the browser
- // navigated via explicit user gesture (e.g. clicking a link) or false (0) if
- // it navigated automatically (e.g. via the DomContentLoaded event). Return
- // true (1) to cancel the navigation or false (0) to allow the navigation to
- // proceed in the source browser's top-level frame.
- ///
- int (CEF_CALLBACK *on_open_urlfrom_tab)(struct _cef_request_handler_t* self,
- struct _cef_browser_t* browser, struct _cef_frame_t* frame,
- const cef_string_t* target_url,
- cef_window_open_disposition_t target_disposition, int user_gesture);
-
///
// Called on the IO thread before a resource request is loaded. The |request|
- // object may be modified. Return RV_CONTINUE to continue the request
- // immediately. Return RV_CONTINUE_ASYNC and call cef_request_tCallback::
- // cont() at a later time to continue or cancel the request asynchronously.
- // Return RV_CANCEL to cancel the request immediately.
- //
+ // object may be modified. To cancel the request return true (1) otherwise
+ // return false (0).
///
- cef_return_value_t (CEF_CALLBACK *on_before_resource_load)(
+ int (CEF_CALLBACK *on_before_resource_load)(
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
- struct _cef_frame_t* frame, struct _cef_request_t* request,
- struct _cef_request_callback_t* callback);
+ struct _cef_frame_t* frame, struct _cef_request_t* request);
///
// Called on the IO thread before a resource is loaded. To allow the resource
struct _cef_frame_t* frame, struct _cef_request_t* request);
///
- // Called on the IO thread when a resource load is redirected. The |request|
- // parameter will contain the old URL and other request-related information.
- // The |new_url| parameter will contain the new URL and can be changed if
- // desired. The |request| object cannot be modified in this callback.
+ // Called on the IO thread when a resource load is redirected. The |old_url|
+ // parameter will contain the old URL. The |new_url| parameter will contain
+ // the new URL and can be changed if desired.
///
void (CEF_CALLBACK *on_resource_redirect)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
- struct _cef_request_t* request, cef_string_t* new_url);
-
- ///
- // Called on the IO thread when a resource response is received. To allow the
- // resource to load normally return false (0). To redirect or retry the
- // resource modify |request| (url, headers or post body) and return true (1).
- // The |response| object cannot be modified in this callback.
- ///
- int (CEF_CALLBACK *on_resource_response)(struct _cef_request_handler_t* self,
- struct _cef_browser_t* browser, struct _cef_frame_t* frame,
- struct _cef_request_t* request, struct _cef_response_t* response);
+ const cef_string_t* old_url, cef_string_t* new_url);
///
// Called on the IO thread when the browser needs credentials from the user.
// |isProxy| indicates whether the host is a proxy server. |host| contains the
// hostname and |port| contains the port number. Return true (1) to continue
- // the request and call cef_auth_callback_t::cont() either in this function or
- // at a later time when the authentication information is available. Return
- // false (0) to cancel the request immediately.
+ // the request and call cef_auth_callback_t::cont() when the authentication
+ // information is available. Return false (0) to cancel the request.
///
int (CEF_CALLBACK *get_auth_credentials)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame, int isProxy,
// Called on the IO thread when JavaScript requests a specific storage quota
// size via the webkitStorageInfo.requestQuota function. |origin_url| is the
// origin of the page making the request. |new_size| is the requested quota
- // size in bytes. Return true (1) to continue the request and call
- // cef_request_tCallback::cont() either in this function or at a later time to
- // grant or deny the request. Return false (0) to cancel the request
- // immediately.
+ // size in bytes. Return true (1) and call cef_quota_callback_t::cont() either
+ // in this function or at a later time to grant or deny the request. Return
+ // false (0) to cancel the request.
///
int (CEF_CALLBACK *on_quota_request)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* origin_url,
- int64 new_size, struct _cef_request_callback_t* callback);
+ int64 new_size, struct _cef_quota_callback_t* callback);
///
// Called on the UI thread to handle requests for URLs with an unknown
///
// Called on the UI thread to handle requests for URLs with an invalid SSL
- // certificate. Return true (1) and call cef_request_tCallback::cont() either
- // in this function or at a later time to continue or cancel the request.
- // Return false (0) to cancel the request immediately. If |callback| is NULL
- // the error cannot be recovered from and the request will be canceled
- // automatically. If CefSettings.ignore_certificate_errors is set all invalid
- // certificates will be accepted without calling this function.
+ // certificate. Return true (1) and call
+ // cef_allow_certificate_error_callback_t:: cont() either in this function or
+ // at a later time to continue or cancel the request. Return false (0) to
+ // cancel the request immediately. If |callback| is NULL the error cannot be
+ // recovered from and the request will be canceled automatically. If
+ // CefSettings.ignore_certificate_errors is set all invalid certificates will
+ // be accepted without calling this function.
///
int (CEF_CALLBACK *on_certificate_error)(struct _cef_request_handler_t* self,
- struct _cef_browser_t* browser, cef_errorcode_t cert_error,
- const cef_string_t* request_url, struct _cef_sslinfo_t* ssl_info,
- struct _cef_request_callback_t* callback);
+ cef_errorcode_t cert_error, const cef_string_t* request_url,
+ struct _cef_allow_certificate_error_callback_t* callback);
///
// Called on the browser process IO thread before a plugin is loaded. Return
void (CEF_CALLBACK *on_plugin_crashed)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* plugin_path);
- ///
- // Called on the browser process UI thread when the render view associated
- // with |browser| is ready to receive/handle IPC messages in the render
- // process.
- ///
- void (CEF_CALLBACK *on_render_view_ready)(struct _cef_request_handler_t* self,
- struct _cef_browser_t* browser);
-
///
// Called on the browser process UI thread when the render process terminates
// unexpectedly. |status| indicates how the process terminated.
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
///
-// Register a scheme handler factory with the global request context. An NULL
-// |domain_name| value for a standard scheme will cause the factory to match all
-// domain names. The |domain_name| value will be ignored for non-standard
-// schemes. If |scheme_name| is a built-in scheme and no handler is returned by
-// |factory| then the built-in scheme handler factory will be called. If
-// |scheme_name| is a custom scheme then you must also implement the
-// cef_app_t::on_register_custom_schemes() function in all processes. This
-// function may be called multiple times to change or remove the factory that
-// matches the specified |scheme_name| and optional |domain_name|. Returns false
-// (0) if an error occurs. This function may be called on any thread in the
-// browser process. Using this function is equivalent to calling cef_request_tCo
-// ntext::cef_request_context_get_global_context()->register_scheme_handler_fact
-// ory().
+// Register a scheme handler factory for the specified |scheme_name| and
+// optional |domain_name|. An NULL |domain_name| value for a standard scheme
+// will cause the factory to match all domain names. The |domain_name| value
+// will be ignored for non-standard schemes. If |scheme_name| is a built-in
+// scheme and no handler is returned by |factory| then the built-in scheme
+// handler factory will be called. If |scheme_name| is a custom scheme then also
+// implement the cef_app_t::on_register_custom_schemes() function in all
+// processes. This function may be called multiple times to change or remove the
+// factory that matches the specified |scheme_name| and optional |domain_name|.
+// Returns false (0) if an error occurs. This function may be called on any
+// thread in the browser process.
///
CEF_EXPORT int cef_register_scheme_handler_factory(
const cef_string_t* scheme_name, const cef_string_t* domain_name,
cef_scheme_handler_factory_t* factory);
///
-// Clear all scheme handler factories registered with the global request
-// context. Returns false (0) on error. This function may be called on any
-// thread in the browser process. Using this function is equivalent to calling c
-// ef_request_tContext::cef_request_context_get_global_context()->clear_scheme_h
-// andler_factories().
+// Clear all registered scheme handler factories. Returns false (0) on error.
+// This function may be called on any thread in the browser process.
///
CEF_EXPORT int cef_clear_scheme_handler_factories();
+++ /dev/null
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// ---------------------------------------------------------------------------
-//
-// This file was generated by the CEF translator tool and should not edited
-// by hand. See the translator.README.txt file in the tools directory for
-// more information.
-//
-
-#ifndef CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_
-#define CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_
-#pragma once
-
-#include "include/capi/cef_base_capi.h"
-#include "include/capi/cef_values_capi.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-///
-// Structure representing the issuer or subject field of an X.509 certificate.
-///
-typedef struct _cef_sslcert_principal_t {
- ///
- // Base structure.
- ///
- cef_base_t base;
-
- ///
- // Returns a name that can be used to represent the issuer. It tries in this
- // order: CN, O and OU and returns the first non-NULL one found.
- ///
- // The resulting string must be freed by calling cef_string_userfree_free().
- cef_string_userfree_t (CEF_CALLBACK *get_display_name)(
- struct _cef_sslcert_principal_t* self);
-
- ///
- // Returns the common name.
- ///
- // The resulting string must be freed by calling cef_string_userfree_free().
- cef_string_userfree_t (CEF_CALLBACK *get_common_name)(
- struct _cef_sslcert_principal_t* self);
-
- ///
- // Returns the locality name.
- ///
- // The resulting string must be freed by calling cef_string_userfree_free().
- cef_string_userfree_t (CEF_CALLBACK *get_locality_name)(
- struct _cef_sslcert_principal_t* self);
-
- ///
- // Returns the state or province name.
- ///
- // The resulting string must be freed by calling cef_string_userfree_free().
- cef_string_userfree_t (CEF_CALLBACK *get_state_or_province_name)(
- struct _cef_sslcert_principal_t* self);
-
- ///
- // Returns the country name.
- ///
- // The resulting string must be freed by calling cef_string_userfree_free().
- cef_string_userfree_t (CEF_CALLBACK *get_country_name)(
- struct _cef_sslcert_principal_t* self);
-
- ///
- // Retrieve the list of street addresses.
- ///
- void (CEF_CALLBACK *get_street_addresses)(
- struct _cef_sslcert_principal_t* self, cef_string_list_t addresses);
-
- ///
- // Retrieve the list of organization names.
- ///
- void (CEF_CALLBACK *get_organization_names)(
- struct _cef_sslcert_principal_t* self, cef_string_list_t names);
-
- ///
- // Retrieve the list of organization unit names.
- ///
- void (CEF_CALLBACK *get_organization_unit_names)(
- struct _cef_sslcert_principal_t* self, cef_string_list_t names);
-
- ///
- // Retrieve the list of domain components.
- ///
- void (CEF_CALLBACK *get_domain_components)(
- struct _cef_sslcert_principal_t* self, cef_string_list_t components);
-} cef_sslcert_principal_t;
-
-
-///
-// Structure representing SSL information.
-///
-typedef struct _cef_sslinfo_t {
- ///
- // Base structure.
- ///
- cef_base_t base;
-
- ///
- // Returns the subject of the X.509 certificate. For HTTPS server certificates
- // this represents the web server. The common name of the subject should
- // match the host name of the web server.
- ///
- struct _cef_sslcert_principal_t* (CEF_CALLBACK *get_subject)(
- struct _cef_sslinfo_t* self);
-
- ///
- // Returns the issuer of the X.509 certificate.
- ///
- struct _cef_sslcert_principal_t* (CEF_CALLBACK *get_issuer)(
- struct _cef_sslinfo_t* self);
-
- ///
- // Returns the DER encoded serial number for the X.509 certificate. The value
- // possibly includes a leading 00 byte.
- ///
- struct _cef_binary_value_t* (CEF_CALLBACK *get_serial_number)(
- struct _cef_sslinfo_t* self);
-
- ///
- // Returns the date before which the X.509 certificate is invalid.
- // CefTime.GetTimeT() will return 0 if no date was specified.
- ///
- cef_time_t (CEF_CALLBACK *get_valid_start)(struct _cef_sslinfo_t* self);
-
- ///
- // Returns the date after which the X.509 certificate is invalid.
- // CefTime.GetTimeT() will return 0 if no date was specified.
- ///
- cef_time_t (CEF_CALLBACK *get_valid_expiry)(struct _cef_sslinfo_t* self);
-
- ///
- // Returns the DER encoded data for the X.509 certificate.
- ///
- struct _cef_binary_value_t* (CEF_CALLBACK *get_derencoded)(
- struct _cef_sslinfo_t* self);
-
- ///
- // Returns the PEM encoded data for the X.509 certificate.
- ///
- struct _cef_binary_value_t* (CEF_CALLBACK *get_pemencoded)(
- struct _cef_sslinfo_t* self);
-} cef_sslinfo_t;
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
///
// Returns true (1) if called on the specified thread. Equivalent to using
-// cef_task_tRunner::GetForThread(threadId)->belongs_to_current_thread().
+// cef_task_runner_t::GetForThread(threadId)->belongs_to_current_thread().
///
CEF_EXPORT int cef_currently_on(cef_thread_id_t threadId);
///
// Post a task for execution on the specified thread. Equivalent to using
-// cef_task_tRunner::GetForThread(threadId)->PostTask(task).
+// cef_task_runner_t::GetForThread(threadId)->PostTask(task).
///
CEF_EXPORT int cef_post_task(cef_thread_id_t threadId, cef_task_t* task);
///
// Post a task for delayed execution on the specified thread. Equivalent to
-// using cef_task_tRunner::GetForThread(threadId)->PostDelayedTask(task,
+// using cef_task_runner_t::GetForThread(threadId)->PostDelayedTask(task,
// delay_ms).
///
CEF_EXPORT int cef_post_delayed_task(cef_thread_id_t threadId, cef_task_t* task,
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
#pragma once
#include "include/capi/cef_base_capi.h"
-#include "include/capi/cef_callback_capi.h"
#ifdef __cplusplus
extern "C" {
///
-// Start tracing events on all processes. Tracing is initialized asynchronously
-// and |callback| will be executed on the UI thread after initialization is
-// complete.
+// Start tracing events on all processes. Tracing begins immediately locally,
+// and asynchronously on child processes as soon as they receive the
+// BeginTracing request.
//
// If CefBeginTracing was called previously, or if a CefEndTracingAsync call is
// pending, CefBeginTracing will fail and return false (0).
//
// This function must be called on the browser process UI thread.
///
-CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories,
- struct _cef_completion_callback_t* callback);
+CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories);
///
// Stop tracing events on all processes.
//
// This function must be called on the browser process UI thread.
///
-CEF_EXPORT int cef_end_tracing(const cef_string_t* tracing_file,
+CEF_EXPORT int cef_end_tracing_async(const cef_string_t* tracing_file,
cef_end_tracing_callback_t* callback);
///
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// more information.
//
-#ifndef CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_
-#define CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_
+#ifndef CEF_INCLUDE_CAPI_CEF_URL_CAPI_H_
+#define CEF_INCLUDE_CAPI_CEF_URL_CAPI_H_
#pragma once
#include "include/capi/cef_base_capi.h"
-#include "include/capi/cef_browser_capi.h"
#ifdef __cplusplus
extern "C" {
///
-// Implement this structure to handle events related to find results. The
-// functions of this structure will be called on the UI thread.
+// Parse the specified |url| into its component parts. Returns false (0) if the
+// URL is NULL or invalid.
///
-typedef struct _cef_find_handler_t {
- ///
- // Base structure.
- ///
- cef_base_t base;
+CEF_EXPORT int cef_parse_url(const cef_string_t* url,
+ struct _cef_urlparts_t* parts);
- ///
- // Called to report find results returned by cef_browser_host_t::find().
- // |identifer| is the identifier passed to find(), |count| is the number of
- // matches currently identified, |selectionRect| is the location of where the
- // match was found (in window coordinates), |activeMatchOrdinal| is the
- // current position in the search results, and |finalUpdate| is true (1) if
- // this is the last find notification.
- ///
- void (CEF_CALLBACK *on_find_result)(struct _cef_find_handler_t* self,
- struct _cef_browser_t* browser, int identifier, int count,
- const cef_rect_t* selectionRect, int activeMatchOrdinal,
- int finalUpdate);
-} cef_find_handler_t;
+///
+// Creates a URL from the specified |parts|, which must contain a non-NULL spec
+// or a non-NULL host and path (at a minimum), but not both. Returns false (0)
+// if |parts| isn't initialized as described.
+///
+CEF_EXPORT int cef_create_url(const struct _cef_urlparts_t* parts,
+ cef_string_t* url);
+///
+// Returns the mime type for the specified file extension or an NULL string if
+// unknown.
+///
+// The resulting string must be freed by calling cef_string_userfree_free().
+CEF_EXPORT cef_string_userfree_t cef_get_mime_type(
+ const cef_string_t* extension);
#ifdef __cplusplus
}
#endif
-#endif // CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_
+#endif // CEF_INCLUDE_CAPI_CEF_URL_CAPI_H_
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
#include "include/capi/cef_auth_callback_capi.h"
#include "include/capi/cef_base_capi.h"
#include "include/capi/cef_request_capi.h"
-#include "include/capi/cef_request_context_capi.h"
#include "include/capi/cef_response_capi.h"
#ifdef __cplusplus
// not normally be rendered then the response may receive special handling
// inside the browser (for example, via the file download code path instead of
// the URL request code path). The |request| object will be marked as read-only
-// after calling this function. In the browser process if |request_context| is
-// NULL the global request context will be used. In the render process
-// |request_context| must be NULL and the context associated with the current
-// renderer process' browser will be used.
+// after calling this function.
///
CEF_EXPORT cef_urlrequest_t* cef_urlrequest_create(
- struct _cef_request_t* request, struct _cef_urlrequest_client_t* client,
- struct _cef_request_context_t* request_context);
+ struct _cef_request_t* request, struct _cef_urlrequest_client_t* client);
///
// UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
///
void (CEF_CALLBACK *on_upload_progress)(struct _cef_urlrequest_client_t* self,
- struct _cef_urlrequest_t* request, int64 current, int64 total);
+ struct _cef_urlrequest_t* request, uint64 current, uint64 total);
///
// Notifies the client of download progress. |current| denotes the number of
///
void (CEF_CALLBACK *on_download_progress)(
struct _cef_urlrequest_client_t* self, struct _cef_urlrequest_t* request,
- int64 current, int64 total);
+ uint64 current, uint64 total);
///
// Called when some part of the response is read. |data| contains the current
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
///
// Structure that should be implemented to handle V8 accessor calls. Accessor
-// identifiers are registered by calling cef_v8value_t::set_value(). The
-// functions of this structure will be called on the thread associated with the
-// V8 accessor.
+// identifiers are registered by calling cef_v8value_t::set_value_byaccessor().
+// The functions of this structure will be called on the thread associated with
+// the V8 accessor.
///
typedef struct _cef_v8accessor_t {
///
///
// Create a new cef_v8value_t object of type Date. This function should only be
-// called from within the scope of a cef_render_process_handler_t,
-// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling
-// enter() and exit() on a stored cef_v8context_t reference.
+// called from within the scope of a cef_v8context_tHandler, cef_v8handler_t or
+// cef_v8accessor_t callback, or in combination with calling enter() and exit()
+// on a stored cef_v8context_t reference.
///
CEF_EXPORT cef_v8value_t* cef_v8value_create_date(const cef_time_t* date);
///
// Create a new cef_v8value_t object of type object with optional accessor. This
// function should only be called from within the scope of a
-// cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback,
-// or in combination with calling enter() and exit() on a stored cef_v8context_t
+// cef_v8context_tHandler, cef_v8handler_t or cef_v8accessor_t callback, or in
+// combination with calling enter() and exit() on a stored cef_v8context_t
// reference.
///
CEF_EXPORT cef_v8value_t* cef_v8value_create_object(cef_v8accessor_t* accessor);
///
// Create a new cef_v8value_t object of type array with the specified |length|.
// If |length| is negative the returned array will have length 0. This function
-// should only be called from within the scope of a
-// cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback,
-// or in combination with calling enter() and exit() on a stored cef_v8context_t
-// reference.
+// should only be called from within the scope of a cef_v8context_tHandler,
+// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling
+// enter() and exit() on a stored cef_v8context_t reference.
///
CEF_EXPORT cef_v8value_t* cef_v8value_create_array(int length);
///
// Create a new cef_v8value_t object of type function. This function should only
-// be called from within the scope of a cef_render_process_handler_t,
-// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling
-// enter() and exit() on a stored cef_v8context_t reference.
+// be called from within the scope of a cef_v8context_tHandler, cef_v8handler_t
+// or cef_v8accessor_t callback, or in combination with calling enter() and
+// exit() on a stored cef_v8context_t reference.
///
CEF_EXPORT cef_v8value_t* cef_v8value_create_function(const cef_string_t* name,
cef_v8handler_t* handler);
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
extern "C" {
#endif
-struct _cef_binary_value_t;
struct _cef_dictionary_value_t;
struct _cef_list_value_t;
-///
-// Structure that wraps other data value types. Complex types (binary,
-// dictionary and list) will be referenced but not owned by this object. Can be
-// used on any process and thread.
-///
-typedef struct _cef_value_t {
- ///
- // Base structure.
- ///
- cef_base_t base;
-
- ///
- // Returns true (1) if the underlying data is valid. This will always be true
- // (1) for simple types. For complex types (binary, dictionary and list) the
- // underlying data may become invalid if owned by another object (e.g. list or
- // dictionary) and that other object is then modified or destroyed. This value
- // object can be re-used by calling Set*() even if the underlying data is
- // invalid.
- ///
- int (CEF_CALLBACK *is_valid)(struct _cef_value_t* self);
-
- ///
- // Returns true (1) if the underlying data is owned by another object.
- ///
- int (CEF_CALLBACK *is_owned)(struct _cef_value_t* self);
-
- ///
- // Returns true (1) if the underlying data is read-only. Some APIs may expose
- // read-only objects.
- ///
- int (CEF_CALLBACK *is_read_only)(struct _cef_value_t* self);
-
- ///
- // Returns true (1) if this object and |that| object have the same underlying
- // data. If true (1) modifications to this object will also affect |that|
- // object and vice-versa.
- ///
- int (CEF_CALLBACK *is_same)(struct _cef_value_t* self,
- struct _cef_value_t* that);
-
- ///
- // Returns true (1) if this object and |that| object have an equivalent
- // underlying value but are not necessarily the same object.
- ///
- int (CEF_CALLBACK *is_equal)(struct _cef_value_t* self,
- struct _cef_value_t* that);
-
- ///
- // Returns a copy of this object. The underlying data will also be copied.
- ///
- struct _cef_value_t* (CEF_CALLBACK *copy)(struct _cef_value_t* self);
-
- ///
- // Returns the underlying value type.
- ///
- cef_value_type_t (CEF_CALLBACK *get_type)(struct _cef_value_t* self);
-
- ///
- // Returns the underlying value as type bool.
- ///
- int (CEF_CALLBACK *get_bool)(struct _cef_value_t* self);
-
- ///
- // Returns the underlying value as type int.
- ///
- int (CEF_CALLBACK *get_int)(struct _cef_value_t* self);
-
- ///
- // Returns the underlying value as type double.
- ///
- double (CEF_CALLBACK *get_double)(struct _cef_value_t* self);
-
- ///
- // Returns the underlying value as type string.
- ///
- // The resulting string must be freed by calling cef_string_userfree_free().
- cef_string_userfree_t (CEF_CALLBACK *get_string)(struct _cef_value_t* self);
-
- ///
- // Returns the underlying value as type binary. The returned reference may
- // become invalid if the value is owned by another object or if ownership is
- // transferred to another object in the future. To maintain a reference to the
- // value after assigning ownership to a dictionary or list pass this object to
- // the set_value() function instead of passing the returned reference to
- // set_binary().
- ///
- struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)(
- struct _cef_value_t* self);
-
- ///
- // Returns the underlying value as type dictionary. The returned reference may
- // become invalid if the value is owned by another object or if ownership is
- // transferred to another object in the future. To maintain a reference to the
- // value after assigning ownership to a dictionary or list pass this object to
- // the set_value() function instead of passing the returned reference to
- // set_dictionary().
- ///
- struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)(
- struct _cef_value_t* self);
-
- ///
- // Returns the underlying value as type list. The returned reference may
- // become invalid if the value is owned by another object or if ownership is
- // transferred to another object in the future. To maintain a reference to the
- // value after assigning ownership to a dictionary or list pass this object to
- // the set_value() function instead of passing the returned reference to
- // set_list().
- ///
- struct _cef_list_value_t* (CEF_CALLBACK *get_list)(struct _cef_value_t* self);
-
- ///
- // Sets the underlying value as type null. Returns true (1) if the value was
- // set successfully.
- ///
- int (CEF_CALLBACK *set_null)(struct _cef_value_t* self);
-
- ///
- // Sets the underlying value as type bool. Returns true (1) if the value was
- // set successfully.
- ///
- int (CEF_CALLBACK *set_bool)(struct _cef_value_t* self, int value);
-
- ///
- // Sets the underlying value as type int. Returns true (1) if the value was
- // set successfully.
- ///
- int (CEF_CALLBACK *set_int)(struct _cef_value_t* self, int value);
-
- ///
- // Sets the underlying value as type double. Returns true (1) if the value was
- // set successfully.
- ///
- int (CEF_CALLBACK *set_double)(struct _cef_value_t* self, double value);
-
- ///
- // Sets the underlying value as type string. Returns true (1) if the value was
- // set successfully.
- ///
- int (CEF_CALLBACK *set_string)(struct _cef_value_t* self,
- const cef_string_t* value);
-
- ///
- // Sets the underlying value as type binary. Returns true (1) if the value was
- // set successfully. This object keeps a reference to |value| and ownership of
- // the underlying data remains unchanged.
- ///
- int (CEF_CALLBACK *set_binary)(struct _cef_value_t* self,
- struct _cef_binary_value_t* value);
-
- ///
- // Sets the underlying value as type dict. Returns true (1) if the value was
- // set successfully. This object keeps a reference to |value| and ownership of
- // the underlying data remains unchanged.
- ///
- int (CEF_CALLBACK *set_dictionary)(struct _cef_value_t* self,
- struct _cef_dictionary_value_t* value);
-
- ///
- // Sets the underlying value as type list. Returns true (1) if the value was
- // set successfully. This object keeps a reference to |value| and ownership of
- // the underlying data remains unchanged.
- ///
- int (CEF_CALLBACK *set_list)(struct _cef_value_t* self,
- struct _cef_list_value_t* value);
-} cef_value_t;
-
-
-///
-// Creates a new object.
-///
-CEF_EXPORT cef_value_t* cef_value_create();
-
-
///
// Structure representing a binary value. Can be used on any process and thread.
///
cef_base_t base;
///
- // Returns true (1) if this object is valid. This object may become invalid if
- // the underlying data is owned by another object (e.g. list or dictionary)
- // and that other object is then modified or destroyed. Do not call any other
- // functions if this function returns false (0).
+ // Returns true (1) if this object is valid. Do not call any other functions
+ // if this function returns false (0).
///
int (CEF_CALLBACK *is_valid)(struct _cef_binary_value_t* self);
///
int (CEF_CALLBACK *is_owned)(struct _cef_binary_value_t* self);
- ///
- // Returns true (1) if this object and |that| object have the same underlying
- // data.
- ///
- int (CEF_CALLBACK *is_same)(struct _cef_binary_value_t* self,
- struct _cef_binary_value_t* that);
-
- ///
- // Returns true (1) if this object and |that| object have an equivalent
- // underlying value but are not necessarily the same object.
- ///
- int (CEF_CALLBACK *is_equal)(struct _cef_binary_value_t* self,
- struct _cef_binary_value_t* that);
-
///
// Returns a copy of this object. The data in this object will also be copied.
///
cef_base_t base;
///
- // Returns true (1) if this object is valid. This object may become invalid if
- // the underlying data is owned by another object (e.g. list or dictionary)
- // and that other object is then modified or destroyed. Do not call any other
- // functions if this function returns false (0).
+ // Returns true (1) if this object is valid. Do not call any other functions
+ // if this function returns false (0).
///
int (CEF_CALLBACK *is_valid)(struct _cef_dictionary_value_t* self);
///
int (CEF_CALLBACK *is_read_only)(struct _cef_dictionary_value_t* self);
- ///
- // Returns true (1) if this object and |that| object have the same underlying
- // data. If true (1) modifications to this object will also affect |that|
- // object and vice-versa.
- ///
- int (CEF_CALLBACK *is_same)(struct _cef_dictionary_value_t* self,
- struct _cef_dictionary_value_t* that);
-
- ///
- // Returns true (1) if this object and |that| object have an equivalent
- // underlying value but are not necessarily the same object.
- ///
- int (CEF_CALLBACK *is_equal)(struct _cef_dictionary_value_t* self,
- struct _cef_dictionary_value_t* that);
-
///
// Returns a writable copy of this object. If |exclude_NULL_children| is true
// (1) any NULL dictionaries or lists will be excluded from the copy.
cef_value_type_t (CEF_CALLBACK *get_type)(
struct _cef_dictionary_value_t* self, const cef_string_t* key);
- ///
- // Returns the value at the specified key. For simple types the returned value
- // will copy existing data and modifications to the value will not modify this
- // object. For complex types (binary, dictionary and list) the returned value
- // will reference existing data and modifications to the value will modify
- // this object.
- ///
- struct _cef_value_t* (CEF_CALLBACK *get_value)(
- struct _cef_dictionary_value_t* self, const cef_string_t* key);
-
///
// Returns the value at the specified key as type bool.
///
struct _cef_dictionary_value_t* self, const cef_string_t* key);
///
- // Returns the value at the specified key as type binary. The returned value
- // will reference existing data.
+ // Returns the value at the specified key as type binary.
///
struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)(
struct _cef_dictionary_value_t* self, const cef_string_t* key);
///
- // Returns the value at the specified key as type dictionary. The returned
- // value will reference existing data and modifications to the value will
- // modify this object.
+ // Returns the value at the specified key as type dictionary.
///
struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)(
struct _cef_dictionary_value_t* self, const cef_string_t* key);
///
- // Returns the value at the specified key as type list. The returned value
- // will reference existing data and modifications to the value will modify
- // this object.
+ // Returns the value at the specified key as type list.
///
struct _cef_list_value_t* (CEF_CALLBACK *get_list)(
struct _cef_dictionary_value_t* self, const cef_string_t* key);
- ///
- // Sets the value at the specified key. Returns true (1) if the value was set
- // successfully. If |value| represents simple data then the underlying data
- // will be copied and modifications to |value| will not modify this object. If
- // |value| represents complex data (binary, dictionary or list) then the
- // underlying data will be referenced and modifications to |value| will modify
- // this object.
- ///
- int (CEF_CALLBACK *set_value)(struct _cef_dictionary_value_t* self,
- const cef_string_t* key, struct _cef_value_t* value);
-
///
// Sets the value at the specified key as type null. Returns true (1) if the
// value was set successfully.
///
// Sets the value at the specified key as type dict. Returns true (1) if the
- // value was set successfully. If |value| is currently owned by another object
+ // value was set successfully. After calling this function the |value| object
+ // will no longer be valid. If |value| is currently owned by another object
// then the value will be copied and the |value| reference will not change.
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
///
// Sets the value at the specified key as type list. Returns true (1) if the
- // value was set successfully. If |value| is currently owned by another object
+ // value was set successfully. After calling this function the |value| object
+ // will no longer be valid. If |value| is currently owned by another object
// then the value will be copied and the |value| reference will not change.
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
cef_base_t base;
///
- // Returns true (1) if this object is valid. This object may become invalid if
- // the underlying data is owned by another object (e.g. list or dictionary)
- // and that other object is then modified or destroyed. Do not call any other
- // functions if this function returns false (0).
+ // Returns true (1) if this object is valid. Do not call any other functions
+ // if this function returns false (0).
///
int (CEF_CALLBACK *is_valid)(struct _cef_list_value_t* self);
///
int (CEF_CALLBACK *is_read_only)(struct _cef_list_value_t* self);
- ///
- // Returns true (1) if this object and |that| object have the same underlying
- // data. If true (1) modifications to this object will also affect |that|
- // object and vice-versa.
- ///
- int (CEF_CALLBACK *is_same)(struct _cef_list_value_t* self,
- struct _cef_list_value_t* that);
-
- ///
- // Returns true (1) if this object and |that| object have an equivalent
- // underlying value but are not necessarily the same object.
- ///
- int (CEF_CALLBACK *is_equal)(struct _cef_list_value_t* self,
- struct _cef_list_value_t* that);
-
///
// Returns a writable copy of this object.
///
cef_value_type_t (CEF_CALLBACK *get_type)(struct _cef_list_value_t* self,
int index);
- ///
- // Returns the value at the specified index. For simple types the returned
- // value will copy existing data and modifications to the value will not
- // modify this object. For complex types (binary, dictionary and list) the
- // returned value will reference existing data and modifications to the value
- // will modify this object.
- ///
- struct _cef_value_t* (CEF_CALLBACK *get_value)(struct _cef_list_value_t* self,
- int index);
-
///
// Returns the value at the specified index as type bool.
///
struct _cef_list_value_t* self, int index);
///
- // Returns the value at the specified index as type binary. The returned value
- // will reference existing data.
+ // Returns the value at the specified index as type binary.
///
struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)(
struct _cef_list_value_t* self, int index);
///
- // Returns the value at the specified index as type dictionary. The returned
- // value will reference existing data and modifications to the value will
- // modify this object.
+ // Returns the value at the specified index as type dictionary.
///
struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)(
struct _cef_list_value_t* self, int index);
///
- // Returns the value at the specified index as type list. The returned value
- // will reference existing data and modifications to the value will modify
- // this object.
+ // Returns the value at the specified index as type list.
///
struct _cef_list_value_t* (CEF_CALLBACK *get_list)(
struct _cef_list_value_t* self, int index);
- ///
- // Sets the value at the specified index. Returns true (1) if the value was
- // set successfully. If |value| represents simple data then the underlying
- // data will be copied and modifications to |value| will not modify this
- // object. If |value| represents complex data (binary, dictionary or list)
- // then the underlying data will be referenced and modifications to |value|
- // will modify this object.
- ///
- int (CEF_CALLBACK *set_value)(struct _cef_list_value_t* self, int index,
- struct _cef_value_t* value);
-
///
// Sets the value at the specified index as type null. Returns true (1) if the
// value was set successfully.
///
// Sets the value at the specified index as type binary. Returns true (1) if
- // the value was set successfully. If |value| is currently owned by another
+ // the value was set successfully. After calling this function the |value|
+ // object will no longer be valid. If |value| is currently owned by another
// object then the value will be copied and the |value| reference will not
// change. Otherwise, ownership will be transferred to this object and the
// |value| reference will be invalidated.
///
// Sets the value at the specified index as type dict. Returns true (1) if the
- // value was set successfully. If |value| is currently owned by another object
+ // value was set successfully. After calling this function the |value| object
+ // will no longer be valid. If |value| is currently owned by another object
// then the value will be copied and the |value| reference will not change.
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
///
// Sets the value at the specified index as type list. Returns true (1) if the
- // value was set successfully. If |value| is currently owned by another object
+ // value was set successfully. After calling this function the |value| object
+ // will no longer be valid. If |value| is currently owned by another object
// then the value will be copied and the |value| reference will not change.
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// ---------------------------------------------------------------------------
+//
+// The contents of this file must follow a specific format in order to
+// support the CEF translator tool. See the translator.README.txt file in the
+// tools directory for more information.
+//
#ifndef CEF_INCLUDE_CEF_BASE_H_
#define CEF_INCLUDE_CEF_BASE_H_
#pragma once
-#include "include/base/cef_atomic_ref_count.h"
-#include "include/base/cef_build.h"
-#include "include/base/cef_macros.h"
-
-// Bring in common C++ type definitions used by CEF consumers.
+#include "include/internal/cef_build.h"
#include "include/internal/cef_ptr.h"
#include "include/internal/cef_types_wrappers.h"
+
+// Bring in platform-specific definitions.
#if defined(OS_WIN)
#include "include/internal/cef_win.h"
#elif defined(OS_MACOSX)
class CefBase {
public:
///
- // Called to increment the reference count for the object. Should be called
- // for every new copy of a pointer to a given object.
+ // The AddRef method increments the reference count for the object. It should
+ // be called for every new copy of a pointer to a given object. The resulting
+ // reference count value is returned and should be used for diagnostic/testing
+ // purposes only.
///
- virtual void AddRef() const =0;
+ virtual int AddRef() =0;
///
- // Called to decrement the reference count for the object. Returns true if
- // the reference count is 0, in which case the object should self-delete.
+ // The Release method decrements the reference count for the object. If the
+ // reference count on the object falls to 0, then the object should free
+ // itself from memory. The resulting reference count value is returned and
+ // should be used for diagnostic/testing purposes only.
///
- virtual bool Release() const =0;
+ virtual int Release() =0;
///
- // Returns true if the reference count is 1.
+ // Return the current number of references.
///
- virtual bool HasOneRef() const =0;
+ virtual int GetRefCt() =0;
protected:
virtual ~CefBase() {}
};
+
///
// Class that implements atomic reference counting.
///
class CefRefCount {
public:
- CefRefCount() : ref_count_(0) {}
+ CefRefCount() : refct_(0) {}
///
- // Increment the reference count.
+ // Atomic reference increment.
///
- void AddRef() const {
- base::AtomicRefCountInc(&ref_count_);
+ int AddRef() {
+ return CefAtomicIncrement(&refct_);
}
///
- // Decrement the reference count. Returns true if the reference count is 0.
+ // Atomic reference decrement. Delete the object when no references remain.
///
- bool Release() const {
- return !base::AtomicRefCountDec(&ref_count_);
+ int Release() {
+ return CefAtomicDecrement(&refct_);
}
///
- // Returns true if the reference count is 1.
+ // Return the current number of references.
///
- bool HasOneRef() const {
- return base::AtomicRefCountIsOne(&ref_count_);
- }
+ int GetRefCt() { return refct_; }
private:
- mutable base::AtomicRefCount ref_count_;
- DISALLOW_COPY_AND_ASSIGN(CefRefCount);
+ long refct_; // NOLINT(runtime/int)
};
///
///
#define IMPLEMENT_REFCOUNTING(ClassName) \
public: \
- void AddRef() const { \
- ref_count_.AddRef(); \
- } \
- bool Release() const { \
- if (ref_count_.Release()) { \
- delete static_cast<const ClassName*>(this); \
- return true; \
- } \
- return false; \
- } \
- bool HasOneRef() const { \
- return ref_count_.HasOneRef(); \
+ int AddRef() { return refct_.AddRef(); } \
+ int Release() { \
+ int retval = refct_.Release(); \
+ if (retval == 0) \
+ delete this; \
+ return retval; \
} \
+ int GetRefCt() { return refct_.GetRefCt(); } \
private: \
- CefRefCount ref_count_;
+ CefRefCount refct_;
///
// Macro that provides a locking implementation. Use the Lock() and Unlock()
// methods to protect a section of code from simultaneous access by multiple
// threads. The AutoLock class is a helper that will hold the lock while in
// scope.
-//
-// THIS MACRO IS DEPRECATED. Use an explicit base::Lock member variable and
-// base::AutoLock instead. For example:
-//
-// #include "include/base/cef_lock.h"
-//
-// // Class declaration.
-// class MyClass : public CefBase {
-// public:
-// MyClass() : value_(0) {}
-// // Method that may be called on multiple threads.
-// void IncrementValue();
-// private:
-// // Value that may be accessed on multiple theads.
-// int value_;
-// // Lock used to protect access to |value_|.
-// base::Lock lock_;
-// IMPLEMENT_REFCOUNTING(MyClass);
-// };
-//
-// // Class implementation.
-// void MyClass::IncrementValue() {
-// // Acquire the lock for the scope of this method.
-// base::AutoLock lock_scope(lock_);
-// // |value_| can now be modified safely.
-// value_++;
-// }
///
#define IMPLEMENT_LOCKING(ClassName) \
public: \
~AutoLock() { base_->Unlock(); } \
private: \
ClassName* base_; \
- DISALLOW_COPY_AND_ASSIGN(AutoLock); \
}; \
- void Lock() { lock_.Acquire(); } \
- void Unlock() { lock_.Release(); } \
+ void Lock() { critsec_.Lock(); } \
+ void Unlock() { critsec_.Unlock(); } \
private: \
- base::Lock lock_;
+ CefCriticalSection critsec_;
#endif // CEF_INCLUDE_CEF_BASE_H_
#pragma once
#include "include/cef_base.h"
-#include "include/cef_drag_data.h"
#include "include/cef_frame.h"
-#include "include/cef_navigation_entry.h"
#include "include/cef_process_message.h"
#include "include/cef_request_context.h"
#include <vector>
///
// Returns the frame with the specified name, or NULL if not found.
///
- /*--cef(optional_param=name)--*/
+ /*--cef()--*/
virtual CefRefPtr<CefFrame> GetFrame(const CefString& name) =0;
///
class CefRunFileDialogCallback : public virtual CefBase {
public:
///
- // Called asynchronously after the file dialog is dismissed.
- // |selected_accept_filter| is the 0-based index of the value selected from
- // the accept filters array passed to CefBrowserHost::RunFileDialog.
- // |file_paths| will be a single value or a list of values depending on the
- // dialog mode. If the selection was cancelled |file_paths| will be empty.
+ // Called asynchronously after the file dialog is dismissed. If the selection
+ // was successful |file_paths| will be a single value or a list of values
+ // depending on the dialog mode. If the selection was cancelled |file_paths|
+ // will be empty.
///
- /*--cef(index_param=selected_accept_filter,optional_param=file_paths)--*/
+ /*--cef(capi_name=cont)--*/
virtual void OnFileDialogDismissed(
- int selected_accept_filter,
+ CefRefPtr<CefBrowserHost> browser_host,
const std::vector<CefString>& file_paths) =0;
};
-///
-// Callback interface for CefBrowserHost::GetNavigationEntries. The methods of
-// this class will be called on the browser process UI thread.
-///
-/*--cef(source=client)--*/
-class CefNavigationEntryVisitor : public virtual CefBase {
- public:
- ///
- // Method that will be executed. Do not keep a reference to |entry| outside of
- // this callback. Return true to continue visiting entries or false to stop.
- // |current| is true if this entry is the currently loaded navigation entry.
- // |index| is the 0-based index of this entry and |total| is the total number
- // of entries.
- ///
- /*--cef()--*/
- virtual bool Visit(CefRefPtr<CefNavigationEntry> entry,
- bool current,
- int index,
- int total) =0;
-};
-
-
///
// Class used to represent the browser process aspects of a browser window. The
// methods of this class can only be called in the browser process. They may be
/*--cef(source=library)--*/
class CefBrowserHost : public virtual CefBase {
public:
- typedef cef_drag_operations_mask_t DragOperationsMask;
typedef cef_file_dialog_mode_t FileDialogMode;
typedef cef_mouse_button_type_t MouseButtonType;
typedef cef_paint_element_type_t PaintElementType;
/*--cef()--*/
virtual CefRefPtr<CefBrowser> GetBrowser() =0;
+ ///
+ // Call this method before destroying a contained browser window. This method
+ // performs any internal cleanup that may be needed before the browser window
+ // is destroyed. See CefLifeSpanHandler::DoClose() documentation for
+ // additional usage information.
+ ///
+ /*--cef()--*/
+ virtual void ParentWindowWillClose() =0;
+
///
// Request that the browser close. The JavaScript 'onbeforeunload' event will
// be fired. If |force_close| is false the event handler, if any, will be
// Call to run a file chooser dialog. Only a single file chooser dialog may be
// pending at any given time. |mode| represents the type of dialog to display.
// |title| to the title to be used for the dialog and may be empty to show the
- // default title ("Open" or "Save" depending on the mode). |default_file_path|
- // is the path with optional directory and/or file name component that will be
- // initially selected in the dialog. |accept_filters| are used to restrict the
- // selectable file types and may any combination of (a) valid lower-cased MIME
- // types (e.g. "text/*" or "image/*"), (b) individual file extensions (e.g.
- // ".txt" or ".png"), or (c) combined description and file extension delimited
- // using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg").
- // |selected_accept_filter| is the 0-based index of the filter that will be
- // selected by default. |callback| will be executed after the dialog is
- // dismissed or immediately if another dialog is already pending. The dialog
- // will be initiated asynchronously on the UI thread.
- ///
- /*--cef(optional_param=title,optional_param=default_file_path,
- optional_param=accept_filters,index_param=selected_accept_filter)--*/
+ // default title ("Open" or "Save" depending on the mode). |default_file_name|
+ // is the default file name to select in the dialog. |accept_types| is a list
+ // of valid lower-cased MIME types or file extensions specified in an input
+ // element and is used to restrict selectable files to such types. |callback|
+ // will be executed after the dialog is dismissed or immediately if another
+ // dialog is already pending. The dialog will be initiated asynchronously on
+ // the UI thread.
+ ///
+ /*--cef(optional_param=title,optional_param=default_file_name,
+ optional_param=accept_types)--*/
virtual void RunFileDialog(FileDialogMode mode,
const CefString& title,
- const CefString& default_file_path,
- const std::vector<CefString>& accept_filters,
- int selected_accept_filter,
+ const CefString& default_file_name,
+ const std::vector<CefString>& accept_types,
CefRefPtr<CefRunFileDialogCallback> callback) =0;
///
// running simultaniously. |forward| indicates whether to search forward or
// backward within the page. |matchCase| indicates whether the search should
// be case-sensitive. |findNext| indicates whether this is the first request
- // or a follow-up. The CefFindHandler instance, if any, returned via
- // CefClient::GetFindHandler will be called to report find results.
+ // or a follow-up.
///
/*--cef()--*/
virtual void Find(int identifier, const CefString& searchText,
virtual void StopFinding(bool clearSelection) =0;
///
- // Open developer tools in its own window. If |inspect_element_at| is non-
- // empty the element at the specified (x,y) location will be inspected.
+ // Open developer tools in its own window.
///
- /*--cef(optional_param=inspect_element_at)--*/
+ /*--cef()--*/
virtual void ShowDevTools(const CefWindowInfo& windowInfo,
CefRefPtr<CefClient> client,
- const CefBrowserSettings& settings,
- const CefPoint& inspect_element_at) =0;
+ const CefBrowserSettings& settings) =0;
///
// Explicitly close the developer tools window if one exists for this browser
/*--cef()--*/
virtual void CloseDevTools() =0;
- ///
- // Retrieve a snapshot of current navigation entries as values sent to the
- // specified visitor. If |current_only| is true only the current navigation
- // entry will be sent, otherwise all navigation entries will be sent.
- ///
- ///
- /*--cef()--*/
- virtual void GetNavigationEntries(
- CefRefPtr<CefNavigationEntryVisitor> visitor,
- bool current_only) =0;
-
///
// Set whether mouse cursor change is disabled.
///
/*--cef()--*/
virtual bool IsMouseCursorChangeDisabled() =0;
- ///
- // If a misspelled word is currently selected in an editable node calling
- // this method will replace it with the specified |word|.
- ///
- /*--cef()--*/
- virtual void ReplaceMisspelling(const CefString& word) =0;
-
- ///
- // Add the specified |word| to the spelling dictionary.
- ///
- /*--cef()--*/
- virtual void AddWordToDictionary(const CefString& word) =0;
-
///
// Returns true if window rendering is disabled.
///
virtual void NotifyScreenInfoChanged() =0;
///
- // Invalidate the view. The browser will call CefRenderHandler::OnPaint
- // asynchronously. This method is only used when window rendering is
- // disabled.
+ // Invalidate the |dirtyRect| region of the view. The browser will call
+ // CefRenderHandler::OnPaint asynchronously with the updated regions. This
+ // method is only used when window rendering is disabled.
///
/*--cef()--*/
- virtual void Invalidate(PaintElementType type) =0;
+ virtual void Invalidate(const CefRect& dirtyRect, PaintElementType type) =0;
///
// Send a key event to the browser.
/*--cef()--*/
virtual void SendCaptureLostEvent() =0;
- ///
- // Notify the browser that the window hosting it is about to be moved or
- // resized. This method is only used on Windows and Linux.
- ///
- /*--cef()--*/
- virtual void NotifyMoveOrResizeStarted() =0;
-
///
// Get the NSTextInputContext implementation for enabling IME on Mac when
// window rendering is disabled.
///
/*--cef()--*/
virtual void HandleKeyEventAfterTextInputClient(CefEventHandle keyEvent) =0;
-
- ///
- // Call this method when the user drags the mouse into the web view (before
- // calling DragTargetDragOver/DragTargetLeave/DragTargetDrop).
- // |drag_data| should not contain file contents as this type of data is not
- // allowed to be dragged into the web view. File contents can be removed using
- // CefDragData::ResetFileContents (for example, if |drag_data| comes from
- // CefRenderHandler::StartDragging).
- // This method is only used when window rendering is disabled.
- ///
- /*--cef()--*/
- virtual void DragTargetDragEnter(CefRefPtr<CefDragData> drag_data,
- const CefMouseEvent& event,
- DragOperationsMask allowed_ops) =0;
-
- ///
- // Call this method each time the mouse is moved across the web view during
- // a drag operation (after calling DragTargetDragEnter and before calling
- // DragTargetDragLeave/DragTargetDrop).
- // This method is only used when window rendering is disabled.
- ///
- /*--cef()--*/
- virtual void DragTargetDragOver(const CefMouseEvent& event,
- DragOperationsMask allowed_ops) =0;
-
- ///
- // Call this method when the user drags the mouse out of the web view (after
- // calling DragTargetDragEnter).
- // This method is only used when window rendering is disabled.
- ///
- /*--cef()--*/
- virtual void DragTargetDragLeave() =0;
-
- ///
- // Call this method when the user completes the drag operation by dropping
- // the object onto the web view (after calling DragTargetDragEnter).
- // The object being dropped is |drag_data|, given as an argument to
- // the previous DragTargetDragEnter call.
- // This method is only used when window rendering is disabled.
- ///
- /*--cef()--*/
- virtual void DragTargetDrop(const CefMouseEvent& event) =0;
-
- ///
- // Call this method when the drag operation started by a
- // CefRenderHandler::StartDragging call has ended either in a drop or
- // by being cancelled. |x| and |y| are mouse coordinates relative to the
- // upper-left corner of the view. If the web view is both the drag source
- // and the drag target then all DragTarget* methods should be called before
- // DragSource* mthods.
- // This method is only used when window rendering is disabled.
- ///
- /*--cef()--*/
- virtual void DragSourceEndedAt(int x, int y, DragOperationsMask op) =0;
-
- ///
- // Call this method when the drag operation started by a
- // CefRenderHandler::StartDragging call has completed. This method may be
- // called immediately without first calling DragSourceEndedAt to cancel a
- // drag operation. If the web view is both the drag source and the drag
- // target then all DragTarget* methods should be called before DragSource*
- // mthods.
- // This method is only used when window rendering is disabled.
- ///
- /*--cef()--*/
- virtual void DragSourceSystemDragEnded() =0;
};
#endif // CEF_INCLUDE_CEF_BROWSER_H_
#include "include/cef_base.h"
#include "include/cef_command_line.h"
-#include "include/cef_print_handler.h"
#include "include/cef_values.h"
///
/*--cef()--*/
virtual void OnRenderProcessThreadCreated(
CefRefPtr<CefListValue> extra_info) {}
-
- ///
- // Return the handler for printing on Linux. If a print handler is not
- // provided then printing will not be supported on the Linux platform.
- ///
- /*--cef()--*/
- virtual CefRefPtr<CefPrintHandler> GetPrintHandler() {
- return NULL;
- }
};
#endif // CEF_INCLUDE_CEF_BROWSER_PROCESS_HANDLER_H_
// Generic callback interface used for asynchronous completion.
///
/*--cef(source=client)--*/
-class CefCompletionCallback : public virtual CefBase {
+class CefCompletionHandler : public virtual CefBase {
public:
///
// Method that will be called once the task is complete.
#include "include/cef_display_handler.h"
#include "include/cef_download_handler.h"
#include "include/cef_drag_handler.h"
-#include "include/cef_find_handler.h"
#include "include/cef_focus_handler.h"
#include "include/cef_geolocation_handler.h"
#include "include/cef_jsdialog_handler.h"
return NULL;
}
- ///
- // Return the handler for find result events.
- ///
- /*--cef()--*/
- virtual CefRefPtr<CefFindHandler> GetFindHandler() {
- return NULL;
- }
-
///
// Return the handler for focus events.
///
/*--cef()--*/
virtual CefString GetSelectionText() =0;
- ///
- // Returns the text of the misspelled word, if any, that the context menu was
- // invoked on.
- ///
- /*--cef()--*/
- virtual CefString GetMisspelledWord() =0;
-
- ///
- // Returns true if suggestions exist, false otherwise. Fills in |suggestions|
- // from the spell check service for the misspelled word if there is one.
- ///
- /*--cef()--*/
- virtual bool GetDictionarySuggestions(std::vector<CefString>& suggestions) =0;
-
///
// Returns true if the context menu was invoked on an editable node.
///
///
// Returns true if the context menu was invoked on an editable node where
- // spell-check is enabled.
+ // speech-input is enabled.
///
/*--cef()--*/
- virtual bool IsSpellCheckEnabled() =0;
+ virtual bool IsSpeechInputEnabled() =0;
///
// Returns flags representing the actions supported by the editable node, if
#include <vector>
class CefCookieVisitor;
-class CefSetCookieCallback;
-class CefDeleteCookiesCallback;
+
///
// Class used for managing cookies. The methods of this class may be called on
public:
///
// Returns the global cookie manager. By default data will be stored at
- // CefSettings.cache_path if specified or in memory otherwise. If |callback|
- // is non-NULL it will be executed asnychronously on the IO thread after the
- // manager's storage has been initialized. Using this method is equivalent to
- // calling CefRequestContext::GetGlobalContext()->GetDefaultCookieManager().
+ // CefSettings.cache_path if specified or in memory otherwise.
///
- /*--cef(optional_param=callback)--*/
- static CefRefPtr<CefCookieManager> GetGlobalManager(
- CefRefPtr<CefCompletionCallback> callback);
+ /*--cef()--*/
+ static CefRefPtr<CefCookieManager> GetGlobalManager();
///
// Creates a new cookie manager. If |path| is empty data will be stored in
// persist session cookies (cookies without an expiry date or validity
// interval) set |persist_session_cookies| to true. Session cookies are
// generally intended to be transient and most Web browsers do not persist
- // them. If |callback| is non-NULL it will be executed asnychronously on the
- // IO thread after the manager's storage has been initialized.
+ // them. Returns NULL if creation fails.
///
- /*--cef(optional_param=path,optional_param=callback)--*/
+ /*--cef(optional_param=path)--*/
static CefRefPtr<CefCookieManager> CreateManager(
const CefString& path,
- bool persist_session_cookies,
- CefRefPtr<CefCompletionCallback> callback);
+ bool persist_session_cookies);
///
// Set the schemes supported by this manager. By default only "http" and
- // "https" schemes are supported. If |callback| is non-NULL it will be
- // executed asnychronously on the IO thread after the change has been applied.
- // Must be called before any cookies are accessed.
+ // "https" schemes are supported. Must be called before any cookies are
+ // accessed.
///
- /*--cef(optional_param=callback)--*/
- virtual void SetSupportedSchemes(
- const std::vector<CefString>& schemes,
- CefRefPtr<CefCompletionCallback> callback) =0;
+ /*--cef()--*/
+ virtual void SetSupportedSchemes(const std::vector<CefString>& schemes) =0;
///
- // Visit all cookies on the IO thread. The returned cookies are ordered by
- // longest path, then by earliest creation date. Returns false if cookies
- // cannot be accessed.
+ // Visit all cookies. The returned cookies are ordered by longest path, then
+ // by earliest creation date. Returns false if cookies cannot be accessed.
///
/*--cef()--*/
virtual bool VisitAllCookies(CefRefPtr<CefCookieVisitor> visitor) =0;
///
- // Visit a subset of cookies on the IO thread. The results are filtered by the
- // given url scheme, host, domain and path. If |includeHttpOnly| is true
- // HTTP-only cookies will also be included in the results. The returned
- // cookies are ordered by longest path, then by earliest creation date.
- // Returns false if cookies cannot be accessed.
+ // Visit a subset of cookies. The results are filtered by the given url
+ // scheme, host, domain and path. If |includeHttpOnly| is true HTTP-only
+ // cookies will also be included in the results. The returned cookies are
+ // ordered by longest path, then by earliest creation date. Returns false if
+ // cookies cannot be accessed.
///
/*--cef()--*/
- virtual bool VisitUrlCookies(const CefString& url,
- bool includeHttpOnly,
+ virtual bool VisitUrlCookies(const CefString& url, bool includeHttpOnly,
CefRefPtr<CefCookieVisitor> visitor) =0;
///
// Sets a cookie given a valid URL and explicit user-provided cookie
// attributes. This function expects each attribute to be well-formed. It will
// check for disallowed characters (e.g. the ';' character is disallowed
- // within the cookie value attribute) and fail without setting the cookie if
- // such characters are found. If |callback| is non-NULL it will be executed
- // asnychronously on the IO thread after the cookie has been set. Returns
- // false if an invalid URL is specified or if cookies cannot be accessed.
+ // within the cookie value attribute) and will return false without setting
+ // the cookie if such characters are found. This method must be called on the
+ // IO thread.
///
- /*--cef(optional_param=callback)--*/
- virtual bool SetCookie(const CefString& url,
- const CefCookie& cookie,
- CefRefPtr<CefSetCookieCallback> callback) =0;
+ /*--cef()--*/
+ virtual bool SetCookie(const CefString& url, const CefCookie& cookie) =0;
///
// Delete all cookies that match the specified parameters. If both |url| and
- // |cookie_name| values are specified all host and domain cookies matching
+ // values |cookie_name| are specified all host and domain cookies matching
// both will be deleted. If only |url| is specified all host cookies (but not
// domain cookies) irrespective of path will be deleted. If |url| is empty all
- // cookies for all hosts and domains will be deleted. If |callback| is
- // non-NULL it will be executed asnychronously on the IO thread after the
- // cookies have been deleted. Returns false if a non-empty invalid URL is
- // specified or if cookies cannot be accessed. Cookies can alternately be
- // deleted using the Visit*Cookies() methods.
- ///
- /*--cef(optional_param=url,optional_param=cookie_name,
- optional_param=callback)--*/
+ // cookies for all hosts and domains will be deleted. Returns false if a non-
+ // empty invalid URL is specified or if cookies cannot be accessed. This
+ // method must be called on the IO thread.
+ ///
+ /*--cef(optional_param=url,optional_param=cookie_name)--*/
virtual bool DeleteCookies(const CefString& url,
- const CefString& cookie_name,
- CefRefPtr<CefDeleteCookiesCallback> callback) =0;
+ const CefString& cookie_name) =0;
///
// Sets the directory path that will be used for storing cookie data. If
// |path| is empty data will be stored in memory only. Otherwise, data will be
// stored at the specified |path|. To persist session cookies (cookies without
// an expiry date or validity interval) set |persist_session_cookies| to true.
- // Session cookies are generally intended to be transient and most Web
- // browsers do not persist them. If |callback| is non-NULL it will be executed
- // asnychronously on the IO thread after the manager's storage has been
- // initialized. Returns false if cookies cannot be accessed.
+ // Session cookies are generally intended to be transient and most Web browsers
+ // do not persist them. Returns false if cookies cannot be accessed.
///
- /*--cef(optional_param=path,optional_param=callback)--*/
+ /*--cef(optional_param=path)--*/
virtual bool SetStoragePath(const CefString& path,
- bool persist_session_cookies,
- CefRefPtr<CefCompletionCallback> callback) =0;
+ bool persist_session_cookies) =0;
///
- // Flush the backing store (if any) to disk. If |callback| is non-NULL it will
- // be executed asnychronously on the IO thread after the flush is complete.
- // Returns false if cookies cannot be accessed.
+ // Flush the backing store (if any) to disk and execute the specified
+ // |handler| on the IO thread when done. Returns false if cookies cannot be
+ // accessed.
///
- /*--cef(optional_param=callback)--*/
- virtual bool FlushStore(CefRefPtr<CefCompletionCallback> callback) =0;
+ /*--cef(optional_param=handler)--*/
+ virtual bool FlushStore(CefRefPtr<CefCompletionHandler> handler) =0;
};
bool& deleteCookie) =0;
};
-
-///
-// Interface to implement to be notified of asynchronous completion via
-// CefCookieManager::SetCookie().
-///
-/*--cef(source=client)--*/
-class CefSetCookieCallback : public virtual CefBase {
- public:
- ///
- // Method that will be called upon completion. |success| will be true if the
- // cookie was set successfully.
- ///
- /*--cef()--*/
- virtual void OnComplete(bool success) =0;
-};
-
-
-///
-// Interface to implement to be notified of asynchronous completion via
-// CefCookieManager::DeleteCookies().
-///
-/*--cef(source=client)--*/
-class CefDeleteCookiesCallback : public virtual CefBase {
- public:
- ///
- // Method that will be called upon completion. |num_deleted| will be the
- // number of cookies that were deleted or -1 if unknown.
- ///
- /*--cef()--*/
- virtual void OnComplete(int num_deleted) =0;
-};
-
#endif // CEF_INCLUDE_CEF_COOKIE_H_
class CefFileDialogCallback : public virtual CefBase {
public:
///
- // Continue the file selection. |selected_accept_filter| should be the 0-based
- // index of the value selected from the accept filters array passed to
- // CefDialogHandler::OnFileDialog. |file_paths| should be a single value or a
- // list of values depending on the dialog mode. An empty |file_paths| value is
- // treated the same as calling Cancel().
+ // Continue the file selection with the specified |file_paths|. This may be
+ // a single value or a list of values depending on the dialog mode. An empty
+ // value is treated the same as calling Cancel().
///
- /*--cef(capi_name=cont,index_param=selected_accept_filter,
- optional_param=file_paths)--*/
- virtual void Continue(int selected_accept_filter,
- const std::vector<CefString>& file_paths) =0;
-
+ /*--cef(capi_name=cont)--*/
+ virtual void Continue(const std::vector<CefString>& file_paths) =0;
+
///
// Cancel the file selection.
///
// Called to run a file chooser dialog. |mode| represents the type of dialog
// to display. |title| to the title to be used for the dialog and may be empty
// to show the default title ("Open" or "Save" depending on the mode).
- // |default_file_path| is the path with optional directory and/or file name
- // component that should be initially selected in the dialog. |accept_filters|
- // are used to restrict the selectable file types and may any combination of
- // (a) valid lower-cased MIME types (e.g. "text/*" or "image/*"),
- // (b) individual file extensions (e.g. ".txt" or ".png"), or (c) combined
- // description and file extension delimited using "|" and ";" (e.g.
- // "Image Types|.png;.gif;.jpg"). |selected_accept_filter| is the 0-based
- // index of the filter that should be selected by default. To display a custom
- // dialog return true and execute |callback| either inline or at a later time.
- // To display the default dialog return false.
+ // |default_file_name| is the default file name to select in the dialog.
+ // |accept_types| is a list of valid lower-cased MIME types or file extensions
+ // specified in an input element and is used to restrict selectable files to
+ // such types. To display a custom dialog return true and execute |callback|
+ // either inline or at a later time. To display the default dialog return
+ // false.
///
- /*--cef(optional_param=title,optional_param=default_file_path,
- optional_param=accept_filters,index_param=selected_accept_filter)--*/
+ /*--cef(optional_param=title,optional_param=default_file_name,
+ optional_param=accept_types)--*/
virtual bool OnFileDialog(CefRefPtr<CefBrowser> browser,
FileDialogMode mode,
const CefString& title,
- const CefString& default_file_path,
- const std::vector<CefString>& accept_filters,
- int selected_accept_filter,
+ const CefString& default_file_name,
+ const std::vector<CefString>& accept_types,
CefRefPtr<CefFileDialogCallback> callback) {
return false;
}
virtual void OnTitleChange(CefRefPtr<CefBrowser> browser,
const CefString& title) {}
- ///
- // Called when the page icon changes.
- ///
- /*--cef(optional_param=icon_urls)--*/
- virtual void OnFaviconURLChange(CefRefPtr<CefBrowser> browser,
- const std::vector<CefString>& icon_urls) {}
-
///
// Called when the browser is about to display a tooltip. |text| contains the
// text that will be displayed in the tooltip. To handle the display of the
CefString& text) { return false; }
///
- // Called when the browser receives a status message. |value| contains the
- // text that will be displayed in the status message.
+ // Called when the browser receives a status message. |text| contains the text
+ // that will be displayed in the status message and |type| indicates the
+ // status message type.
///
/*--cef(optional_param=value)--*/
virtual void OnStatusMessage(CefRefPtr<CefBrowser> browser,
#include <map>
class CefDOMDocument;
+class CefDOMEventListener;
class CefDOMNode;
///
/*--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.
///
/*--cef()--*/
virtual CefRefPtr<CefDOMNode> GetLastChild() =0;
+ ///
+ // Add an event listener to this node for the specified event type. If
+ // |useCapture| is true then this listener will be considered a capturing
+ // listener. Capturing listeners will recieve all events of the specified
+ // type before the events are dispatched to any other event targets beneath
+ // the current node in the tree. Events which are bubbling upwards through
+ // the tree will not trigger a capturing listener. Separate calls to this
+ // method can be used to register the same listener with and without capture.
+ // See WebCore/dom/EventNames.h for the list of supported event types.
+ ///
+ /*--cef()--*/
+ virtual void AddEventListener(const CefString& eventType,
+ CefRefPtr<CefDOMEventListener> listener,
+ bool useCapture) =0;
+
+
// The following methods are valid only for element nodes.
///
virtual CefString GetElementInnerText() =0;
};
+
+///
+// Class used to represent a DOM event. The methods of this class should only
+// be called on the render process main thread.
+///
+/*--cef(source=library)--*/
+class CefDOMEvent : public virtual CefBase {
+ public:
+ typedef cef_dom_event_category_t Category;
+ typedef cef_dom_event_phase_t Phase;
+
+ ///
+ // Returns the event type.
+ ///
+ /*--cef()--*/
+ virtual CefString GetType() =0;
+
+ ///
+ // Returns the event category.
+ ///
+ /*--cef(default_retval=DOM_EVENT_CATEGORY_UNKNOWN)--*/
+ virtual Category GetCategory() =0;
+
+ ///
+ // Returns the event processing phase.
+ ///
+ /*--cef(default_retval=DOM_EVENT_PHASE_UNKNOWN)--*/
+ virtual Phase GetPhase() =0;
+
+ ///
+ // Returns true if the event can bubble up the tree.
+ ///
+ /*--cef()--*/
+ virtual bool CanBubble() =0;
+
+ ///
+ // Returns true if the event can be canceled.
+ ///
+ /*--cef()--*/
+ virtual bool CanCancel() =0;
+
+ ///
+ // Returns the document associated with this event.
+ ///
+ /*--cef()--*/
+ virtual CefRefPtr<CefDOMDocument> GetDocument() =0;
+
+ ///
+ // Returns the target of the event.
+ ///
+ /*--cef()--*/
+ virtual CefRefPtr<CefDOMNode> GetTarget() =0;
+
+ ///
+ // Returns the current target of the event.
+ ///
+ /*--cef()--*/
+ virtual CefRefPtr<CefDOMNode> GetCurrentTarget() =0;
+};
+
+
+///
+// Interface to implement for handling DOM events. The methods of this class
+// will be called on the render process main thread.
+///
+/*--cef(source=client)--*/
+class CefDOMEventListener : public virtual CefBase {
+ public:
+ ///
+ // Called when an event is received. The event object passed to this method
+ // contains a snapshot of the DOM at the time this method is executed. DOM
+ // objects are only valid for the scope of this method. Do not keep references
+ // to or attempt to access any DOM objects outside the scope of this method.
+ ///
+ /*--cef()--*/
+ virtual void HandleEvent(CefRefPtr<CefDOMEvent> event) =0;
+};
+
#endif // CEF_INCLUDE_CEF_DOM_H_
///
/*--cef()--*/
virtual void Cancel() =0;
-
- ///
- // Call to pause the download.
- ///
- /*--cef()--*/
- virtual void Pause() =0;
-
- ///
- // Call to resume the download.
- ///
- /*--cef()--*/
- virtual void Resume() =0;
};
/*--cef()--*/
virtual CefString GetURL() =0;
- ///
- // Returns the original URL before any redirections.
- ///
- /*--cef()--*/
- virtual CefString GetOriginalUrl() =0;
-
///
// Returns the suggested file name.
///
#pragma once
#include "include/cef_base.h"
-#include "include/cef_stream.h"
#include <vector>
///
/*--cef(source=library)--*/
class CefDragData : public virtual CefBase {
public:
- ///
- // Create a new CefDragData object.
- ///
- /*--cef()--*/
- static CefRefPtr<CefDragData> Create();
-
- ///
- // Returns a copy of the current object.
- ///
- /*--cef()--*/
- virtual CefRefPtr<CefDragData> Clone() =0;
-
- ///
- // Returns true if this object is read-only.
- ///
- /*--cef()--*/
- virtual bool IsReadOnly() =0;
-
///
// Returns true if the drag data is a link.
///
/*--cef()--*/
virtual CefString GetFileName() =0;
- ///
- // Write the contents of the file being dragged out of the web view into
- // |writer|. Returns the number of bytes sent to |writer|. If |writer| is
- // NULL this method will return the size of the file contents in bytes.
- // Call GetFileName() to get a suggested name for the file.
- ///
- /*--cef(optional_param=writer)--*/
- virtual size_t GetFileContents(CefRefPtr<CefStreamWriter> writer) =0;
-
///
// Retrieve the list of file names that are being dragged into the browser
// window.
///
/*--cef()--*/
virtual bool GetFileNames(std::vector<CefString>& names) =0;
-
- ///
- // Set the link URL that is being dragged.
- ///
- /*--cef(optional_param=url)--*/
- virtual void SetLinkURL(const CefString& url) =0;
-
- ///
- // Set the title associated with the link being dragged.
- ///
- /*--cef(optional_param=title)--*/
- virtual void SetLinkTitle(const CefString& title) =0;
-
- ///
- // Set the metadata associated with the link being dragged.
- ///
- /*--cef(optional_param=data)--*/
- virtual void SetLinkMetadata(const CefString& data) =0;
-
- ///
- // Set the plain text fragment that is being dragged.
- ///
- /*--cef(optional_param=text)--*/
- virtual void SetFragmentText(const CefString& text) =0;
-
- ///
- // Set the text/html fragment that is being dragged.
- ///
- /*--cef(optional_param=html)--*/
- virtual void SetFragmentHtml(const CefString& html) =0;
-
- ///
- // Set the base URL that the fragment came from.
- ///
- /*--cef(optional_param=base_url)--*/
- virtual void SetFragmentBaseURL(const CefString& base_url) =0;
-
- ///
- // Reset the file contents. You should do this before calling
- // CefBrowserHost::DragTargetDragEnter as the web view does not allow us to
- // drag in this kind of data.
- ///
- /*--cef()--*/
- virtual void ResetFileContents() =0;
-
- ///
- // Add a file that is being dragged into the webview.
- ///
- /*--cef(optional_param=display_name)--*/
- virtual void AddFile(const CefString& path, const CefString& display_name) =0;
};
#endif // CEF_INCLUDE_CEF_DRAG_DATA_H_
///
// Implement this interface to handle events related to geolocation permission
-// requests. The methods of this class will be called on the browser process UI
+// requests. The methods of this class will be called on the browser process IO
// thread.
///
/*--cef(source=client)--*/
///
// Called when a page requests permission to access geolocation information.
// |requesting_url| is the URL requesting permission and |request_id| is the
- // unique ID for the permission request. Return true and call
- // CefGeolocationCallback::Continue() either in this method or at a later
- // time to continue or cancel the request. Return false to cancel the request
- // immediately.
+ // unique ID for the permission request. Call CefGeolocationCallback::Continue
+ // to allow or deny the permission request.
///
/*--cef()--*/
- virtual bool OnRequestGeolocationPermission(
+ virtual void OnRequestGeolocationPermission(
CefRefPtr<CefBrowser> browser,
const CefString& requesting_url,
int request_id,
CefRefPtr<CefGeolocationCallback> callback) {
- return false;
}
///
// modal or modeless. If a custom dialog is used the application must execute
// |callback| once the custom dialog is dismissed.
///
- /*--cef(optional_param=origin_url,optional_param=accept_lang,
- optional_param=message_text,optional_param=default_prompt_text)--*/
+ /*--cef(optional_param=accept_lang,optional_param=message_text,
+ optional_param=default_prompt_text)--*/
virtual bool OnJSDialog(CefRefPtr<CefBrowser> browser,
const CefString& origin_url,
const CefString& accept_lang,
/*--cef(source=client)--*/
class CefLifeSpanHandler : public virtual CefBase {
public:
- typedef cef_window_open_disposition_t WindowOpenDisposition;
-
///
- // Called on the IO thread before a new popup browser is created. The
- // |browser| and |frame| values represent the source of the popup request. The
- // |target_url| and |target_frame_name| values indicate where the popup
- // browser should navigate and may be empty if not specified with the request.
- // The |target_disposition| value indicates where the user intended to open
- // the popup (e.g. current tab, new tab, etc). The |user_gesture| value will
- // be true if the popup was opened via explicit user gesture (e.g. clicking a
- // link) or false if the popup opened automatically (e.g. via the
- // DomContentLoaded event). The |popupFeatures| structure contains additional
+ // Called on the IO thread before a new popup window is created. The |browser|
+ // and |frame| parameters represent the source of the popup request. The
+ // |target_url| and |target_frame_name| values may be empty if none were
+ // specified with the request. The |popupFeatures| structure contains
// information about the requested popup window. To allow creation of the
- // popup browser optionally modify |windowInfo|, |client|, |settings| and
+ // popup window optionally modify |windowInfo|, |client|, |settings| and
// |no_javascript_access| and return false. To cancel creation of the popup
- // browser return true. The |client| and |settings| values will default to the
- // source browser's values. If the |no_javascript_access| value is set to
- // false the new browser will not be scriptable and may not be hosted in the
- // same renderer process as the source browser.
+ // window return true. The |client| and |settings| values will default to the
+ // source browser's values. The |no_javascript_access| value indicates whether
+ // the new browser window should be scriptable and in the same process as the
+ // source browser.
/*--cef(optional_param=target_url,optional_param=target_frame_name)--*/
virtual bool OnBeforePopup(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
const CefString& target_url,
const CefString& target_frame_name,
- WindowOpenDisposition target_disposition,
- bool user_gesture,
const CefPopupFeatures& popupFeatures,
CefWindowInfo& windowInfo,
CefRefPtr<CefClient>& client,
// 4. User approves the close.
// 5. JavaScript 'onunload' handler executes.
// 6. Application's DoClose() handler is called. Application will:
- // A. Set a flag to indicate that the next close attempt will be allowed.
- // B. Return false.
+ // A. Call CefBrowserHost::ParentWindowWillClose() to notify CEF that the
+ // parent window will be closing.
+ // B. Set a flag to indicate that the next close attempt will be allowed.
+ // C. Return false.
// 7. CEF sends an OS close notification.
// 8. Application's top-level window receives the OS close notification and
// allows the window to close based on the flag from #6B.
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// ---------------------------------------------------------------------------
-//
-// The contents of this file must follow a specific format in order to
-// support the CEF translator tool. See the translator.README.txt file in the
-// tools directory for more information.
-//
-
-#ifndef CEF_INCLUDE_CEF_NAVIGATION_ENTRY_H_
-#define CEF_INCLUDE_CEF_NAVIGATION_ENTRY_H_
-#pragma once
-
-#include "include/cef_base.h"
-
-///
-// Class used to represent an entry in navigation history.
-///
-/*--cef(source=library)--*/
-class CefNavigationEntry : public virtual CefBase {
- public:
- typedef cef_transition_type_t TransitionType;
-
- ///
- // Returns true if this object is valid. Do not call any other methods if this
- // function returns false.
- ///
- /*--cef()--*/
- virtual bool IsValid() =0;
-
- ///
- // Returns the actual URL of the page. For some pages this may be data: URL or
- // similar. Use GetDisplayURL() to return a display-friendly version.
- ///
- /*--cef()--*/
- virtual CefString GetURL() =0;
-
- ///
- // Returns a display-friendly version of the URL.
- ///
- /*--cef()--*/
- virtual CefString GetDisplayURL() =0;
-
- ///
- // Returns the original URL that was entered by the user before any redirects.
- ///
- /*--cef()--*/
- virtual CefString GetOriginalURL() =0;
-
- ///
- // Returns the title set by the page. This value may be empty.
- ///
- /*--cef()--*/
- virtual CefString GetTitle() =0;
-
- ///
- // Returns the transition type which indicates what the user did to move to
- // this page from the previous page.
- ///
- /*--cef(default_retval=TT_EXPLICIT)--*/
- virtual TransitionType GetTransitionType() =0;
-
- ///
- // Returns true if this navigation includes post data.
- ///
- /*--cef()--*/
- virtual bool HasPostData() =0;
-
- ///
- // Returns the name of the sub-frame that navigated or an empty value if the
- // main frame navigated.
- ///
- /*--cef()--*/
- virtual CefString GetFrameName() =0;
-
- ///
- // Returns the time for the last known successful navigation completion. A
- // navigation may be completed more than once if the page is reloaded. May be
- // 0 if the navigation has not yet completed.
- ///
- /*--cef()--*/
- virtual CefTime GetCompletionTime() =0;
-
- ///
- // Returns the HTTP status code for the last known successful navigation
- // response. May be 0 if the response has not yet been received or if the
- // navigation has not yet completed.
- ///
- /*--cef()--*/
- virtual int GetHttpStatusCode() =0;
-};
-
-#endif // CEF_INCLUDE_CEF_NAVIGATION_ENTRY_H_
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// ---------------------------------------------------------------------------
// From blink_resources.h:
-#define IDR_UASTYLE_HTML_CSS 30350
-#define IDR_UASTYLE_QUIRKS_CSS 30351
-#define IDR_UASTYLE_VIEW_SOURCE_CSS 30352
-#define IDR_UASTYLE_THEME_CHROMIUM_CSS 30353
-#define IDR_UASTYLE_THEME_CHROMIUM_ANDROID_CSS 30354
-#define IDR_UASTYLE_MEDIA_CONTROLS_ANDROID_CSS 30355
-#define IDR_UASTYLE_THEME_CHROMIUM_LINUX_CSS 30356
-#define IDR_UASTYLE_THEME_MAC_CSS 30357
-#define IDR_UASTYLE_THEME_CHROMIUM_SKIA_CSS 30358
-#define IDR_UASTYLE_THEME_INPUT_MULTIPLE_FIELDS_CSS 30359
-#define IDR_UASTYLE_THEME_WIN_CSS 30360
-#define IDR_UASTYLE_THEME_WIN_QUIRKS_CSS 30361
-#define IDR_UASTYLE_SVG_CSS 30362
-#define IDR_UASTYLE_NAVIGATION_TRANSITIONS_CSS 30363
-#define IDR_UASTYLE_MATHML_CSS 30364
-#define IDR_UASTYLE_MEDIA_CONTROLS_CSS 30365
-#define IDR_UASTYLE_FULLSCREEN_CSS 30366
-#define IDR_UASTYLE_XHTMLMP_CSS 30367
-#define IDR_UASTYLE_VIEWPORT_ANDROID_CSS 30368
-#define IDR_INSPECTOR_OVERLAY_PAGE_HTML 30369
-#define IDR_INSPECTOR_INJECTED_SCRIPT_SOURCE_JS 30370
-#define IDR_INSPECTOR_DEBUGGER_SCRIPT_SOURCE_JS 30371
-#define IDR_PRIVATE_SCRIPT_DOCUMENTEXECCOMMAND_JS 30372
-#define IDR_PRIVATE_SCRIPT_DOCUMENTXMLTREEVIEWER_CSS 30373
-#define IDR_PRIVATE_SCRIPT_DOCUMENTXMLTREEVIEWER_JS 30374
-#define IDR_PRIVATE_SCRIPT_HTMLMARQUEEELEMENT_JS 30375
-#define IDR_PRIVATE_SCRIPT_PLUGINPLACEHOLDERELEMENT_JS 30376
-#define IDR_PRIVATE_SCRIPT_PRIVATESCRIPTRUNNER_JS 30377
-#define IDR_PICKER_COMMON_JS 30378
-#define IDR_PICKER_COMMON_CSS 30379
-#define IDR_CALENDAR_PICKER_CSS 30380
-#define IDR_CALENDAR_PICKER_JS 30381
-#define IDR_PICKER_BUTTON_CSS 30382
-#define IDR_SUGGESTION_PICKER_CSS 30383
-#define IDR_SUGGESTION_PICKER_JS 30384
-#define IDR_COLOR_SUGGESTION_PICKER_CSS 30385
-#define IDR_COLOR_SUGGESTION_PICKER_JS 30386
-#define IDR_LIST_PICKER_CSS 30387
-#define IDR_LIST_PICKER_JS 30388
-#define IDR_AUDIO_SPATIALIZATION_COMPOSITE 30389
-#define IDR_AUDIO_SPATIALIZATION_T000_P000 30390
-#define IDR_AUDIO_SPATIALIZATION_T000_P015 30391
-#define IDR_AUDIO_SPATIALIZATION_T000_P030 30392
-#define IDR_AUDIO_SPATIALIZATION_T000_P045 30393
-#define IDR_AUDIO_SPATIALIZATION_T000_P060 30394
-#define IDR_AUDIO_SPATIALIZATION_T000_P075 30395
-#define IDR_AUDIO_SPATIALIZATION_T000_P090 30396
-#define IDR_AUDIO_SPATIALIZATION_T000_P315 30397
-#define IDR_AUDIO_SPATIALIZATION_T000_P330 30398
-#define IDR_AUDIO_SPATIALIZATION_T000_P345 30399
-#define IDR_AUDIO_SPATIALIZATION_T015_P000 30400
-#define IDR_AUDIO_SPATIALIZATION_T015_P015 30401
-#define IDR_AUDIO_SPATIALIZATION_T015_P030 30402
-#define IDR_AUDIO_SPATIALIZATION_T015_P045 30403
-#define IDR_AUDIO_SPATIALIZATION_T015_P060 30404
-#define IDR_AUDIO_SPATIALIZATION_T015_P075 30405
-#define IDR_AUDIO_SPATIALIZATION_T015_P090 30406
-#define IDR_AUDIO_SPATIALIZATION_T015_P315 30407
-#define IDR_AUDIO_SPATIALIZATION_T015_P330 30408
-#define IDR_AUDIO_SPATIALIZATION_T015_P345 30409
-#define IDR_AUDIO_SPATIALIZATION_T030_P000 30410
-#define IDR_AUDIO_SPATIALIZATION_T030_P015 30411
-#define IDR_AUDIO_SPATIALIZATION_T030_P030 30412
-#define IDR_AUDIO_SPATIALIZATION_T030_P045 30413
-#define IDR_AUDIO_SPATIALIZATION_T030_P060 30414
-#define IDR_AUDIO_SPATIALIZATION_T030_P075 30415
-#define IDR_AUDIO_SPATIALIZATION_T030_P090 30416
-#define IDR_AUDIO_SPATIALIZATION_T030_P315 30417
-#define IDR_AUDIO_SPATIALIZATION_T030_P330 30418
-#define IDR_AUDIO_SPATIALIZATION_T030_P345 30419
-#define IDR_AUDIO_SPATIALIZATION_T045_P000 30420
-#define IDR_AUDIO_SPATIALIZATION_T045_P015 30421
-#define IDR_AUDIO_SPATIALIZATION_T045_P030 30422
-#define IDR_AUDIO_SPATIALIZATION_T045_P045 30423
-#define IDR_AUDIO_SPATIALIZATION_T045_P060 30424
-#define IDR_AUDIO_SPATIALIZATION_T045_P075 30425
-#define IDR_AUDIO_SPATIALIZATION_T045_P090 30426
-#define IDR_AUDIO_SPATIALIZATION_T045_P315 30427
-#define IDR_AUDIO_SPATIALIZATION_T045_P330 30428
-#define IDR_AUDIO_SPATIALIZATION_T045_P345 30429
-#define IDR_AUDIO_SPATIALIZATION_T060_P000 30430
-#define IDR_AUDIO_SPATIALIZATION_T060_P015 30431
-#define IDR_AUDIO_SPATIALIZATION_T060_P030 30432
-#define IDR_AUDIO_SPATIALIZATION_T060_P045 30433
-#define IDR_AUDIO_SPATIALIZATION_T060_P060 30434
-#define IDR_AUDIO_SPATIALIZATION_T060_P075 30435
-#define IDR_AUDIO_SPATIALIZATION_T060_P090 30436
-#define IDR_AUDIO_SPATIALIZATION_T060_P315 30437
-#define IDR_AUDIO_SPATIALIZATION_T060_P330 30438
-#define IDR_AUDIO_SPATIALIZATION_T060_P345 30439
-#define IDR_AUDIO_SPATIALIZATION_T075_P000 30440
-#define IDR_AUDIO_SPATIALIZATION_T075_P015 30441
-#define IDR_AUDIO_SPATIALIZATION_T075_P030 30442
-#define IDR_AUDIO_SPATIALIZATION_T075_P045 30443
-#define IDR_AUDIO_SPATIALIZATION_T075_P060 30444
-#define IDR_AUDIO_SPATIALIZATION_T075_P075 30445
-#define IDR_AUDIO_SPATIALIZATION_T075_P090 30446
-#define IDR_AUDIO_SPATIALIZATION_T075_P315 30447
-#define IDR_AUDIO_SPATIALIZATION_T075_P330 30448
-#define IDR_AUDIO_SPATIALIZATION_T075_P345 30449
-#define IDR_AUDIO_SPATIALIZATION_T090_P000 30450
-#define IDR_AUDIO_SPATIALIZATION_T090_P015 30451
-#define IDR_AUDIO_SPATIALIZATION_T090_P030 30452
-#define IDR_AUDIO_SPATIALIZATION_T090_P045 30453
-#define IDR_AUDIO_SPATIALIZATION_T090_P060 30454
-#define IDR_AUDIO_SPATIALIZATION_T090_P075 30455
-#define IDR_AUDIO_SPATIALIZATION_T090_P090 30456
-#define IDR_AUDIO_SPATIALIZATION_T090_P315 30457
-#define IDR_AUDIO_SPATIALIZATION_T090_P330 30458
-#define IDR_AUDIO_SPATIALIZATION_T090_P345 30459
-#define IDR_AUDIO_SPATIALIZATION_T105_P000 30460
-#define IDR_AUDIO_SPATIALIZATION_T105_P015 30461
-#define IDR_AUDIO_SPATIALIZATION_T105_P030 30462
-#define IDR_AUDIO_SPATIALIZATION_T105_P045 30463
-#define IDR_AUDIO_SPATIALIZATION_T105_P060 30464
-#define IDR_AUDIO_SPATIALIZATION_T105_P075 30465
-#define IDR_AUDIO_SPATIALIZATION_T105_P090 30466
-#define IDR_AUDIO_SPATIALIZATION_T105_P315 30467
-#define IDR_AUDIO_SPATIALIZATION_T105_P330 30468
-#define IDR_AUDIO_SPATIALIZATION_T105_P345 30469
-#define IDR_AUDIO_SPATIALIZATION_T120_P000 30470
-#define IDR_AUDIO_SPATIALIZATION_T120_P015 30471
-#define IDR_AUDIO_SPATIALIZATION_T120_P030 30472
-#define IDR_AUDIO_SPATIALIZATION_T120_P045 30473
-#define IDR_AUDIO_SPATIALIZATION_T120_P060 30474
-#define IDR_AUDIO_SPATIALIZATION_T120_P075 30475
-#define IDR_AUDIO_SPATIALIZATION_T120_P090 30476
-#define IDR_AUDIO_SPATIALIZATION_T120_P315 30477
-#define IDR_AUDIO_SPATIALIZATION_T120_P330 30478
-#define IDR_AUDIO_SPATIALIZATION_T120_P345 30479
-#define IDR_AUDIO_SPATIALIZATION_T135_P000 30480
-#define IDR_AUDIO_SPATIALIZATION_T135_P015 30481
-#define IDR_AUDIO_SPATIALIZATION_T135_P030 30482
-#define IDR_AUDIO_SPATIALIZATION_T135_P045 30483
-#define IDR_AUDIO_SPATIALIZATION_T135_P060 30484
-#define IDR_AUDIO_SPATIALIZATION_T135_P075 30485
-#define IDR_AUDIO_SPATIALIZATION_T135_P090 30486
-#define IDR_AUDIO_SPATIALIZATION_T135_P315 30487
-#define IDR_AUDIO_SPATIALIZATION_T135_P330 30488
-#define IDR_AUDIO_SPATIALIZATION_T135_P345 30489
-#define IDR_AUDIO_SPATIALIZATION_T150_P000 30490
-#define IDR_AUDIO_SPATIALIZATION_T150_P015 30491
-#define IDR_AUDIO_SPATIALIZATION_T150_P030 30492
-#define IDR_AUDIO_SPATIALIZATION_T150_P045 30493
-#define IDR_AUDIO_SPATIALIZATION_T150_P060 30494
-#define IDR_AUDIO_SPATIALIZATION_T150_P075 30495
-#define IDR_AUDIO_SPATIALIZATION_T150_P090 30496
-#define IDR_AUDIO_SPATIALIZATION_T150_P315 30497
-#define IDR_AUDIO_SPATIALIZATION_T150_P330 30498
-#define IDR_AUDIO_SPATIALIZATION_T150_P345 30499
-#define IDR_AUDIO_SPATIALIZATION_T165_P000 30500
-#define IDR_AUDIO_SPATIALIZATION_T165_P015 30501
-#define IDR_AUDIO_SPATIALIZATION_T165_P030 30502
-#define IDR_AUDIO_SPATIALIZATION_T165_P045 30503
-#define IDR_AUDIO_SPATIALIZATION_T165_P060 30504
-#define IDR_AUDIO_SPATIALIZATION_T165_P075 30505
-#define IDR_AUDIO_SPATIALIZATION_T165_P090 30506
-#define IDR_AUDIO_SPATIALIZATION_T165_P315 30507
-#define IDR_AUDIO_SPATIALIZATION_T165_P330 30508
-#define IDR_AUDIO_SPATIALIZATION_T165_P345 30509
-#define IDR_AUDIO_SPATIALIZATION_T180_P000 30510
-#define IDR_AUDIO_SPATIALIZATION_T180_P015 30511
-#define IDR_AUDIO_SPATIALIZATION_T180_P030 30512
-#define IDR_AUDIO_SPATIALIZATION_T180_P045 30513
-#define IDR_AUDIO_SPATIALIZATION_T180_P060 30514
-#define IDR_AUDIO_SPATIALIZATION_T180_P075 30515
-#define IDR_AUDIO_SPATIALIZATION_T180_P090 30516
-#define IDR_AUDIO_SPATIALIZATION_T180_P315 30517
-#define IDR_AUDIO_SPATIALIZATION_T180_P330 30518
-#define IDR_AUDIO_SPATIALIZATION_T180_P345 30519
-#define IDR_AUDIO_SPATIALIZATION_T195_P000 30520
-#define IDR_AUDIO_SPATIALIZATION_T195_P015 30521
-#define IDR_AUDIO_SPATIALIZATION_T195_P030 30522
-#define IDR_AUDIO_SPATIALIZATION_T195_P045 30523
-#define IDR_AUDIO_SPATIALIZATION_T195_P060 30524
-#define IDR_AUDIO_SPATIALIZATION_T195_P075 30525
-#define IDR_AUDIO_SPATIALIZATION_T195_P090 30526
-#define IDR_AUDIO_SPATIALIZATION_T195_P315 30527
-#define IDR_AUDIO_SPATIALIZATION_T195_P330 30528
-#define IDR_AUDIO_SPATIALIZATION_T195_P345 30529
-#define IDR_AUDIO_SPATIALIZATION_T210_P000 30530
-#define IDR_AUDIO_SPATIALIZATION_T210_P015 30531
-#define IDR_AUDIO_SPATIALIZATION_T210_P030 30532
-#define IDR_AUDIO_SPATIALIZATION_T210_P045 30533
-#define IDR_AUDIO_SPATIALIZATION_T210_P060 30534
-#define IDR_AUDIO_SPATIALIZATION_T210_P075 30535
-#define IDR_AUDIO_SPATIALIZATION_T210_P090 30536
-#define IDR_AUDIO_SPATIALIZATION_T210_P315 30537
-#define IDR_AUDIO_SPATIALIZATION_T210_P330 30538
-#define IDR_AUDIO_SPATIALIZATION_T210_P345 30539
-#define IDR_AUDIO_SPATIALIZATION_T225_P000 30540
-#define IDR_AUDIO_SPATIALIZATION_T225_P015 30541
-#define IDR_AUDIO_SPATIALIZATION_T225_P030 30542
-#define IDR_AUDIO_SPATIALIZATION_T225_P045 30543
-#define IDR_AUDIO_SPATIALIZATION_T225_P060 30544
-#define IDR_AUDIO_SPATIALIZATION_T225_P075 30545
-#define IDR_AUDIO_SPATIALIZATION_T225_P090 30546
-#define IDR_AUDIO_SPATIALIZATION_T225_P315 30547
-#define IDR_AUDIO_SPATIALIZATION_T225_P330 30548
-#define IDR_AUDIO_SPATIALIZATION_T225_P345 30549
-#define IDR_AUDIO_SPATIALIZATION_T240_P000 30550
-#define IDR_AUDIO_SPATIALIZATION_T240_P015 30551
-#define IDR_AUDIO_SPATIALIZATION_T240_P030 30552
-#define IDR_AUDIO_SPATIALIZATION_T240_P045 30553
-#define IDR_AUDIO_SPATIALIZATION_T240_P060 30554
-#define IDR_AUDIO_SPATIALIZATION_T240_P075 30555
-#define IDR_AUDIO_SPATIALIZATION_T240_P090 30556
-#define IDR_AUDIO_SPATIALIZATION_T240_P315 30557
-#define IDR_AUDIO_SPATIALIZATION_T240_P330 30558
-#define IDR_AUDIO_SPATIALIZATION_T240_P345 30559
-#define IDR_AUDIO_SPATIALIZATION_T255_P000 30560
-#define IDR_AUDIO_SPATIALIZATION_T255_P015 30561
-#define IDR_AUDIO_SPATIALIZATION_T255_P030 30562
-#define IDR_AUDIO_SPATIALIZATION_T255_P045 30563
-#define IDR_AUDIO_SPATIALIZATION_T255_P060 30564
-#define IDR_AUDIO_SPATIALIZATION_T255_P075 30565
-#define IDR_AUDIO_SPATIALIZATION_T255_P090 30566
-#define IDR_AUDIO_SPATIALIZATION_T255_P315 30567
-#define IDR_AUDIO_SPATIALIZATION_T255_P330 30568
-#define IDR_AUDIO_SPATIALIZATION_T255_P345 30569
-#define IDR_AUDIO_SPATIALIZATION_T270_P000 30570
-#define IDR_AUDIO_SPATIALIZATION_T270_P015 30571
-#define IDR_AUDIO_SPATIALIZATION_T270_P030 30572
-#define IDR_AUDIO_SPATIALIZATION_T270_P045 30573
-#define IDR_AUDIO_SPATIALIZATION_T270_P060 30574
-#define IDR_AUDIO_SPATIALIZATION_T270_P075 30575
-#define IDR_AUDIO_SPATIALIZATION_T270_P090 30576
-#define IDR_AUDIO_SPATIALIZATION_T270_P315 30577
-#define IDR_AUDIO_SPATIALIZATION_T270_P330 30578
-#define IDR_AUDIO_SPATIALIZATION_T270_P345 30579
-#define IDR_AUDIO_SPATIALIZATION_T285_P000 30580
-#define IDR_AUDIO_SPATIALIZATION_T285_P015 30581
-#define IDR_AUDIO_SPATIALIZATION_T285_P030 30582
-#define IDR_AUDIO_SPATIALIZATION_T285_P045 30583
-#define IDR_AUDIO_SPATIALIZATION_T285_P060 30584
-#define IDR_AUDIO_SPATIALIZATION_T285_P075 30585
-#define IDR_AUDIO_SPATIALIZATION_T285_P090 30586
-#define IDR_AUDIO_SPATIALIZATION_T285_P315 30587
-#define IDR_AUDIO_SPATIALIZATION_T285_P330 30588
-#define IDR_AUDIO_SPATIALIZATION_T285_P345 30589
-#define IDR_AUDIO_SPATIALIZATION_T300_P000 30590
-#define IDR_AUDIO_SPATIALIZATION_T300_P015 30591
-#define IDR_AUDIO_SPATIALIZATION_T300_P030 30592
-#define IDR_AUDIO_SPATIALIZATION_T300_P045 30593
-#define IDR_AUDIO_SPATIALIZATION_T300_P060 30594
-#define IDR_AUDIO_SPATIALIZATION_T300_P075 30595
-#define IDR_AUDIO_SPATIALIZATION_T300_P090 30596
-#define IDR_AUDIO_SPATIALIZATION_T300_P315 30597
-#define IDR_AUDIO_SPATIALIZATION_T300_P330 30598
-#define IDR_AUDIO_SPATIALIZATION_T300_P345 30599
-#define IDR_AUDIO_SPATIALIZATION_T315_P000 30600
-#define IDR_AUDIO_SPATIALIZATION_T315_P015 30601
-#define IDR_AUDIO_SPATIALIZATION_T315_P030 30602
-#define IDR_AUDIO_SPATIALIZATION_T315_P045 30603
-#define IDR_AUDIO_SPATIALIZATION_T315_P060 30604
-#define IDR_AUDIO_SPATIALIZATION_T315_P075 30605
-#define IDR_AUDIO_SPATIALIZATION_T315_P090 30606
-#define IDR_AUDIO_SPATIALIZATION_T315_P315 30607
-#define IDR_AUDIO_SPATIALIZATION_T315_P330 30608
-#define IDR_AUDIO_SPATIALIZATION_T315_P345 30609
-#define IDR_AUDIO_SPATIALIZATION_T330_P000 30610
-#define IDR_AUDIO_SPATIALIZATION_T330_P015 30611
-#define IDR_AUDIO_SPATIALIZATION_T330_P030 30612
-#define IDR_AUDIO_SPATIALIZATION_T330_P045 30613
-#define IDR_AUDIO_SPATIALIZATION_T330_P060 30614
-#define IDR_AUDIO_SPATIALIZATION_T330_P075 30615
-#define IDR_AUDIO_SPATIALIZATION_T330_P090 30616
-#define IDR_AUDIO_SPATIALIZATION_T330_P315 30617
-#define IDR_AUDIO_SPATIALIZATION_T330_P330 30618
-#define IDR_AUDIO_SPATIALIZATION_T330_P345 30619
-#define IDR_AUDIO_SPATIALIZATION_T345_P000 30620
-#define IDR_AUDIO_SPATIALIZATION_T345_P015 30621
-#define IDR_AUDIO_SPATIALIZATION_T345_P030 30622
-#define IDR_AUDIO_SPATIALIZATION_T345_P045 30623
-#define IDR_AUDIO_SPATIALIZATION_T345_P060 30624
-#define IDR_AUDIO_SPATIALIZATION_T345_P075 30625
-#define IDR_AUDIO_SPATIALIZATION_T345_P090 30626
-#define IDR_AUDIO_SPATIALIZATION_T345_P315 30627
-#define IDR_AUDIO_SPATIALIZATION_T345_P330 30628
-#define IDR_AUDIO_SPATIALIZATION_T345_P345 30629
+#define IDR_AUDIO_SPATIALIZATION_COMPOSITE 30500
+#define IDR_AUDIO_SPATIALIZATION_T000_P000 30501
+#define IDR_AUDIO_SPATIALIZATION_T000_P015 30502
+#define IDR_AUDIO_SPATIALIZATION_T000_P030 30503
+#define IDR_AUDIO_SPATIALIZATION_T000_P045 30504
+#define IDR_AUDIO_SPATIALIZATION_T000_P060 30505
+#define IDR_AUDIO_SPATIALIZATION_T000_P075 30506
+#define IDR_AUDIO_SPATIALIZATION_T000_P090 30507
+#define IDR_AUDIO_SPATIALIZATION_T000_P315 30508
+#define IDR_AUDIO_SPATIALIZATION_T000_P330 30509
+#define IDR_AUDIO_SPATIALIZATION_T000_P345 30510
+#define IDR_AUDIO_SPATIALIZATION_T015_P000 30511
+#define IDR_AUDIO_SPATIALIZATION_T015_P015 30512
+#define IDR_AUDIO_SPATIALIZATION_T015_P030 30513
+#define IDR_AUDIO_SPATIALIZATION_T015_P045 30514
+#define IDR_AUDIO_SPATIALIZATION_T015_P060 30515
+#define IDR_AUDIO_SPATIALIZATION_T015_P075 30516
+#define IDR_AUDIO_SPATIALIZATION_T015_P090 30517
+#define IDR_AUDIO_SPATIALIZATION_T015_P315 30518
+#define IDR_AUDIO_SPATIALIZATION_T015_P330 30519
+#define IDR_AUDIO_SPATIALIZATION_T015_P345 30520
+#define IDR_AUDIO_SPATIALIZATION_T030_P000 30521
+#define IDR_AUDIO_SPATIALIZATION_T030_P015 30522
+#define IDR_AUDIO_SPATIALIZATION_T030_P030 30523
+#define IDR_AUDIO_SPATIALIZATION_T030_P045 30524
+#define IDR_AUDIO_SPATIALIZATION_T030_P060 30525
+#define IDR_AUDIO_SPATIALIZATION_T030_P075 30526
+#define IDR_AUDIO_SPATIALIZATION_T030_P090 30527
+#define IDR_AUDIO_SPATIALIZATION_T030_P315 30528
+#define IDR_AUDIO_SPATIALIZATION_T030_P330 30529
+#define IDR_AUDIO_SPATIALIZATION_T030_P345 30530
+#define IDR_AUDIO_SPATIALIZATION_T045_P000 30531
+#define IDR_AUDIO_SPATIALIZATION_T045_P015 30532
+#define IDR_AUDIO_SPATIALIZATION_T045_P030 30533
+#define IDR_AUDIO_SPATIALIZATION_T045_P045 30534
+#define IDR_AUDIO_SPATIALIZATION_T045_P060 30535
+#define IDR_AUDIO_SPATIALIZATION_T045_P075 30536
+#define IDR_AUDIO_SPATIALIZATION_T045_P090 30537
+#define IDR_AUDIO_SPATIALIZATION_T045_P315 30538
+#define IDR_AUDIO_SPATIALIZATION_T045_P330 30539
+#define IDR_AUDIO_SPATIALIZATION_T045_P345 30540
+#define IDR_AUDIO_SPATIALIZATION_T060_P000 30541
+#define IDR_AUDIO_SPATIALIZATION_T060_P015 30542
+#define IDR_AUDIO_SPATIALIZATION_T060_P030 30543
+#define IDR_AUDIO_SPATIALIZATION_T060_P045 30544
+#define IDR_AUDIO_SPATIALIZATION_T060_P060 30545
+#define IDR_AUDIO_SPATIALIZATION_T060_P075 30546
+#define IDR_AUDIO_SPATIALIZATION_T060_P090 30547
+#define IDR_AUDIO_SPATIALIZATION_T060_P315 30548
+#define IDR_AUDIO_SPATIALIZATION_T060_P330 30549
+#define IDR_AUDIO_SPATIALIZATION_T060_P345 30550
+#define IDR_AUDIO_SPATIALIZATION_T075_P000 30551
+#define IDR_AUDIO_SPATIALIZATION_T075_P015 30552
+#define IDR_AUDIO_SPATIALIZATION_T075_P030 30553
+#define IDR_AUDIO_SPATIALIZATION_T075_P045 30554
+#define IDR_AUDIO_SPATIALIZATION_T075_P060 30555
+#define IDR_AUDIO_SPATIALIZATION_T075_P075 30556
+#define IDR_AUDIO_SPATIALIZATION_T075_P090 30557
+#define IDR_AUDIO_SPATIALIZATION_T075_P315 30558
+#define IDR_AUDIO_SPATIALIZATION_T075_P330 30559
+#define IDR_AUDIO_SPATIALIZATION_T075_P345 30560
+#define IDR_AUDIO_SPATIALIZATION_T090_P000 30561
+#define IDR_AUDIO_SPATIALIZATION_T090_P015 30562
+#define IDR_AUDIO_SPATIALIZATION_T090_P030 30563
+#define IDR_AUDIO_SPATIALIZATION_T090_P045 30564
+#define IDR_AUDIO_SPATIALIZATION_T090_P060 30565
+#define IDR_AUDIO_SPATIALIZATION_T090_P075 30566
+#define IDR_AUDIO_SPATIALIZATION_T090_P090 30567
+#define IDR_AUDIO_SPATIALIZATION_T090_P315 30568
+#define IDR_AUDIO_SPATIALIZATION_T090_P330 30569
+#define IDR_AUDIO_SPATIALIZATION_T090_P345 30570
+#define IDR_AUDIO_SPATIALIZATION_T105_P000 30571
+#define IDR_AUDIO_SPATIALIZATION_T105_P015 30572
+#define IDR_AUDIO_SPATIALIZATION_T105_P030 30573
+#define IDR_AUDIO_SPATIALIZATION_T105_P045 30574
+#define IDR_AUDIO_SPATIALIZATION_T105_P060 30575
+#define IDR_AUDIO_SPATIALIZATION_T105_P075 30576
+#define IDR_AUDIO_SPATIALIZATION_T105_P090 30577
+#define IDR_AUDIO_SPATIALIZATION_T105_P315 30578
+#define IDR_AUDIO_SPATIALIZATION_T105_P330 30579
+#define IDR_AUDIO_SPATIALIZATION_T105_P345 30580
+#define IDR_AUDIO_SPATIALIZATION_T120_P000 30581
+#define IDR_AUDIO_SPATIALIZATION_T120_P015 30582
+#define IDR_AUDIO_SPATIALIZATION_T120_P030 30583
+#define IDR_AUDIO_SPATIALIZATION_T120_P045 30584
+#define IDR_AUDIO_SPATIALIZATION_T120_P060 30585
+#define IDR_AUDIO_SPATIALIZATION_T120_P075 30586
+#define IDR_AUDIO_SPATIALIZATION_T120_P090 30587
+#define IDR_AUDIO_SPATIALIZATION_T120_P315 30588
+#define IDR_AUDIO_SPATIALIZATION_T120_P330 30589
+#define IDR_AUDIO_SPATIALIZATION_T120_P345 30590
+#define IDR_AUDIO_SPATIALIZATION_T135_P000 30591
+#define IDR_AUDIO_SPATIALIZATION_T135_P015 30592
+#define IDR_AUDIO_SPATIALIZATION_T135_P030 30593
+#define IDR_AUDIO_SPATIALIZATION_T135_P045 30594
+#define IDR_AUDIO_SPATIALIZATION_T135_P060 30595
+#define IDR_AUDIO_SPATIALIZATION_T135_P075 30596
+#define IDR_AUDIO_SPATIALIZATION_T135_P090 30597
+#define IDR_AUDIO_SPATIALIZATION_T135_P315 30598
+#define IDR_AUDIO_SPATIALIZATION_T135_P330 30599
+#define IDR_AUDIO_SPATIALIZATION_T135_P345 30600
+#define IDR_AUDIO_SPATIALIZATION_T150_P000 30601
+#define IDR_AUDIO_SPATIALIZATION_T150_P015 30602
+#define IDR_AUDIO_SPATIALIZATION_T150_P030 30603
+#define IDR_AUDIO_SPATIALIZATION_T150_P045 30604
+#define IDR_AUDIO_SPATIALIZATION_T150_P060 30605
+#define IDR_AUDIO_SPATIALIZATION_T150_P075 30606
+#define IDR_AUDIO_SPATIALIZATION_T150_P090 30607
+#define IDR_AUDIO_SPATIALIZATION_T150_P315 30608
+#define IDR_AUDIO_SPATIALIZATION_T150_P330 30609
+#define IDR_AUDIO_SPATIALIZATION_T150_P345 30610
+#define IDR_AUDIO_SPATIALIZATION_T165_P000 30611
+#define IDR_AUDIO_SPATIALIZATION_T165_P015 30612
+#define IDR_AUDIO_SPATIALIZATION_T165_P030 30613
+#define IDR_AUDIO_SPATIALIZATION_T165_P045 30614
+#define IDR_AUDIO_SPATIALIZATION_T165_P060 30615
+#define IDR_AUDIO_SPATIALIZATION_T165_P075 30616
+#define IDR_AUDIO_SPATIALIZATION_T165_P090 30617
+#define IDR_AUDIO_SPATIALIZATION_T165_P315 30618
+#define IDR_AUDIO_SPATIALIZATION_T165_P330 30619
+#define IDR_AUDIO_SPATIALIZATION_T165_P345 30620
+#define IDR_AUDIO_SPATIALIZATION_T180_P000 30621
+#define IDR_AUDIO_SPATIALIZATION_T180_P015 30622
+#define IDR_AUDIO_SPATIALIZATION_T180_P030 30623
+#define IDR_AUDIO_SPATIALIZATION_T180_P045 30624
+#define IDR_AUDIO_SPATIALIZATION_T180_P060 30625
+#define IDR_AUDIO_SPATIALIZATION_T180_P075 30626
+#define IDR_AUDIO_SPATIALIZATION_T180_P090 30627
+#define IDR_AUDIO_SPATIALIZATION_T180_P315 30628
+#define IDR_AUDIO_SPATIALIZATION_T180_P330 30629
+#define IDR_AUDIO_SPATIALIZATION_T180_P345 30630
+#define IDR_AUDIO_SPATIALIZATION_T195_P000 30631
+#define IDR_AUDIO_SPATIALIZATION_T195_P015 30632
+#define IDR_AUDIO_SPATIALIZATION_T195_P030 30633
+#define IDR_AUDIO_SPATIALIZATION_T195_P045 30634
+#define IDR_AUDIO_SPATIALIZATION_T195_P060 30635
+#define IDR_AUDIO_SPATIALIZATION_T195_P075 30636
+#define IDR_AUDIO_SPATIALIZATION_T195_P090 30637
+#define IDR_AUDIO_SPATIALIZATION_T195_P315 30638
+#define IDR_AUDIO_SPATIALIZATION_T195_P330 30639
+#define IDR_AUDIO_SPATIALIZATION_T195_P345 30640
+#define IDR_AUDIO_SPATIALIZATION_T210_P000 30641
+#define IDR_AUDIO_SPATIALIZATION_T210_P015 30642
+#define IDR_AUDIO_SPATIALIZATION_T210_P030 30643
+#define IDR_AUDIO_SPATIALIZATION_T210_P045 30644
+#define IDR_AUDIO_SPATIALIZATION_T210_P060 30645
+#define IDR_AUDIO_SPATIALIZATION_T210_P075 30646
+#define IDR_AUDIO_SPATIALIZATION_T210_P090 30647
+#define IDR_AUDIO_SPATIALIZATION_T210_P315 30648
+#define IDR_AUDIO_SPATIALIZATION_T210_P330 30649
+#define IDR_AUDIO_SPATIALIZATION_T210_P345 30650
+#define IDR_AUDIO_SPATIALIZATION_T225_P000 30651
+#define IDR_AUDIO_SPATIALIZATION_T225_P015 30652
+#define IDR_AUDIO_SPATIALIZATION_T225_P030 30653
+#define IDR_AUDIO_SPATIALIZATION_T225_P045 30654
+#define IDR_AUDIO_SPATIALIZATION_T225_P060 30655
+#define IDR_AUDIO_SPATIALIZATION_T225_P075 30656
+#define IDR_AUDIO_SPATIALIZATION_T225_P090 30657
+#define IDR_AUDIO_SPATIALIZATION_T225_P315 30658
+#define IDR_AUDIO_SPATIALIZATION_T225_P330 30659
+#define IDR_AUDIO_SPATIALIZATION_T225_P345 30660
+#define IDR_AUDIO_SPATIALIZATION_T240_P000 30661
+#define IDR_AUDIO_SPATIALIZATION_T240_P015 30662
+#define IDR_AUDIO_SPATIALIZATION_T240_P030 30663
+#define IDR_AUDIO_SPATIALIZATION_T240_P045 30664
+#define IDR_AUDIO_SPATIALIZATION_T240_P060 30665
+#define IDR_AUDIO_SPATIALIZATION_T240_P075 30666
+#define IDR_AUDIO_SPATIALIZATION_T240_P090 30667
+#define IDR_AUDIO_SPATIALIZATION_T240_P315 30668
+#define IDR_AUDIO_SPATIALIZATION_T240_P330 30669
+#define IDR_AUDIO_SPATIALIZATION_T240_P345 30670
+#define IDR_AUDIO_SPATIALIZATION_T255_P000 30671
+#define IDR_AUDIO_SPATIALIZATION_T255_P015 30672
+#define IDR_AUDIO_SPATIALIZATION_T255_P030 30673
+#define IDR_AUDIO_SPATIALIZATION_T255_P045 30674
+#define IDR_AUDIO_SPATIALIZATION_T255_P060 30675
+#define IDR_AUDIO_SPATIALIZATION_T255_P075 30676
+#define IDR_AUDIO_SPATIALIZATION_T255_P090 30677
+#define IDR_AUDIO_SPATIALIZATION_T255_P315 30678
+#define IDR_AUDIO_SPATIALIZATION_T255_P330 30679
+#define IDR_AUDIO_SPATIALIZATION_T255_P345 30680
+#define IDR_AUDIO_SPATIALIZATION_T270_P000 30681
+#define IDR_AUDIO_SPATIALIZATION_T270_P015 30682
+#define IDR_AUDIO_SPATIALIZATION_T270_P030 30683
+#define IDR_AUDIO_SPATIALIZATION_T270_P045 30684
+#define IDR_AUDIO_SPATIALIZATION_T270_P060 30685
+#define IDR_AUDIO_SPATIALIZATION_T270_P075 30686
+#define IDR_AUDIO_SPATIALIZATION_T270_P090 30687
+#define IDR_AUDIO_SPATIALIZATION_T270_P315 30688
+#define IDR_AUDIO_SPATIALIZATION_T270_P330 30689
+#define IDR_AUDIO_SPATIALIZATION_T270_P345 30690
+#define IDR_AUDIO_SPATIALIZATION_T285_P000 30691
+#define IDR_AUDIO_SPATIALIZATION_T285_P015 30692
+#define IDR_AUDIO_SPATIALIZATION_T285_P030 30693
+#define IDR_AUDIO_SPATIALIZATION_T285_P045 30694
+#define IDR_AUDIO_SPATIALIZATION_T285_P060 30695
+#define IDR_AUDIO_SPATIALIZATION_T285_P075 30696
+#define IDR_AUDIO_SPATIALIZATION_T285_P090 30697
+#define IDR_AUDIO_SPATIALIZATION_T285_P315 30698
+#define IDR_AUDIO_SPATIALIZATION_T285_P330 30699
+#define IDR_AUDIO_SPATIALIZATION_T285_P345 30700
+#define IDR_AUDIO_SPATIALIZATION_T300_P000 30701
+#define IDR_AUDIO_SPATIALIZATION_T300_P015 30702
+#define IDR_AUDIO_SPATIALIZATION_T300_P030 30703
+#define IDR_AUDIO_SPATIALIZATION_T300_P045 30704
+#define IDR_AUDIO_SPATIALIZATION_T300_P060 30705
+#define IDR_AUDIO_SPATIALIZATION_T300_P075 30706
+#define IDR_AUDIO_SPATIALIZATION_T300_P090 30707
+#define IDR_AUDIO_SPATIALIZATION_T300_P315 30708
+#define IDR_AUDIO_SPATIALIZATION_T300_P330 30709
+#define IDR_AUDIO_SPATIALIZATION_T300_P345 30710
+#define IDR_AUDIO_SPATIALIZATION_T315_P000 30711
+#define IDR_AUDIO_SPATIALIZATION_T315_P015 30712
+#define IDR_AUDIO_SPATIALIZATION_T315_P030 30713
+#define IDR_AUDIO_SPATIALIZATION_T315_P045 30714
+#define IDR_AUDIO_SPATIALIZATION_T315_P060 30715
+#define IDR_AUDIO_SPATIALIZATION_T315_P075 30716
+#define IDR_AUDIO_SPATIALIZATION_T315_P090 30717
+#define IDR_AUDIO_SPATIALIZATION_T315_P315 30718
+#define IDR_AUDIO_SPATIALIZATION_T315_P330 30719
+#define IDR_AUDIO_SPATIALIZATION_T315_P345 30720
+#define IDR_AUDIO_SPATIALIZATION_T330_P000 30721
+#define IDR_AUDIO_SPATIALIZATION_T330_P015 30722
+#define IDR_AUDIO_SPATIALIZATION_T330_P030 30723
+#define IDR_AUDIO_SPATIALIZATION_T330_P045 30724
+#define IDR_AUDIO_SPATIALIZATION_T330_P060 30725
+#define IDR_AUDIO_SPATIALIZATION_T330_P075 30726
+#define IDR_AUDIO_SPATIALIZATION_T330_P090 30727
+#define IDR_AUDIO_SPATIALIZATION_T330_P315 30728
+#define IDR_AUDIO_SPATIALIZATION_T330_P330 30729
+#define IDR_AUDIO_SPATIALIZATION_T330_P345 30730
+#define IDR_AUDIO_SPATIALIZATION_T345_P000 30731
+#define IDR_AUDIO_SPATIALIZATION_T345_P015 30732
+#define IDR_AUDIO_SPATIALIZATION_T345_P030 30733
+#define IDR_AUDIO_SPATIALIZATION_T345_P045 30734
+#define IDR_AUDIO_SPATIALIZATION_T345_P060 30735
+#define IDR_AUDIO_SPATIALIZATION_T345_P075 30736
+#define IDR_AUDIO_SPATIALIZATION_T345_P090 30737
+#define IDR_AUDIO_SPATIALIZATION_T345_P315 30738
+#define IDR_AUDIO_SPATIALIZATION_T345_P330 30739
+#define IDR_AUDIO_SPATIALIZATION_T345_P345 30740
// ---------------------------------------------------------------------------
// From cef_resources.h:
#define IDR_CEF_DEVTOOLS_DISCOVERY_PAGE 27500
#define IDR_CEF_CREDITS_HTML 27501
#define IDR_CEF_CREDITS_JS 27502
-#define IDR_CEF_LICENSE_TXT 27503
-#define IDR_CEF_VERSION_HTML 27504
-#define IDR_PRINT_PREVIEW_PAGE 27505
+#define IDR_CEF_CREDITS_SWIFTSHADER_JPG 27503
+#define IDR_CEF_LICENSE_TXT 27504
+#define IDR_CEF_VERSION_HTML 27505
+#define IDR_PRINT_PREVIEW_PAGE 27506
// ---------------------------------------------------------------------------
// From content_resources.h:
#define IDR_ACCESSIBILITY_HTML 25000
#define IDR_ACCESSIBILITY_CSS 25001
#define IDR_ACCESSIBILITY_JS 25002
-#define IDR_DEVTOOLS_PINCH_CURSOR_ICON 25003
-#define IDR_DEVTOOLS_PINCH_CURSOR_ICON_2X 25004
-#define IDR_DEVTOOLS_TOUCH_CURSOR_ICON 25005
-#define IDR_DEVTOOLS_TOUCH_CURSOR_ICON_2X 25006
-#define IDR_GPU_INTERNALS_HTML 25007
-#define IDR_GPU_INTERNALS_JS 25008
-#define IDR_INDEXED_DB_INTERNALS_HTML 25009
-#define IDR_INDEXED_DB_INTERNALS_JS 25010
-#define IDR_INDEXED_DB_INTERNALS_CSS 25011
-#define IDR_MEDIA_INTERNALS_HTML 25012
-#define IDR_MEDIA_INTERNALS_JS 25013
-#define IDR_SERVICE_WORKER_INTERNALS_HTML 25014
-#define IDR_SERVICE_WORKER_INTERNALS_JS 25015
-#define IDR_SERVICE_WORKER_INTERNALS_CSS 25016
-#define IDR_WEBRTC_INTERNALS_HTML 25017
-#define IDR_WEBRTC_INTERNALS_JS 25018
-#define IDR_GPU_SANDBOX_PROFILE 25019
-#define IDR_COMMON_SANDBOX_PROFILE 25020
-#define IDR_PPAPI_SANDBOX_PROFILE 25021
-#define IDR_RENDERER_SANDBOX_PROFILE 25022
-#define IDR_UTILITY_SANDBOX_PROFILE 25023
-#define IDR_MOJO_BINDINGS_JS 25024
-#define IDR_MOJO_BUFFER_JS 25025
-#define IDR_MOJO_CODEC_JS 25026
-#define IDR_MOJO_CONNECTION_JS 25027
-#define IDR_MOJO_CONNECTOR_JS 25028
-#define IDR_MOJO_ROUTER_JS 25029
-#define IDR_MOJO_UNICODE_JS 25030
-#define IDR_MOJO_VALIDATOR_JS 25031
+#define IDR_GPU_INTERNALS_HTML 25003
+#define IDR_GPU_INTERNALS_JS 25004
+#define IDR_INDEXED_DB_INTERNALS_HTML 25005
+#define IDR_INDEXED_DB_INTERNALS_JS 25006
+#define IDR_INDEXED_DB_INTERNALS_CSS 25007
+#define IDR_MEDIA_INTERNALS_HTML 25008
+#define IDR_MEDIA_INTERNALS_JS 25009
+#define IDR_WEBRTC_INTERNALS_HTML 25010
+#define IDR_WEBRTC_INTERNALS_JS 25011
+#define IDR_GPU_SANDBOX_PROFILE 25012
+#define IDR_WORKER_SANDBOX_PROFILE 25013
+#define IDR_COMMON_SANDBOX_PROFILE 25014
+#define IDR_PPAPI_SANDBOX_PROFILE 25015
+#define IDR_RENDERER_SANDBOX_PROFILE 25016
+#define IDR_UTILITY_SANDBOX_PROFILE 25017
+#define IDR_MEDIAPLAYER_REMOTE_PLAYBACK_ICON 25018
// ---------------------------------------------------------------------------
// From devtools_resources.h:
-#define DEVTOOLS_CSS 22000
-#define DEVTOOLS_HTML 22001
-#define DEVTOOLS_JS 22002
-#define INSPECTOR_CSS 22003
-#define INSPECTOR_HTML 22004
-#define INSPECTOR_JS 22005
-#define TOOLBOX_CSS 22006
-#define TOOLBOX_HTML 22007
-#define TOOLBOX_JS 22008
-#define ACCESSIBILITY_MODULE_JS 22009
-#define AUDITS_MODULE_JS 22010
-#define COMPONENTS_LAZY_MODULE_JS 22011
-#define CONSOLE_MODULE_JS 22012
-#define ELEMENTS_MODULE_JS 22013
-#define HEAP_SNAPSHOT_WORKER_MODULE_JS 22014
-#define LAYERS_MODULE_JS 22015
-#define NETWORK_MODULE_JS 22016
-#define PROFILER_MODULE_JS 22017
-#define PROMISES_MODULE_JS 22018
-#define RESOURCES_MODULE_JS 22019
-#define SCREENCAST_MODULE_JS 22020
-#define SCRIPT_FORMATTER_WORKER_MODULE_JS 22021
-#define SETTINGS_MODULE_JS 22022
-#define SNIPPETS_MODULE_JS 22023
-#define SOURCE_FRAME_MODULE_JS 22024
-#define SOURCES_MODULE_JS 22025
-#define TEMP_STORAGE_SHARED_WORKER_MODULE_JS 22026
-#define TIMELINE_MODULE_JS 22027
-#define UI_LAZY_MODULE_JS 22028
-#define DEVTOOLS_EXTENSION_API_JS 22029
-#define IMAGES_APPLICATIONCACHE_PNG 22030
-#define IMAGES_BREAKPOINT_PNG 22031
-#define IMAGES_BREAKPOINTCONDITIONAL_PNG 22032
-#define IMAGES_BREAKPOINTCONDITIONAL_2X_PNG 22033
-#define IMAGES_BREAKPOINT_2X_PNG 22034
-#define IMAGES_CHECKER_PNG 22035
-#define IMAGES_CHROMEDISABLEDSELECT_PNG 22036
-#define IMAGES_CHROMEDISABLEDSELECT_2X_PNG 22037
-#define IMAGES_CHROMELEFT_PNG 22038
-#define IMAGES_CHROMEMIDDLE_PNG 22039
-#define IMAGES_CHROMERIGHT_PNG 22040
-#define IMAGES_CHROMESELECT_PNG 22041
-#define IMAGES_CHROMESELECT_2X_PNG 22042
-#define IMAGES_COOKIE_PNG 22043
-#define IMAGES_DATABASE_PNG 22044
-#define IMAGES_DATABASETABLE_PNG 22045
-#define IMAGES_DELETEICON_PNG 22046
-#define IMAGES_DOMAIN_PNG 22047
-#define IMAGES_ERRORWAVE_PNG 22048
-#define IMAGES_ERRORWAVE_2X_PNG 22049
-#define IMAGES_FILESYSTEM_PNG 22050
-#define IMAGES_FORWARD_PNG 22051
-#define IMAGES_FRAME_PNG 22052
-#define IMAGES_GRAPHLABELCALLOUTLEFT_PNG 22053
-#define IMAGES_GRAPHLABELCALLOUTRIGHT_PNG 22054
-#define IMAGES_INDEXEDDB_PNG 22055
-#define IMAGES_INDEXEDDBINDEX_PNG 22056
-#define IMAGES_INDEXEDDBOBJECTSTORE_PNG 22057
-#define IMAGES_LOCALSTORAGE_PNG 22058
-#define IMAGES_NAVIGATIONCONTROLS_PNG 22059
-#define IMAGES_NAVIGATIONCONTROLS_2X_PNG 22060
-#define IMAGES_NOTIFICATIONS_SVG 22061
-#define IMAGES_PANEADDBUTTONS_PNG 22062
-#define IMAGES_PANEANIMATIONSBUTTONS_PNG 22063
-#define IMAGES_PANEELEMENTSTATEBUTTONS_PNG 22064
-#define IMAGES_PANEFILTERBUTTONS_PNG 22065
-#define IMAGES_PANEREFRESHBUTTONS_PNG 22066
-#define IMAGES_POPOVERARROWS_PNG 22067
-#define IMAGES_PROFILEGROUPICON_PNG 22068
-#define IMAGES_PROFILEICON_PNG 22069
-#define IMAGES_PROFILESMALLICON_PNG 22070
-#define IMAGES_RADIODOT_PNG 22071
-#define IMAGES_RESOURCECSSICON_PNG 22072
-#define IMAGES_RESOURCEDOCUMENTICON_PNG 22073
-#define IMAGES_RESOURCEDOCUMENTICONSMALL_PNG 22074
-#define IMAGES_RESOURCEJSICON_PNG 22075
-#define IMAGES_RESOURCEPLAINICON_PNG 22076
-#define IMAGES_RESOURCEPLAINICONSMALL_PNG 22077
-#define IMAGES_RESOURCESTIMEGRAPHICON_PNG 22078
-#define IMAGES_RESPONSIVEDESIGN_PNG 22079
-#define IMAGES_RESPONSIVEDESIGN_2X_PNG 22080
-#define IMAGES_SEARCHNEXT_PNG 22081
-#define IMAGES_SEARCHPREV_PNG 22082
-#define IMAGES_SERVICEWORKER_SVG 22083
-#define IMAGES_SESSIONSTORAGE_PNG 22084
-#define IMAGES_SETTINGSLISTREMOVE_PNG 22085
-#define IMAGES_SETTINGSLISTREMOVE_2X_PNG 22086
-#define IMAGES_SPEECH_PNG 22087
-#define IMAGES_SPINNER_SVG 22088
-#define IMAGES_STATUSBARBUTTONGLYPHS_PNG 22089
-#define IMAGES_STATUSBARBUTTONGLYPHS_2X_PNG 22090
-#define IMAGES_THUMBACTIVEHORIZ_PNG 22091
-#define IMAGES_THUMBACTIVEVERT_PNG 22092
-#define IMAGES_THUMBHORIZ_PNG 22093
-#define IMAGES_THUMBHOVERHORIZ_PNG 22094
-#define IMAGES_THUMBHOVERVERT_PNG 22095
-#define IMAGES_THUMBVERT_PNG 22096
-#define IMAGES_TOOLBARBUTTONGLYPHS_PNG 22097
-#define IMAGES_TOOLBARBUTTONGLYPHS_2X_PNG 22098
-#define IMAGES_TOOLBARITEMSELECTED_PNG 22099
-#define IMAGES_TOOLBARRESIZERHORIZONTAL_PNG 22100
-#define IMAGES_TOOLBARRESIZERVERTICAL_PNG 22101
-#define IMAGES_TOUCHCURSOR_PNG 22102
-#define IMAGES_TOUCHCURSOR_2X_PNG 22103
-#define IMAGES_TRANSFORMCONTROLS_PNG 22104
-#define IMAGES_TRANSFORMCONTROLS_2X_PNG 22105
-#define IMAGES_UPDATESERVICEWORKER_SVG 22106
+#define DEVTOOLS_HTML 22000
+#define INSPECTOR_JS 22001
+#define ELEMENTSPANEL_JS 22002
+#define RESOURCESPANEL_JS 22003
+#define NETWORKPANEL_JS 22004
+#define SOURCESPANEL_JS 22005
+#define TIMELINEPANEL_JS 22006
+#define PROFILESPANEL_JS 22007
+#define AUDITSPANEL_JS 22008
+#define LAYERSPANEL_JS 22009
+#define CODEMIRRORTEXTEDITOR_JS 22010
+#define HEAPSNAPSHOTWORKER_JS 22011
+#define SCRIPTFORMATTERWORKER_JS 22012
+#define INSPECTOR_CSS 22013
+#define DEVTOOLS_EXTENSION_API_JS 22014
+#define ACCELEROMETER_CSS 22015
+#define AUDITSPANEL_CSS 22016
+#define BREADCRUMBLIST_CSS 22017
+#define BREAKPOINTSLIST_CSS 22018
+#define BUILDSYSTEMONLY_JS 22019
+#define CMDEVTOOLS_CSS 22020
+#define CODEMIRROR_CSS 22021
+#define CSSNAMEDFLOWS_CSS 22022
+#define DATAGRID_CSS 22023
+#define ELEMENTSPANEL_CSS 22024
+#define FILTER_CSS 22025
+#define FILTEREDITEMSELECTIONDIALOG_CSS 22026
+#define FLAMECHART_CSS 22027
+#define HEAPPROFILER_CSS 22028
+#define HELPSCREEN_CSS 22029
+#define INDEXEDDBVIEWS_CSS 22030
+#define INSPECTORCOMMON_CSS 22031
+#define NAVIGATORVIEW_CSS 22032
+#define NETWORKLOGVIEW_CSS 22033
+#define NETWORKPANEL_CSS 22034
+#define OVERRIDES_CSS 22035
+#define PANELENABLERVIEW_CSS 22036
+#define PROFILESPANEL_CSS 22037
+#define RESOURCEVIEW_CSS 22038
+#define RESOURCESPANEL_CSS 22039
+#define REVISIONHISTORY_CSS 22040
+#define SCREENCASTVIEW_CSS 22041
+#define SIDEBARPANE_CSS 22042
+#define SOURCESPANEL_CSS 22043
+#define SOURCESVIEW_CSS 22044
+#define SPECTRUM_CSS 22045
+#define SPLITVIEW_CSS 22046
+#define TEXTPROMPT_CSS 22047
+#define TIMELINEPANEL_CSS 22048
+#define CANVASPROFILER_CSS 22049
+#define LAYERSPANEL_CSS 22050
+#define IMAGES_BACK_PNG 22051
+#define IMAGES_SPINNER_GIF 22052
+#define IMAGES_PROFILEGROUPICON_PNG 22053
+#define IMAGES_CHECKER_PNG 22054
+#define IMAGES_TIMELINEPILLGRAY_PNG 22055
+#define IMAGES_TIMELINEHOLLOWPILLYELLOW_PNG 22056
+#define IMAGES_GRAPHLABELCALLOUTLEFT_PNG 22057
+#define IMAGES_STATUSBARBUTTONGLYPHS_PNG 22058
+#define IMAGES_BREAKPOINT2_PNG 22059
+#define IMAGES_TIMELINEHOLLOWPILLGRAY_PNG 22060
+#define IMAGES_BREAKPOINTCONDITIONALBORDER_PNG 22061
+#define IMAGES_SPINNERINACTIVE_GIF 22062
+#define IMAGES_TOOLBARITEMSELECTED_PNG 22063
+#define IMAGES_GRAPHLABELCALLOUTRIGHT_PNG 22064
+#define IMAGES_SPINNERINACTIVESELECTED_GIF 22065
+#define IMAGES_TIMELINEPILLBLUE_PNG 22066
+#define IMAGES_LOCALSTORAGE_PNG 22067
+#define IMAGES_NAVIGATIONCONTROLS_2X_PNG 22068
+#define IMAGES_INDEXEDDBINDEX_PNG 22069
+#define IMAGES_PANEADDBUTTONS_PNG 22070
+#define IMAGES_RESOURCEJSICON_PNG 22071
+#define IMAGES_RESOURCEDOCUMENTICONSMALL_PNG 22072
+#define IMAGES_DATABASETABLE_PNG 22073
+#define IMAGES_TRACKVERT_PNG 22074
+#define IMAGES_BREAKPOINTCONDITIONALCOUNTERBORDER_PNG 22075
+#define IMAGES_APPLICATIONCACHE_PNG 22076
+#define IMAGES_SESSIONSTORAGE_PNG 22077
+#define IMAGES_BREAKPOINTCONDITIONAL2_PNG 22078
+#define IMAGES_RADIODOT_PNG 22079
+#define IMAGES_DOMAIN_PNG 22080
+#define IMAGES_TIMELINEHOLLOWPILLPURPLE_PNG 22081
+#define IMAGES_DATABASE_PNG 22082
+#define IMAGES_FORWARD_PNG 22083
+#define IMAGES_THUMBACTIVEVERT_PNG 22084
+#define IMAGES_REGIONOVERSET_PNG 22085
+#define IMAGES_TIMELINEPILLRED_PNG 22086
+#define IMAGES_POPOVERARROWS_PNG 22087
+#define IMAGES_TIMELINEHOLLOWPILLORANGE_PNG 22088
+#define IMAGES_FILESYSTEM_PNG 22089
+#define IMAGES_TIMELINEPILLYELLOW_PNG 22090
+#define IMAGES_NAMEDFLOWOVERFLOW_PNG 22091
+#define IMAGES_GLOSSYHEADERPRESSED_PNG 22092
+#define IMAGES_RESOURCEDOCUMENTICON_PNG 22093
+#define IMAGES_PANEELEMENTSTATEBUTTONS_PNG 22094
+#define IMAGES_PROFILESMALLICON_PNG 22095
+#define IMAGES_STATUSBARBUTTONGLYPHS2X_PNG 22096
+#define IMAGES_FRAME_PNG 22097
+#define IMAGES_INDEXEDDB_PNG 22098
+#define IMAGES_STATUSBARRESIZERVERTICAL_PNG 22099
+#define IMAGES_TIMELINEPILLGREEN_PNG 22100
+#define IMAGES_ADDICON_PNG 22101
+#define IMAGES_PROFILEICON_PNG 22102
+#define IMAGES_THUMBVERT_PNG 22103
+#define IMAGES_REGIONEMPTY_PNG 22104
+#define IMAGES_THUMBACTIVEHORIZ_PNG 22105
+#define IMAGES_TIMELINEHOLLOWPILLGREEN_PNG 22106
+#define IMAGES_RESOURCESTIMEGRAPHICON_PNG 22107
+#define IMAGES_SEARCHPREV_PNG 22108
+#define IMAGES_THUMBHOVERVERT_PNG 22109
+#define IMAGES_THUMBHOVERHORIZ_PNG 22110
+#define IMAGES_TRACKHORIZ_PNG 22111
+#define IMAGES_TIMELINEHOLLOWPILLRED_PNG 22112
+#define IMAGES_SETTINGSLISTREMOVE_2X_PNG 22113
+#define IMAGES_BREAKPOINTCOUNTERBORDER_PNG 22114
+#define IMAGES_BREAKPOINTBORDER_PNG 22115
+#define IMAGES_THUMBHORIZ_PNG 22116
+#define IMAGES_BREAKPOINT2_2X_PNG 22117
+#define IMAGES_REGIONFIT_PNG 22118
+#define IMAGES_SEARCHNEXT_PNG 22119
+#define IMAGES_DELETEICON_PNG 22120
+#define IMAGES_RESOURCEPLAINICON_PNG 22121
+#define IMAGES_SETTINGSLISTREMOVE_PNG 22122
+#define IMAGES_SPINNERACTIVESELECTED_GIF 22123
+#define IMAGES_BREAKPOINTCONDITIONAL2_2X_PNG 22124
+#define IMAGES_GLOSSYHEADERSELECTED_PNG 22125
+#define IMAGES_PROGRAMCOUNTERBORDER_PNG 22126
+#define IMAGES_PANESETTINGSBUTTONS_PNG 22127
+#define IMAGES_COOKIE_PNG 22128
+#define IMAGES_POPOVERBACKGROUND_PNG 22129
+#define IMAGES_PANEREFRESHBUTTONS_PNG 22130
+#define IMAGES_GLOSSYHEADERSELECTEDPRESSED_PNG 22131
+#define IMAGES_STATUSBARRESIZERHORIZONTAL_PNG 22132
+#define IMAGES_GLOSSYHEADER_PNG 22133
+#define IMAGES_TIMELINEPILLPURPLE_PNG 22134
+#define IMAGES_SPINNERACTIVE_GIF 22135
+#define IMAGES_PANEFILTERBUTTONS_PNG 22136
+#define IMAGES_NAVIGATIONCONTROLS_PNG 22137
+#define IMAGES_TIMELINEPILLORANGE_PNG 22138
+#define IMAGES_RESOURCEPLAINICONSMALL_PNG 22139
+#define IMAGES_RESOURCECSSICON_PNG 22140
+#define IMAGES_INDEXEDDBOBJECTSTORE_PNG 22141
+#define IMAGES_TIMELINEHOLLOWPILLBLUE_PNG 22142
// ---------------------------------------------------------------------------
// From net_resources.h:
#define IDR_AURA_CURSOR_BIG_CROSSHAIR 5520
#define IDR_AURA_CURSOR_BIG_EAST_RESIZE 5521
#define IDR_AURA_CURSOR_BIG_EAST_WEST_RESIZE 5522
-#define IDR_AURA_CURSOR_BIG_HAND 5523
-#define IDR_AURA_CURSOR_BIG_HELP 5524
-#define IDR_AURA_CURSOR_BIG_IBEAM 5525
-#define IDR_AURA_CURSOR_BIG_MOVE 5526
-#define IDR_AURA_CURSOR_BIG_NORTH_EAST_RESIZE 5527
-#define IDR_AURA_CURSOR_BIG_NORTH_EAST_SOUTH_WEST_RESIZE 5528
-#define IDR_AURA_CURSOR_BIG_NORTH_RESIZE 5529
-#define IDR_AURA_CURSOR_BIG_NORTH_SOUTH_RESIZE 5530
-#define IDR_AURA_CURSOR_BIG_NORTH_WEST_RESIZE 5531
-#define IDR_AURA_CURSOR_BIG_NORTH_WEST_SOUTH_EAST_RESIZE 5532
-#define IDR_AURA_CURSOR_BIG_NO_DROP 5533
-#define IDR_AURA_CURSOR_BIG_PTR 5534
-#define IDR_AURA_CURSOR_BIG_ROW_RESIZE 5535
-#define IDR_AURA_CURSOR_BIG_SOUTH_EAST_RESIZE 5536
-#define IDR_AURA_CURSOR_BIG_SOUTH_RESIZE 5537
-#define IDR_AURA_CURSOR_BIG_SOUTH_WEST_RESIZE 5538
-#define IDR_AURA_CURSOR_BIG_WEST_RESIZE 5539
-#define IDR_AURA_CURSOR_BIG_XTERM_HORIZ 5540
-#define IDR_AURA_CURSOR_BIG_ZOOM_IN 5541
-#define IDR_AURA_CURSOR_BIG_ZOOM_OUT 5542
-#define IDR_AURA_CURSOR_BIG_GRAB 5543
-#define IDR_AURA_CURSOR_BIG_GRABBING 5544
-#define IDR_AURA_CURSOR_ALIAS 5545
-#define IDR_AURA_CURSOR_CELL 5546
-#define IDR_AURA_CURSOR_COL_RESIZE 5547
-#define IDR_AURA_CURSOR_CONTEXT_MENU 5548
-#define IDR_AURA_CURSOR_COPY 5549
-#define IDR_AURA_CURSOR_CROSSHAIR 5550
-#define IDR_AURA_CURSOR_EAST_RESIZE 5551
-#define IDR_AURA_CURSOR_EAST_WEST_RESIZE 5552
-#define IDR_AURA_CURSOR_HAND 5553
-#define IDR_AURA_CURSOR_HELP 5554
-#define IDR_AURA_CURSOR_IBEAM 5555
-#define IDR_AURA_CURSOR_MOVE 5556
-#define IDR_AURA_CURSOR_NORTH_EAST_RESIZE 5557
-#define IDR_AURA_CURSOR_NORTH_EAST_SOUTH_WEST_RESIZE 5558
-#define IDR_AURA_CURSOR_NORTH_RESIZE 5559
-#define IDR_AURA_CURSOR_NORTH_SOUTH_RESIZE 5560
-#define IDR_AURA_CURSOR_NORTH_WEST_RESIZE 5561
-#define IDR_AURA_CURSOR_NORTH_WEST_SOUTH_EAST_RESIZE 5562
-#define IDR_AURA_CURSOR_NO_DROP 5563
-#define IDR_AURA_CURSOR_PTR 5564
-#define IDR_AURA_CURSOR_ROW_RESIZE 5565
-#define IDR_AURA_CURSOR_SOUTH_EAST_RESIZE 5566
-#define IDR_AURA_CURSOR_SOUTH_RESIZE 5567
-#define IDR_AURA_CURSOR_SOUTH_WEST_RESIZE 5568
-#define IDR_AURA_CURSOR_WEST_RESIZE 5569
-#define IDR_AURA_CURSOR_XTERM_HORIZ 5570
-#define IDR_AURA_CURSOR_ZOOM_IN 5571
-#define IDR_AURA_CURSOR_ZOOM_OUT 5572
-#define IDR_AURA_CURSOR_GRAB 5573
-#define IDR_AURA_CURSOR_GRABBING 5574
-#define IDR_AURA_SHADOW_ACTIVE 5575
-#define IDR_AURA_SHADOW_INACTIVE 5576
-#define IDR_BACK_ARROW 5577
-#define IDR_FORWARD_ARROW 5578
-#define IDR_BROWSER_ACTION_BADGE_CENTER 5579
-#define IDR_BROWSER_ACTION_BADGE_LEFT 5580
-#define IDR_BROWSER_ACTION_BADGE_RIGHT 5581
-#define IDR_BUBBLE_B 5582
-#define IDR_BUBBLE_BL 5583
-#define IDR_BUBBLE_BR 5584
-#define IDR_BUBBLE_B_ARROW 5585
-#define IDR_BUBBLE_L 5586
-#define IDR_BUBBLE_L_ARROW 5587
-#define IDR_BUBBLE_R 5588
-#define IDR_BUBBLE_R_ARROW 5589
-#define IDR_BUBBLE_T 5590
-#define IDR_BUBBLE_TL 5591
-#define IDR_BUBBLE_TR 5592
-#define IDR_BUBBLE_T_ARROW 5593
-#define IDR_BUTTON_DISABLED 5594
-#define IDR_BUTTON_FOCUSED_HOVER 5595
-#define IDR_BUTTON_FOCUSED_NORMAL 5596
-#define IDR_BUTTON_FOCUSED_PRESSED 5597
-#define IDR_BUTTON_HOVER 5598
-#define IDR_BUTTON_NORMAL 5599
-#define IDR_BUTTON_PRESSED 5600
-#define IDR_BLUE_BUTTON_DISABLED 5601
-#define IDR_BLUE_BUTTON_FOCUSED_HOVER 5602
-#define IDR_BLUE_BUTTON_FOCUSED_NORMAL 5603
-#define IDR_BLUE_BUTTON_FOCUSED_PRESSED 5604
-#define IDR_BLUE_BUTTON_HOVER 5605
-#define IDR_BLUE_BUTTON_NORMAL 5606
-#define IDR_BLUE_BUTTON_PRESSED 5607
-#define IDR_CHECKBOX 5608
-#define IDR_CHECKBOX_CHECKED 5609
-#define IDR_CHECKBOX_CHECKED_DISABLED 5610
-#define IDR_CHECKBOX_CHECKED_HOVER 5611
-#define IDR_CHECKBOX_CHECKED_PRESSED 5612
-#define IDR_CHECKBOX_DISABLED 5613
-#define IDR_CHECKBOX_FOCUSED 5614
-#define IDR_CHECKBOX_FOCUSED_CHECKED 5615
-#define IDR_CHECKBOX_FOCUSED_CHECKED_HOVER 5616
-#define IDR_CHECKBOX_FOCUSED_CHECKED_PRESSED 5617
-#define IDR_CHECKBOX_FOCUSED_HOVER 5618
-#define IDR_CHECKBOX_FOCUSED_PRESSED 5619
-#define IDR_CHECKBOX_HOVER 5620
-#define IDR_CHECKBOX_PRESSED 5621
-#define IDR_CHECKMARK 5622
-#define IDR_CLOSE 5623
-#define IDR_CLOSE_2 5624
-#define IDR_CLOSE_2_H 5625
-#define IDR_CLOSE_2_MASK 5626
-#define IDR_CLOSE_2_P 5627
-#define IDR_CLOSE_3_MASK 5628
-#define IDR_CLOSE_4_BUTTON 5629
-#define IDR_CLOSE_DIALOG 5630
-#define IDR_CLOSE_DIALOG_H 5631
-#define IDR_CLOSE_DIALOG_P 5632
-#define IDR_DISABLE 5633
-#define IDR_DISABLE_H 5634
-#define IDR_DISABLE_P 5635
-#define IDR_CLOSE_H 5636
-#define IDR_CLOSE_P 5637
-#define IDR_COMBOBOX_BUTTON_BOTTOM 5638
-#define IDR_COMBOBOX_BUTTON_H_BOTTOM 5639
-#define IDR_COMBOBOX_BUTTON_P_BOTTOM 5640
-#define IDR_COMBOBOX_BUTTON_BOTTOM_LEFT 5641
-#define IDR_COMBOBOX_BUTTON_H_BOTTOM_LEFT 5642
-#define IDR_COMBOBOX_BUTTON_P_BOTTOM_LEFT 5643
-#define IDR_COMBOBOX_BUTTON_BOTTOM_RIGHT 5644
-#define IDR_COMBOBOX_BUTTON_H_BOTTOM_RIGHT 5645
-#define IDR_COMBOBOX_BUTTON_P_BOTTOM_RIGHT 5646
-#define IDR_COMBOBOX_BUTTON_CENTER 5647
-#define IDR_COMBOBOX_BUTTON_H_CENTER 5648
-#define IDR_COMBOBOX_BUTTON_P_CENTER 5649
-#define IDR_COMBOBOX_BUTTON_LEFT 5650
-#define IDR_COMBOBOX_BUTTON_H_LEFT 5651
-#define IDR_COMBOBOX_BUTTON_P_LEFT 5652
-#define IDR_COMBOBOX_BUTTON_RIGHT 5653
-#define IDR_COMBOBOX_BUTTON_H_RIGHT 5654
-#define IDR_COMBOBOX_BUTTON_P_RIGHT 5655
-#define IDR_COMBOBOX_BUTTON_MENU_BOTTOM 5656
-#define IDR_COMBOBOX_BUTTON_H_MENU_BOTTOM 5657
-#define IDR_COMBOBOX_BUTTON_P_MENU_BOTTOM 5658
-#define IDR_COMBOBOX_BUTTON_MENU_CENTER 5659
-#define IDR_COMBOBOX_BUTTON_H_MENU_CENTER 5660
-#define IDR_COMBOBOX_BUTTON_P_MENU_CENTER 5661
-#define IDR_COMBOBOX_BUTTON_MENU_TOP 5662
-#define IDR_COMBOBOX_BUTTON_H_MENU_TOP 5663
-#define IDR_COMBOBOX_BUTTON_P_MENU_TOP 5664
-#define IDR_COMBOBOX_BUTTON_TOP 5665
-#define IDR_COMBOBOX_BUTTON_H_TOP 5666
-#define IDR_COMBOBOX_BUTTON_P_TOP 5667
-#define IDR_COMBOBOX_BUTTON_TOP_LEFT 5668
-#define IDR_COMBOBOX_BUTTON_H_TOP_LEFT 5669
-#define IDR_COMBOBOX_BUTTON_P_TOP_LEFT 5670
-#define IDR_COMBOBOX_BUTTON_TOP_RIGHT 5671
-#define IDR_COMBOBOX_BUTTON_H_TOP_RIGHT 5672
-#define IDR_COMBOBOX_BUTTON_P_TOP_RIGHT 5673
-#define IDR_COMBOBOX_BUTTON_F_BOTTOM 5674
-#define IDR_COMBOBOX_BUTTON_F_H_BOTTOM 5675
-#define IDR_COMBOBOX_BUTTON_F_P_BOTTOM 5676
-#define IDR_COMBOBOX_BUTTON_F_BOTTOM_LEFT 5677
-#define IDR_COMBOBOX_BUTTON_F_H_BOTTOM_LEFT 5678
-#define IDR_COMBOBOX_BUTTON_F_P_BOTTOM_LEFT 5679
-#define IDR_COMBOBOX_BUTTON_F_BOTTOM_RIGHT 5680
-#define IDR_COMBOBOX_BUTTON_F_H_BOTTOM_RIGHT 5681
-#define IDR_COMBOBOX_BUTTON_F_P_BOTTOM_RIGHT 5682
-#define IDR_COMBOBOX_BUTTON_F_CENTER 5683
-#define IDR_COMBOBOX_BUTTON_F_H_CENTER 5684
-#define IDR_COMBOBOX_BUTTON_F_P_CENTER 5685
-#define IDR_COMBOBOX_BUTTON_F_LEFT 5686
-#define IDR_COMBOBOX_BUTTON_F_H_LEFT 5687
-#define IDR_COMBOBOX_BUTTON_F_P_LEFT 5688
-#define IDR_COMBOBOX_BUTTON_F_RIGHT 5689
-#define IDR_COMBOBOX_BUTTON_F_H_RIGHT 5690
-#define IDR_COMBOBOX_BUTTON_F_P_RIGHT 5691
-#define IDR_COMBOBOX_BUTTON_F_MENU_BOTTOM 5692
-#define IDR_COMBOBOX_BUTTON_F_H_MENU_BOTTOM 5693
-#define IDR_COMBOBOX_BUTTON_F_P_MENU_BOTTOM 5694
-#define IDR_COMBOBOX_BUTTON_F_MENU_CENTER 5695
-#define IDR_COMBOBOX_BUTTON_F_H_MENU_CENTER 5696
-#define IDR_COMBOBOX_BUTTON_F_P_MENU_CENTER 5697
-#define IDR_COMBOBOX_BUTTON_F_MENU_TOP 5698
-#define IDR_COMBOBOX_BUTTON_F_H_MENU_TOP 5699
-#define IDR_COMBOBOX_BUTTON_F_P_MENU_TOP 5700
-#define IDR_COMBOBOX_BUTTON_F_TOP 5701
-#define IDR_COMBOBOX_BUTTON_F_H_TOP 5702
-#define IDR_COMBOBOX_BUTTON_F_P_TOP 5703
-#define IDR_COMBOBOX_BUTTON_F_TOP_LEFT 5704
-#define IDR_COMBOBOX_BUTTON_F_H_TOP_LEFT 5705
-#define IDR_COMBOBOX_BUTTON_F_P_TOP_LEFT 5706
-#define IDR_COMBOBOX_BUTTON_F_TOP_RIGHT 5707
-#define IDR_COMBOBOX_BUTTON_F_H_TOP_RIGHT 5708
-#define IDR_COMBOBOX_BUTTON_F_P_TOP_RIGHT 5709
-#define IDR_CONTENT_BOTTOM_CENTER 5710
-#define IDR_CONTENT_BOTTOM_LEFT_CORNER 5711
-#define IDR_CONTENT_BOTTOM_RIGHT_CORNER 5712
-#define IDR_CONTENT_LEFT_SIDE 5713
-#define IDR_CONTENT_RIGHT_SIDE 5714
-#define IDR_DEFAULT_FAVICON 5715
-#define IDR_DEFAULT_FAVICON_32 5716
-#define IDR_DEFAULT_FAVICON_64 5717
-#define IDR_EASY_UNLOCK_HARDLOCKED 5718
-#define IDR_EASY_UNLOCK_HARDLOCKED_HOVER 5719
-#define IDR_EASY_UNLOCK_HARDLOCKED_PRESSED 5720
-#define IDR_EASY_UNLOCK_LOCKED 5721
-#define IDR_EASY_UNLOCK_LOCKED_HOVER 5722
-#define IDR_EASY_UNLOCK_LOCKED_PRESSED 5723
-#define IDR_EASY_UNLOCK_LOCKED_TO_BE_ACTIVATED 5724
-#define IDR_EASY_UNLOCK_LOCKED_TO_BE_ACTIVATED_HOVER 5725
-#define IDR_EASY_UNLOCK_LOCKED_TO_BE_ACTIVATED_PRESSED 5726
-#define IDR_EASY_UNLOCK_LOCKED_WITH_PROXIMITY_HINT 5727
-#define IDR_EASY_UNLOCK_LOCKED_WITH_PROXIMITY_HINT_HOVER 5728
-#define IDR_EASY_UNLOCK_LOCKED_WITH_PROXIMITY_HINT_PRESSED 5729
-#define IDR_EASY_UNLOCK_SPINNER 5730
-#define IDR_EASY_UNLOCK_UNLOCKED 5731
-#define IDR_EASY_UNLOCK_UNLOCKED_HOVER 5732
-#define IDR_EASY_UNLOCK_UNLOCKED_PRESSED 5733
-#define IDR_FOLDER_CLOSED 5734
-#define IDR_FOLDER_CLOSED_RTL 5735
-#define IDR_FOLDER_OPEN 5736
-#define IDR_FOLDER_OPEN_RTL 5737
-#define IDR_FRAME 5738
-#define IDR_FRAME_APP_PANEL 5739
-#define IDR_FRAME_INACTIVE 5740
-#define IDR_MAXIMIZE 5741
-#define IDR_MAXIMIZE_H 5742
-#define IDR_MAXIMIZE_P 5743
-#define IDR_MENU_HIERARCHY_ARROW_DARK_BACKGROUND 5744
-#define IDR_MENU_HIERARCHY_ARROW 5745
-#define IDR_MENU_CHECK_CHECKED 5746
-#define IDR_MENU_CHECK 5747
-#define IDR_MENU_CHECK_CHECKED_DARK_BACKGROUND 5748
-#define IDR_MENU_RADIO_EMPTY 5749
-#define IDR_MENU_RADIO_SELECTED 5750
-#define IDR_SLIDER_ACTIVE_LEFT 5751
-#define IDR_SLIDER_ACTIVE_RIGHT 5752
-#define IDR_SLIDER_ACTIVE_CENTER 5753
-#define IDR_SLIDER_DISABLED_LEFT 5754
-#define IDR_SLIDER_DISABLED_RIGHT 5755
-#define IDR_SLIDER_DISABLED_CENTER 5756
-#define IDR_SLIDER_PRESSED_LEFT 5757
-#define IDR_SLIDER_PRESSED_RIGHT 5758
-#define IDR_SLIDER_PRESSED_CENTER 5759
-#define IDR_SLIDER_ACTIVE_THUMB 5760
-#define IDR_SLIDER_DISABLED_THUMB 5761
-#define IDR_MENU_DROPARROW 5762
-#define IDR_MESSAGE_CLOSE 5763
-#define IDR_MINIMIZE 5764
-#define IDR_MINIMIZE_H 5765
-#define IDR_MINIMIZE_P 5766
-#define IDR_NOTIFICATION_ARROW 5767
-#define IDR_NOTIFICATION_ARROW_HOVER 5768
-#define IDR_NOTIFICATION_ARROW_PRESSED 5769
-#define IDR_NOTIFICATION_ADVANCED_SETTINGS 5770
-#define IDR_NOTIFICATION_ADVANCED_SETTINGS_HOVER 5771
-#define IDR_NOTIFICATION_ADVANCED_SETTINGS_PRESSED 5772
-#define IDR_NOTIFICATION_CLEAR_ALL 5773
-#define IDR_NOTIFICATION_CLEAR_ALL_DISABLED 5774
-#define IDR_NOTIFICATION_CLEAR_ALL_HOVER 5775
-#define IDR_NOTIFICATION_CLEAR_ALL_PRESSED 5776
-#define IDR_NOTIFICATION_CLOSE 5777
-#define IDR_NOTIFICATION_CLOSE_HOVER 5778
-#define IDR_NOTIFICATION_CLOSE_PRESSED 5779
-#define IDR_NOTIFICATION_BUBBLE_CLOSE 5780
-#define IDR_NOTIFICATION_BUBBLE_CLOSE_HOVER 5781
-#define IDR_NOTIFICATION_BUBBLE_CLOSE_PRESSED 5782
-#define IDR_NOTIFICATION_DO_NOT_DISTURB 5783
-#define IDR_NOTIFICATION_DO_NOT_DISTURB_HOVER 5784
-#define IDR_NOTIFICATION_DO_NOT_DISTURB_PRESSED 5785
-#define IDR_NOTIFICATION_SETTINGS 5786
-#define IDR_NOTIFICATION_SETTINGS_HOVER 5787
-#define IDR_NOTIFICATION_SETTINGS_PRESSED 5788
-#define IDR_LOCAL_NTP_IMAGES_LOGO_PNG 5789
-#define IDR_LOCAL_NTP_IMAGES_WHITE_LOGO_PNG 5790
-#define IDR_NTP_DEFAULT_FAVICON 5791
-#define IDR_OOBE_ACTION_BOX_BUTTON_HOVER 5792
-#define IDR_OOBE_ACTION_BOX_BUTTON_NORMAL 5793
-#define IDR_OOBE_ACTION_BOX_BUTTON_PRESSED 5794
-#define IDR_PANEL_TOP_LEFT_CORNER 5795
-#define IDR_PANEL_TOP_RIGHT_CORNER 5796
-#define IDR_PANEL_BOTTOM_LEFT_CORNER 5797
-#define IDR_PANEL_BOTTOM_RIGHT_CORNER 5798
-#define IDR_PROGRESS_BAR 5799
-#define IDR_PROGRESS_BORDER_LEFT 5800
-#define IDR_PROGRESS_BORDER_RIGHT 5801
-#define IDR_PROGRESS_VALUE 5802
-#define IDR_RADIO 5803
-#define IDR_RADIO_CHECKED 5804
-#define IDR_RADIO_CHECKED_DISABLED 5805
-#define IDR_RADIO_CHECKED_HOVER 5806
-#define IDR_RADIO_CHECKED_PRESSED 5807
-#define IDR_RADIO_DISABLED 5808
-#define IDR_RADIO_FOCUSED 5809
-#define IDR_RADIO_FOCUSED_CHECKED 5810
-#define IDR_RADIO_FOCUSED_CHECKED_HOVER 5811
-#define IDR_RADIO_FOCUSED_CHECKED_PRESSED 5812
-#define IDR_RADIO_FOCUSED_HOVER 5813
-#define IDR_RADIO_FOCUSED_PRESSED 5814
-#define IDR_RADIO_HOVER 5815
-#define IDR_RADIO_PRESSED 5816
-#define IDR_RESTORE 5817
-#define IDR_RESTORE_H 5818
-#define IDR_RESTORE_P 5819
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_HOVER_BOTTOM 5820
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_HOVER_BOTTOM_LEFT 5821
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_HOVER_BOTTOM_RIGHT 5822
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_HOVER_CENTER 5823
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_HOVER_LEFT 5824
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_HOVER_RIGHT 5825
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_HOVER_TOP 5826
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_HOVER_TOP_LEFT 5827
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_HOVER_TOP_RIGHT 5828
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_NORMAL_BOTTOM 5829
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_NORMAL_BOTTOM_LEFT 5830
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_NORMAL_BOTTOM_RIGHT 5831
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_NORMAL_CENTER 5832
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_NORMAL_LEFT 5833
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_NORMAL_RIGHT 5834
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_NORMAL_TOP 5835
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_NORMAL_TOP_LEFT 5836
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_NORMAL_TOP_RIGHT 5837
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_PRESSED_BOTTOM 5838
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_PRESSED_BOTTOM_LEFT 5839
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_PRESSED_BOTTOM_RIGHT 5840
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_PRESSED_CENTER 5841
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_PRESSED_LEFT 5842
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_PRESSED_RIGHT 5843
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_PRESSED_TOP 5844
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_PRESSED_TOP_LEFT 5845
-#define IDR_SCROLLBAR_ARROW_BUTTON_BASE_PRESSED_TOP_RIGHT 5846
-#define IDR_SCROLLBAR_BASE_BOTTOM 5847
-#define IDR_SCROLLBAR_BASE_BOTTOM_LEFT 5848
-#define IDR_SCROLLBAR_BASE_BOTTOM_RIGHT 5849
-#define IDR_SCROLLBAR_BASE_CENTER 5850
-#define IDR_SCROLLBAR_BASE_LEFT 5851
-#define IDR_SCROLLBAR_BASE_RIGHT 5852
-#define IDR_SCROLLBAR_BASE_TOP 5853
-#define IDR_SCROLLBAR_BASE_TOP_LEFT 5854
-#define IDR_SCROLLBAR_BASE_TOP_RIGHT 5855
-#define IDR_SCROLLBAR_OVERLAY_THUMB_FILL_BOTTOM 5856
-#define IDR_SCROLLBAR_OVERLAY_THUMB_FILL_BOTTOM_LEFT 5857
-#define IDR_SCROLLBAR_OVERLAY_THUMB_FILL_BOTTOM_RIGHT 5858
-#define IDR_SCROLLBAR_OVERLAY_THUMB_FILL_CENTER 5859
-#define IDR_SCROLLBAR_OVERLAY_THUMB_FILL_LEFT 5860
-#define IDR_SCROLLBAR_OVERLAY_THUMB_FILL_RIGHT 5861
-#define IDR_SCROLLBAR_OVERLAY_THUMB_FILL_TOP 5862
-#define IDR_SCROLLBAR_OVERLAY_THUMB_FILL_TOP_LEFT 5863
-#define IDR_SCROLLBAR_OVERLAY_THUMB_FILL_TOP_RIGHT 5864
-#define IDR_SCROLLBAR_OVERLAY_THUMB_STROKE_BOTTOM 5865
-#define IDR_SCROLLBAR_OVERLAY_THUMB_STROKE_BOTTOM_LEFT 5866
-#define IDR_SCROLLBAR_OVERLAY_THUMB_STROKE_BOTTOM_RIGHT 5867
-#define IDR_SCROLLBAR_OVERLAY_THUMB_STROKE_LEFT 5868
-#define IDR_SCROLLBAR_OVERLAY_THUMB_STROKE_RIGHT 5869
-#define IDR_SCROLLBAR_OVERLAY_THUMB_STROKE_TOP 5870
-#define IDR_SCROLLBAR_OVERLAY_THUMB_STROKE_TOP_LEFT 5871
-#define IDR_SCROLLBAR_OVERLAY_THUMB_STROKE_TOP_RIGHT 5872
-#define IDR_SCROLLBAR_THUMB_BASE_HOVER_BOTTOM 5873
-#define IDR_SCROLLBAR_THUMB_BASE_HOVER_BOTTOM_LEFT 5874
-#define IDR_SCROLLBAR_THUMB_BASE_HOVER_BOTTOM_RIGHT 5875
-#define IDR_SCROLLBAR_THUMB_BASE_HOVER_CENTER 5876
-#define IDR_SCROLLBAR_THUMB_BASE_HOVER_LEFT 5877
-#define IDR_SCROLLBAR_THUMB_BASE_HOVER_RIGHT 5878
-#define IDR_SCROLLBAR_THUMB_BASE_HOVER_TOP 5879
-#define IDR_SCROLLBAR_THUMB_BASE_HOVER_TOP_LEFT 5880
-#define IDR_SCROLLBAR_THUMB_BASE_HOVER_TOP_RIGHT 5881
-#define IDR_SCROLLBAR_THUMB_BASE_NORMAL_BOTTOM 5882
-#define IDR_SCROLLBAR_THUMB_BASE_NORMAL_BOTTOM_LEFT 5883
-#define IDR_SCROLLBAR_THUMB_BASE_NORMAL_BOTTOM_RIGHT 5884
-#define IDR_SCROLLBAR_THUMB_BASE_NORMAL_CENTER 5885
-#define IDR_SCROLLBAR_THUMB_BASE_NORMAL_LEFT 5886
-#define IDR_SCROLLBAR_THUMB_BASE_NORMAL_RIGHT 5887
-#define IDR_SCROLLBAR_THUMB_BASE_NORMAL_TOP 5888
-#define IDR_SCROLLBAR_THUMB_BASE_NORMAL_TOP_LEFT 5889
-#define IDR_SCROLLBAR_THUMB_BASE_NORMAL_TOP_RIGHT 5890
-#define IDR_SCROLLBAR_THUMB_BASE_PRESSED_BOTTOM 5891
-#define IDR_SCROLLBAR_THUMB_BASE_PRESSED_BOTTOM_LEFT 5892
-#define IDR_SCROLLBAR_THUMB_BASE_PRESSED_BOTTOM_RIGHT 5893
-#define IDR_SCROLLBAR_THUMB_BASE_PRESSED_CENTER 5894
-#define IDR_SCROLLBAR_THUMB_BASE_PRESSED_LEFT 5895
-#define IDR_SCROLLBAR_THUMB_BASE_PRESSED_RIGHT 5896
-#define IDR_SCROLLBAR_THUMB_BASE_PRESSED_TOP 5897
-#define IDR_SCROLLBAR_THUMB_BASE_PRESSED_TOP_LEFT 5898
-#define IDR_SCROLLBAR_THUMB_BASE_PRESSED_TOP_RIGHT 5899
-#define IDR_TEXTBUTTON_HOVER_BOTTOM 5900
-#define IDR_TEXTBUTTON_HOVER_BOTTOM_LEFT 5901
-#define IDR_TEXTBUTTON_HOVER_BOTTOM_RIGHT 5902
-#define IDR_TEXTBUTTON_HOVER_CENTER 5903
-#define IDR_TEXTBUTTON_HOVER_LEFT 5904
-#define IDR_TEXTBUTTON_HOVER_RIGHT 5905
-#define IDR_TEXTBUTTON_HOVER_TOP 5906
-#define IDR_TEXTBUTTON_HOVER_TOP_LEFT 5907
-#define IDR_TEXTBUTTON_HOVER_TOP_RIGHT 5908
-#define IDR_TEXTBUTTON_PRESSED_BOTTOM 5909
-#define IDR_TEXTBUTTON_PRESSED_BOTTOM_LEFT 5910
-#define IDR_TEXTBUTTON_PRESSED_BOTTOM_RIGHT 5911
-#define IDR_TEXTBUTTON_PRESSED_CENTER 5912
-#define IDR_TEXTBUTTON_PRESSED_LEFT 5913
-#define IDR_TEXTBUTTON_PRESSED_RIGHT 5914
-#define IDR_TEXTBUTTON_PRESSED_TOP 5915
-#define IDR_TEXTBUTTON_PRESSED_TOP_LEFT 5916
-#define IDR_TEXTBUTTON_PRESSED_TOP_RIGHT 5917
-#define IDR_TEXTBUTTON_RAISED_BOTTOM 5918
-#define IDR_TEXTBUTTON_RAISED_BOTTOM_LEFT 5919
-#define IDR_TEXTBUTTON_RAISED_BOTTOM_RIGHT 5920
-#define IDR_TEXTBUTTON_RAISED_CENTER 5921
-#define IDR_TEXTBUTTON_RAISED_LEFT 5922
-#define IDR_TEXTBUTTON_RAISED_RIGHT 5923
-#define IDR_TEXTBUTTON_RAISED_TOP 5924
-#define IDR_TEXTBUTTON_RAISED_TOP_LEFT 5925
-#define IDR_TEXTBUTTON_RAISED_TOP_RIGHT 5926
-#define IDR_TEXT_SELECTION_HANDLE_CENTER 5927
-#define IDR_TEXT_SELECTION_HANDLE_LEFT 5928
-#define IDR_TEXT_SELECTION_HANDLE_RIGHT 5929
-#define IDR_THROBBER 5930
-#define IDR_TOUCH_DRAG_TIP_COPY 5931
-#define IDR_TOUCH_DRAG_TIP_MOVE 5932
-#define IDR_TOUCH_DRAG_TIP_LINK 5933
-#define IDR_TOUCH_DRAG_TIP_NODROP 5934
-#define IDR_DARK_TRAY_ATTENTION 5935
-#define IDR_DARK_TRAY_PRESSED 5936
-#define IDR_DARK_TRAY_DO_NOT_DISTURB_ATTENTION 5937
-#define IDR_DARK_TRAY_DO_NOT_DISTURB_PRESSED 5938
-#define IDR_DARK_TRAY_DO_NOT_DISTURB_EMPTY 5939
-#define IDR_DARK_TRAY_EMPTY 5940
-#define IDR_TRAY_ATTENTION 5941
-#define IDR_TRAY_ATTENTION_PRESSED 5942
-#define IDR_TRAY_DO_NOT_DISTURB_ATTENTION 5943
-#define IDR_TRAY_DO_NOT_DISTURB_ATTENTION_PRESSED 5944
-#define IDR_TRAY_DO_NOT_DISTURB_EMPTY 5945
-#define IDR_TRAY_DO_NOT_DISTURB_EMPTY_PRESSED 5946
-#define IDR_TRAY_EMPTY 5947
-#define IDR_TRAY_EMPTY_PRESSED 5948
-#define IDR_WINDOW_BOTTOM_CENTER 5949
-#define IDR_WINDOW_BOTTOM_LEFT_CORNER 5950
-#define IDR_WINDOW_BOTTOM_RIGHT_CORNER 5951
-#define IDR_WINDOW_LEFT_SIDE 5952
-#define IDR_WINDOW_RIGHT_SIDE 5953
-#define IDR_WINDOW_TOP_CENTER 5954
-#define IDR_WINDOW_TOP_LEFT_CORNER 5955
-#define IDR_WINDOW_TOP_RIGHT_CORNER 5956
-#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM 5957
-#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM_LEFT 5958
-#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM_RIGHT 5959
-#define IDR_WINDOW_BUBBLE_SHADOW_BIG_LEFT 5960
-#define IDR_WINDOW_BUBBLE_SHADOW_BIG_RIGHT 5961
-#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP 5962
-#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP_LEFT 5963
-#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP_RIGHT 5964
-#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_BOTTOM 5965
-#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_LEFT 5966
-#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_RIGHT 5967
-#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_TOP 5968
-#define IDR_WINDOW_BUBBLE_SHADOW_SMALL 5969
-#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM 5970
-#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM_LEFT 5971
-#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM_RIGHT 5972
-#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_LEFT 5973
-#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_RIGHT 5974
-#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP 5975
-#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP_LEFT 5976
-#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP_RIGHT 5977
-#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_BOTTOM 5978
-#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_LEFT 5979
-#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_RIGHT 5980
-#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_TOP 5981
+#define IDR_AURA_CURSOR_BIG_FLEUR 5523
+#define IDR_AURA_CURSOR_BIG_HAND 5524
+#define IDR_AURA_CURSOR_BIG_HELP 5525
+#define IDR_AURA_CURSOR_BIG_IBEAM 5526
+#define IDR_AURA_CURSOR_BIG_MOVE 5527
+#define IDR_AURA_CURSOR_BIG_NORTH_EAST_RESIZE 5528
+#define IDR_AURA_CURSOR_BIG_NORTH_EAST_SOUTH_WEST_RESIZE 5529
+#define IDR_AURA_CURSOR_BIG_NORTH_RESIZE 5530
+#define IDR_AURA_CURSOR_BIG_NORTH_SOUTH_RESIZE 5531
+#define IDR_AURA_CURSOR_BIG_NORTH_WEST_RESIZE 5532
+#define IDR_AURA_CURSOR_BIG_NORTH_WEST_SOUTH_EAST_RESIZE 5533
+#define IDR_AURA_CURSOR_BIG_NO_DROP 5534
+#define IDR_AURA_CURSOR_BIG_PTR 5535
+#define IDR_AURA_CURSOR_BIG_ROW_RESIZE 5536
+#define IDR_AURA_CURSOR_BIG_SOUTH_EAST_RESIZE 5537
+#define IDR_AURA_CURSOR_BIG_SOUTH_RESIZE 5538
+#define IDR_AURA_CURSOR_BIG_SOUTH_WEST_RESIZE 5539
+#define IDR_AURA_CURSOR_BIG_WEST_RESIZE 5540
+#define IDR_AURA_CURSOR_BIG_XTERM_HORIZ 5541
+#define IDR_AURA_CURSOR_BIG_ZOOM_IN 5542
+#define IDR_AURA_CURSOR_BIG_ZOOM_OUT 5543
+#define IDR_AURA_CURSOR_BIG_GRAB 5544
+#define IDR_AURA_CURSOR_BIG_GRABBING 5545
+#define IDR_AURA_CURSOR_ALIAS 5546
+#define IDR_AURA_CURSOR_CELL 5547
+#define IDR_AURA_CURSOR_COL_RESIZE 5548
+#define IDR_AURA_CURSOR_CONTEXT_MENU 5549
+#define IDR_AURA_CURSOR_COPY 5550
+#define IDR_AURA_CURSOR_CROSSHAIR 5551
+#define IDR_AURA_CURSOR_EAST_RESIZE 5552
+#define IDR_AURA_CURSOR_EAST_WEST_RESIZE 5553
+#define IDR_AURA_CURSOR_FLEUR 5554
+#define IDR_AURA_CURSOR_HAND 5555
+#define IDR_AURA_CURSOR_HELP 5556
+#define IDR_AURA_CURSOR_IBEAM 5557
+#define IDR_AURA_CURSOR_MOVE 5558
+#define IDR_AURA_CURSOR_NORTH_EAST_RESIZE 5559
+#define IDR_AURA_CURSOR_NORTH_EAST_SOUTH_WEST_RESIZE 5560
+#define IDR_AURA_CURSOR_NORTH_RESIZE 5561
+#define IDR_AURA_CURSOR_NORTH_SOUTH_RESIZE 5562
+#define IDR_AURA_CURSOR_NORTH_WEST_RESIZE 5563
+#define IDR_AURA_CURSOR_NORTH_WEST_SOUTH_EAST_RESIZE 5564
+#define IDR_AURA_CURSOR_NO_DROP 5565
+#define IDR_AURA_CURSOR_PTR 5566
+#define IDR_AURA_CURSOR_ROW_RESIZE 5567
+#define IDR_AURA_CURSOR_SOUTH_EAST_RESIZE 5568
+#define IDR_AURA_CURSOR_SOUTH_RESIZE 5569
+#define IDR_AURA_CURSOR_SOUTH_WEST_RESIZE 5570
+#define IDR_AURA_CURSOR_WEST_RESIZE 5571
+#define IDR_AURA_CURSOR_XTERM_HORIZ 5572
+#define IDR_AURA_CURSOR_ZOOM_IN 5573
+#define IDR_AURA_CURSOR_ZOOM_OUT 5574
+#define IDR_AURA_CURSOR_GRAB 5575
+#define IDR_AURA_CURSOR_GRABBING 5576
+#define IDR_AURA_SHADOW_ACTIVE_BOTTOM 5577
+#define IDR_AURA_SHADOW_ACTIVE_BOTTOM_LEFT 5578
+#define IDR_AURA_SHADOW_ACTIVE_BOTTOM_RIGHT 5579
+#define IDR_AURA_SHADOW_ACTIVE_LEFT 5580
+#define IDR_AURA_SHADOW_ACTIVE_RIGHT 5581
+#define IDR_AURA_SHADOW_ACTIVE_TOP 5582
+#define IDR_AURA_SHADOW_ACTIVE_TOP_LEFT 5583
+#define IDR_AURA_SHADOW_ACTIVE_TOP_RIGHT 5584
+#define IDR_AURA_SHADOW_INACTIVE_BOTTOM 5585
+#define IDR_AURA_SHADOW_INACTIVE_BOTTOM_LEFT 5586
+#define IDR_AURA_SHADOW_INACTIVE_BOTTOM_RIGHT 5587
+#define IDR_AURA_SHADOW_INACTIVE_LEFT 5588
+#define IDR_AURA_SHADOW_INACTIVE_RIGHT 5589
+#define IDR_AURA_SHADOW_INACTIVE_TOP 5590
+#define IDR_AURA_SHADOW_INACTIVE_TOP_LEFT 5591
+#define IDR_AURA_SHADOW_INACTIVE_TOP_RIGHT 5592
+#define IDR_BROWSER_ACTION_BADGE_CENTER 5593
+#define IDR_BROWSER_ACTION_BADGE_LEFT 5594
+#define IDR_BROWSER_ACTION_BADGE_RIGHT 5595
+#define IDR_BUBBLE_B 5596
+#define IDR_BUBBLE_BL 5597
+#define IDR_BUBBLE_BR 5598
+#define IDR_BUBBLE_B_ARROW 5599
+#define IDR_BUBBLE_L 5600
+#define IDR_BUBBLE_L_ARROW 5601
+#define IDR_BUBBLE_R 5602
+#define IDR_BUBBLE_R_ARROW 5603
+#define IDR_BUBBLE_T 5604
+#define IDR_BUBBLE_TL 5605
+#define IDR_BUBBLE_TR 5606
+#define IDR_BUBBLE_T_ARROW 5607
+#define IDR_BUTTON_DISABLED 5608
+#define IDR_BUTTON_FOCUSED_HOVER 5609
+#define IDR_BUTTON_FOCUSED_NORMAL 5610
+#define IDR_BUTTON_FOCUSED_PRESSED 5611
+#define IDR_BUTTON_HOVER 5612
+#define IDR_BUTTON_NORMAL 5613
+#define IDR_BUTTON_PRESSED 5614
+#define IDR_BUY_WITH_GOOGLE_BUTTON 5615
+#define IDR_BUY_WITH_GOOGLE_BUTTON_H 5616
+#define IDR_BUY_WITH_GOOGLE_BUTTON_P 5617
+#define IDR_BLUE_BUTTON_DISABLED 5618
+#define IDR_BLUE_BUTTON_FOCUSED_HOVER 5619
+#define IDR_BLUE_BUTTON_FOCUSED_NORMAL 5620
+#define IDR_BLUE_BUTTON_FOCUSED_PRESSED 5621
+#define IDR_BLUE_BUTTON_HOVER 5622
+#define IDR_BLUE_BUTTON_NORMAL 5623
+#define IDR_BLUE_BUTTON_PRESSED 5624
+#define IDR_CHECKBOX 5625
+#define IDR_CHECKBOX_CHECKED 5626
+#define IDR_CHECKBOX_CHECKED_DISABLED 5627
+#define IDR_CHECKBOX_CHECKED_HOVER 5628
+#define IDR_CHECKBOX_CHECKED_PRESSED 5629
+#define IDR_CHECKBOX_DISABLED 5630
+#define IDR_CHECKBOX_FOCUSED 5631
+#define IDR_CHECKBOX_FOCUSED_CHECKED 5632
+#define IDR_CHECKBOX_FOCUSED_CHECKED_HOVER 5633
+#define IDR_CHECKBOX_FOCUSED_CHECKED_PRESSED 5634
+#define IDR_CHECKBOX_FOCUSED_HOVER 5635
+#define IDR_CHECKBOX_FOCUSED_PRESSED 5636
+#define IDR_CHECKBOX_HOVER 5637
+#define IDR_CHECKBOX_PRESSED 5638
+#define IDR_CHECKMARK 5639
+#define IDR_RADIO 5640
+#define IDR_RADIO_CHECKED 5641
+#define IDR_RADIO_CHECKED_DISABLED 5642
+#define IDR_RADIO_CHECKED_HOVER 5643
+#define IDR_RADIO_CHECKED_PRESSED 5644
+#define IDR_RADIO_DISABLED 5645
+#define IDR_RADIO_FOCUSED 5646
+#define IDR_RADIO_FOCUSED_CHECKED 5647
+#define IDR_RADIO_FOCUSED_CHECKED_HOVER 5648
+#define IDR_RADIO_FOCUSED_CHECKED_PRESSED 5649
+#define IDR_RADIO_FOCUSED_HOVER 5650
+#define IDR_RADIO_FOCUSED_PRESSED 5651
+#define IDR_RADIO_HOVER 5652
+#define IDR_RADIO_PRESSED 5653
+#define IDR_TEXT_SELECTION_HANDLE 5654
+#define IDR_TOUCH_DRAG_TIP_COPY 5655
+#define IDR_TOUCH_DRAG_TIP_MOVE 5656
+#define IDR_TOUCH_DRAG_TIP_LINK 5657
+#define IDR_TOUCH_DRAG_TIP_NODROP 5658
+#define IDR_CLOSE 5659
+#define IDR_CLOSE_2 5660
+#define IDR_CLOSE_2_H 5661
+#define IDR_CLOSE_2_MASK 5662
+#define IDR_CLOSE_2_P 5663
+#define IDR_CLOSE_DIALOG 5664
+#define IDR_CLOSE_DIALOG_H 5665
+#define IDR_CLOSE_DIALOG_P 5666
+#define IDR_CLOSE_H 5667
+#define IDR_CLOSE_P 5668
+#define IDR_COMBOBOX_BUTTON_BOTTOM 5669
+#define IDR_COMBOBOX_BUTTON_H_BOTTOM 5670
+#define IDR_COMBOBOX_BUTTON_P_BOTTOM 5671
+#define IDR_COMBOBOX_BUTTON_BOTTOM_LEFT 5672
+#define IDR_COMBOBOX_BUTTON_H_BOTTOM_LEFT 5673
+#define IDR_COMBOBOX_BUTTON_P_BOTTOM_LEFT 5674
+#define IDR_COMBOBOX_BUTTON_BOTTOM_RIGHT 5675
+#define IDR_COMBOBOX_BUTTON_H_BOTTOM_RIGHT 5676
+#define IDR_COMBOBOX_BUTTON_P_BOTTOM_RIGHT 5677
+#define IDR_COMBOBOX_BUTTON_CENTER 5678
+#define IDR_COMBOBOX_BUTTON_H_CENTER 5679
+#define IDR_COMBOBOX_BUTTON_P_CENTER 5680
+#define IDR_COMBOBOX_BUTTON_LEFT 5681
+#define IDR_COMBOBOX_BUTTON_H_LEFT 5682
+#define IDR_COMBOBOX_BUTTON_P_LEFT 5683
+#define IDR_COMBOBOX_BUTTON_RIGHT 5684
+#define IDR_COMBOBOX_BUTTON_H_RIGHT 5685
+#define IDR_COMBOBOX_BUTTON_P_RIGHT 5686
+#define IDR_COMBOBOX_BUTTON_MENU_BOTTOM 5687
+#define IDR_COMBOBOX_BUTTON_H_MENU_BOTTOM 5688
+#define IDR_COMBOBOX_BUTTON_P_MENU_BOTTOM 5689
+#define IDR_COMBOBOX_BUTTON_MENU_CENTER 5690
+#define IDR_COMBOBOX_BUTTON_H_MENU_CENTER 5691
+#define IDR_COMBOBOX_BUTTON_P_MENU_CENTER 5692
+#define IDR_COMBOBOX_BUTTON_MENU_TOP 5693
+#define IDR_COMBOBOX_BUTTON_H_MENU_TOP 5694
+#define IDR_COMBOBOX_BUTTON_P_MENU_TOP 5695
+#define IDR_COMBOBOX_BUTTON_TOP 5696
+#define IDR_COMBOBOX_BUTTON_H_TOP 5697
+#define IDR_COMBOBOX_BUTTON_P_TOP 5698
+#define IDR_COMBOBOX_BUTTON_TOP_LEFT 5699
+#define IDR_COMBOBOX_BUTTON_H_TOP_LEFT 5700
+#define IDR_COMBOBOX_BUTTON_P_TOP_LEFT 5701
+#define IDR_COMBOBOX_BUTTON_TOP_RIGHT 5702
+#define IDR_COMBOBOX_BUTTON_H_TOP_RIGHT 5703
+#define IDR_COMBOBOX_BUTTON_P_TOP_RIGHT 5704
+#define IDR_COMBOBOX_BUTTON_F_BOTTOM 5705
+#define IDR_COMBOBOX_BUTTON_F_H_BOTTOM 5706
+#define IDR_COMBOBOX_BUTTON_F_P_BOTTOM 5707
+#define IDR_COMBOBOX_BUTTON_F_BOTTOM_LEFT 5708
+#define IDR_COMBOBOX_BUTTON_F_H_BOTTOM_LEFT 5709
+#define IDR_COMBOBOX_BUTTON_F_P_BOTTOM_LEFT 5710
+#define IDR_COMBOBOX_BUTTON_F_BOTTOM_RIGHT 5711
+#define IDR_COMBOBOX_BUTTON_F_H_BOTTOM_RIGHT 5712
+#define IDR_COMBOBOX_BUTTON_F_P_BOTTOM_RIGHT 5713
+#define IDR_COMBOBOX_BUTTON_F_CENTER 5714
+#define IDR_COMBOBOX_BUTTON_F_H_CENTER 5715
+#define IDR_COMBOBOX_BUTTON_F_P_CENTER 5716
+#define IDR_COMBOBOX_BUTTON_F_LEFT 5717
+#define IDR_COMBOBOX_BUTTON_F_H_LEFT 5718
+#define IDR_COMBOBOX_BUTTON_F_P_LEFT 5719
+#define IDR_COMBOBOX_BUTTON_F_RIGHT 5720
+#define IDR_COMBOBOX_BUTTON_F_H_RIGHT 5721
+#define IDR_COMBOBOX_BUTTON_F_P_RIGHT 5722
+#define IDR_COMBOBOX_BUTTON_F_MENU_BOTTOM 5723
+#define IDR_COMBOBOX_BUTTON_F_H_MENU_BOTTOM 5724
+#define IDR_COMBOBOX_BUTTON_F_P_MENU_BOTTOM 5725
+#define IDR_COMBOBOX_BUTTON_F_MENU_CENTER 5726
+#define IDR_COMBOBOX_BUTTON_F_H_MENU_CENTER 5727
+#define IDR_COMBOBOX_BUTTON_F_P_MENU_CENTER 5728
+#define IDR_COMBOBOX_BUTTON_F_MENU_TOP 5729
+#define IDR_COMBOBOX_BUTTON_F_H_MENU_TOP 5730
+#define IDR_COMBOBOX_BUTTON_F_P_MENU_TOP 5731
+#define IDR_COMBOBOX_BUTTON_F_TOP 5732
+#define IDR_COMBOBOX_BUTTON_F_H_TOP 5733
+#define IDR_COMBOBOX_BUTTON_F_P_TOP 5734
+#define IDR_COMBOBOX_BUTTON_F_TOP_LEFT 5735
+#define IDR_COMBOBOX_BUTTON_F_H_TOP_LEFT 5736
+#define IDR_COMBOBOX_BUTTON_F_P_TOP_LEFT 5737
+#define IDR_COMBOBOX_BUTTON_F_TOP_RIGHT 5738
+#define IDR_COMBOBOX_BUTTON_F_H_TOP_RIGHT 5739
+#define IDR_COMBOBOX_BUTTON_F_P_TOP_RIGHT 5740
+#define IDR_CONTENT_BOTTOM_CENTER 5741
+#define IDR_CONTENT_BOTTOM_LEFT_CORNER 5742
+#define IDR_CONTENT_BOTTOM_RIGHT_CORNER 5743
+#define IDR_CONTENT_LEFT_SIDE 5744
+#define IDR_CONTENT_RIGHT_SIDE 5745
+#define IDR_DEFAULT_FAVICON 5746
+#define IDR_DEFAULT_FAVICON_32 5747
+#define IDR_DEFAULT_FAVICON_64 5748
+#define IDR_FOLDER_CLOSED 5749
+#define IDR_FOLDER_CLOSED_RTL 5750
+#define IDR_FOLDER_OPEN 5751
+#define IDR_FOLDER_OPEN_RTL 5752
+#define IDR_FRAME 5753
+#define IDR_FRAME_APP_PANEL 5754
+#define IDR_FRAME_INACTIVE 5755
+#define IDR_MAXIMIZE 5756
+#define IDR_MAXIMIZE_H 5757
+#define IDR_MAXIMIZE_P 5758
+#define IDR_MENU_HIERARCHY_ARROW 5759
+#define IDR_MENU_HIERARCHY_ARROW_DARK_BACKGROUND 5760
+#define IDR_MENU_CHECK 5761
+#define IDR_MENU_CHECK_CHECKED 5762
+#define IDR_MENU_CHECK_CHECKED_DARK_BACKGROUND 5763
+#define IDR_MENU_RADIO_EMPTY 5764
+#define IDR_MENU_RADIO_SELECTED 5765
+#define IDR_SLIDER_ACTIVE_LEFT 5766
+#define IDR_SLIDER_ACTIVE_RIGHT 5767
+#define IDR_SLIDER_ACTIVE_CENTER 5768
+#define IDR_SLIDER_DISABLED_LEFT 5769
+#define IDR_SLIDER_DISABLED_RIGHT 5770
+#define IDR_SLIDER_DISABLED_CENTER 5771
+#define IDR_SLIDER_PRESSED_LEFT 5772
+#define IDR_SLIDER_PRESSED_RIGHT 5773
+#define IDR_SLIDER_PRESSED_CENTER 5774
+#define IDR_SLIDER_ACTIVE_THUMB 5775
+#define IDR_SLIDER_DISABLED_THUMB 5776
+#define IDR_MENU_DROPARROW 5777
+#define IDR_MESSAGE_CLOSE 5778
+#define IDR_MINIMIZE 5779
+#define IDR_MINIMIZE_H 5780
+#define IDR_MINIMIZE_P 5781
+#define IDR_NOTIFICATION_ARROW 5782
+#define IDR_NOTIFICATION_ARROW_HOVER 5783
+#define IDR_NOTIFICATION_ARROW_PRESSED 5784
+#define IDR_NOTIFICATION_ADVANCED_SETTINGS 5785
+#define IDR_NOTIFICATION_ADVANCED_SETTINGS_HOVER 5786
+#define IDR_NOTIFICATION_ADVANCED_SETTINGS_PRESSED 5787
+#define IDR_NOTIFICATION_CLEAR_ALL 5788
+#define IDR_NOTIFICATION_CLEAR_ALL_DISABLED 5789
+#define IDR_NOTIFICATION_CLEAR_ALL_HOVER 5790
+#define IDR_NOTIFICATION_CLEAR_ALL_PRESSED 5791
+#define IDR_NOTIFICATION_CLOSE 5792
+#define IDR_NOTIFICATION_CLOSE_HOVER 5793
+#define IDR_NOTIFICATION_CLOSE_PRESSED 5794
+#define IDR_NOTIFICATION_EXPAND 5795
+#define IDR_NOTIFICATION_EXPAND_HOVER 5796
+#define IDR_NOTIFICATION_EXPAND_PRESSED 5797
+#define IDR_NOTIFICATION_DO_NOT_DISTURB 5798
+#define IDR_NOTIFICATION_DO_NOT_DISTURB_HOVER 5799
+#define IDR_NOTIFICATION_DO_NOT_DISTURB_PRESSED 5800
+#define IDR_NOTIFICATION_SETTINGS 5801
+#define IDR_NOTIFICATION_SETTINGS_HOVER 5802
+#define IDR_NOTIFICATION_SETTINGS_PRESSED 5803
+#define IDR_OAK 5804
+#define IDR_OOBE_ACTION_BOX_BUTTON_HOVER 5805
+#define IDR_OOBE_ACTION_BOX_BUTTON_NORMAL 5806
+#define IDR_OOBE_ACTION_BOX_BUTTON_PRESSED 5807
+#define IDR_PANEL_TOP_LEFT_CORNER 5808
+#define IDR_PANEL_TOP_RIGHT_CORNER 5809
+#define IDR_PANEL_BOTTOM_LEFT_CORNER 5810
+#define IDR_PANEL_BOTTOM_RIGHT_CORNER 5811
+#define IDR_PROGRESS_BAR 5812
+#define IDR_PROGRESS_BORDER_LEFT 5813
+#define IDR_PROGRESS_BORDER_RIGHT 5814
+#define IDR_PROGRESS_VALUE 5815
+#define IDR_SCROLL_BASE_HORIZONTAL_CENTER_H 5816
+#define IDR_SCROLL_BASE_HORIZONTAL_LEFT_H 5817
+#define IDR_SCROLL_BASE_HORIZONTAL_RIGHT_H 5818
+#define IDR_SCROLL_BASE_VERTICAL_BOTTOM_H 5819
+#define IDR_SCROLL_BASE_VERTICAL_CENTER_H 5820
+#define IDR_SCROLL_BASE_VERTICAL_TOP_H 5821
+#define IDR_SCROLL_THUMB_HORIZONTAL_CENTER 5822
+#define IDR_SCROLL_THUMB_HORIZONTAL_CENTER_H 5823
+#define IDR_SCROLL_THUMB_HORIZONTAL_CENTER_P 5824
+#define IDR_SCROLL_THUMB_HORIZONTAL_LEFT 5825
+#define IDR_SCROLL_THUMB_HORIZONTAL_LEFT_H 5826
+#define IDR_SCROLL_THUMB_HORIZONTAL_LEFT_P 5827
+#define IDR_SCROLL_THUMB_HORIZONTAL_RIGHT 5828
+#define IDR_SCROLL_THUMB_HORIZONTAL_RIGHT_H 5829
+#define IDR_SCROLL_THUMB_HORIZONTAL_RIGHT_P 5830
+#define IDR_SCROLL_THUMB_VERTICAL_BOTTOM 5831
+#define IDR_SCROLL_THUMB_VERTICAL_BOTTOM_H 5832
+#define IDR_SCROLL_THUMB_VERTICAL_BOTTOM_P 5833
+#define IDR_SCROLL_THUMB_VERTICAL_CENTER 5834
+#define IDR_SCROLL_THUMB_VERTICAL_CENTER_H 5835
+#define IDR_SCROLL_THUMB_VERTICAL_CENTER_P 5836
+#define IDR_SCROLL_THUMB_VERTICAL_TOP 5837
+#define IDR_SCROLL_THUMB_VERTICAL_TOP_H 5838
+#define IDR_SCROLL_THUMB_VERTICAL_TOP_P 5839
+#define IDR_RESTORE 5840
+#define IDR_RESTORE_H 5841
+#define IDR_RESTORE_P 5842
+#define IDR_TEXTBUTTON_HOVER_BOTTOM 5843
+#define IDR_TEXTBUTTON_HOVER_BOTTOM_LEFT 5844
+#define IDR_TEXTBUTTON_HOVER_BOTTOM_RIGHT 5845
+#define IDR_TEXTBUTTON_HOVER_CENTER 5846
+#define IDR_TEXTBUTTON_HOVER_LEFT 5847
+#define IDR_TEXTBUTTON_HOVER_RIGHT 5848
+#define IDR_TEXTBUTTON_HOVER_TOP 5849
+#define IDR_TEXTBUTTON_HOVER_TOP_LEFT 5850
+#define IDR_TEXTBUTTON_HOVER_TOP_RIGHT 5851
+#define IDR_TEXTBUTTON_PRESSED_BOTTOM 5852
+#define IDR_TEXTBUTTON_PRESSED_BOTTOM_LEFT 5853
+#define IDR_TEXTBUTTON_PRESSED_BOTTOM_RIGHT 5854
+#define IDR_TEXTBUTTON_PRESSED_CENTER 5855
+#define IDR_TEXTBUTTON_PRESSED_LEFT 5856
+#define IDR_TEXTBUTTON_PRESSED_RIGHT 5857
+#define IDR_TEXTBUTTON_PRESSED_TOP 5858
+#define IDR_TEXTBUTTON_PRESSED_TOP_LEFT 5859
+#define IDR_TEXTBUTTON_PRESSED_TOP_RIGHT 5860
+#define IDR_THROBBER 5861
+#define IDR_TRAY_ATTENTION 5862
+#define IDR_TRAY_ATTENTION_PRESSED 5863
+#define IDR_TRAY_DO_NOT_DISTURB_ATTENTION 5864
+#define IDR_TRAY_DO_NOT_DISTURB_ATTENTION_PRESSED 5865
+#define IDR_TRAY_DO_NOT_DISTURB_EMPTY 5866
+#define IDR_TRAY_DO_NOT_DISTURB_EMPTY_PRESSED 5867
+#define IDR_TRAY_EMPTY 5868
+#define IDR_TRAY_EMPTY_PRESSED 5869
+#define IDR_WINDOW_BOTTOM_CENTER 5870
+#define IDR_WINDOW_BOTTOM_LEFT_CORNER 5871
+#define IDR_WINDOW_BOTTOM_RIGHT_CORNER 5872
+#define IDR_WINDOW_LEFT_SIDE 5873
+#define IDR_WINDOW_RIGHT_SIDE 5874
+#define IDR_WINDOW_TOP_CENTER 5875
+#define IDR_WINDOW_TOP_LEFT_CORNER 5876
+#define IDR_WINDOW_TOP_RIGHT_CORNER 5877
+#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM 5878
+#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM_LEFT 5879
+#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM_RIGHT 5880
+#define IDR_WINDOW_BUBBLE_SHADOW_BIG_LEFT 5881
+#define IDR_WINDOW_BUBBLE_SHADOW_BIG_RIGHT 5882
+#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP 5883
+#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP_LEFT 5884
+#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP_RIGHT 5885
+#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_BOTTOM 5886
+#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_LEFT 5887
+#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_RIGHT 5888
+#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_TOP 5889
+#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM 5890
+#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM_LEFT 5891
+#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM_RIGHT 5892
+#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_LEFT 5893
+#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_RIGHT 5894
+#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP 5895
+#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP_LEFT 5896
+#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP_RIGHT 5897
+#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_BOTTOM 5898
+#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_LEFT 5899
+#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_RIGHT 5900
+#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_TOP 5901
+
+// ---------------------------------------------------------------------------
+// From webkit_resources.h:
+
+#define IDR_BROKENIMAGE 4700
+#define IDR_INPUT_SPEECH 4701
+#define IDR_INPUT_SPEECH_RECORDING 4702
+#define IDR_INPUT_SPEECH_WAITING 4703
+#define IDR_MEDIAPLAYER_PAUSE_BUTTON 4704
+#define IDR_MEDIAPLAYER_PAUSE_BUTTON_HOVER 4705
+#define IDR_MEDIAPLAYER_PAUSE_BUTTON_DOWN 4706
+#define IDR_MEDIAPLAYER_PLAY_BUTTON 4707
+#define IDR_MEDIAPLAYER_PLAY_BUTTON_HOVER 4708
+#define IDR_MEDIAPLAYER_PLAY_BUTTON_DOWN 4709
+#define IDR_MEDIAPLAYER_PLAY_BUTTON_DISABLED 4710
+#define IDR_MEDIAPLAYER_SOUND_LEVEL3_BUTTON 4711
+#define IDR_MEDIAPLAYER_SOUND_LEVEL3_BUTTON_HOVER 4712
+#define IDR_MEDIAPLAYER_SOUND_LEVEL3_BUTTON_DOWN 4713
+#define IDR_MEDIAPLAYER_SOUND_LEVEL2_BUTTON 4714
+#define IDR_MEDIAPLAYER_SOUND_LEVEL2_BUTTON_HOVER 4715
+#define IDR_MEDIAPLAYER_SOUND_LEVEL2_BUTTON_DOWN 4716
+#define IDR_MEDIAPLAYER_SOUND_LEVEL1_BUTTON 4717
+#define IDR_MEDIAPLAYER_SOUND_LEVEL1_BUTTON_HOVER 4718
+#define IDR_MEDIAPLAYER_SOUND_LEVEL1_BUTTON_DOWN 4719
+#define IDR_MEDIAPLAYER_SOUND_LEVEL0_BUTTON 4720
+#define IDR_MEDIAPLAYER_SOUND_LEVEL0_BUTTON_HOVER 4721
+#define IDR_MEDIAPLAYER_SOUND_LEVEL0_BUTTON_DOWN 4722
+#define IDR_MEDIAPLAYER_SOUND_DISABLED 4723
+#define IDR_MEDIAPLAYER_SLIDER_THUMB 4724
+#define IDR_MEDIAPLAYER_SLIDER_THUMB_HOVER 4725
+#define IDR_MEDIAPLAYER_SLIDER_THUMB_DOWN 4726
+#define IDR_MEDIAPLAYER_VOLUME_SLIDER_THUMB 4727
+#define IDR_MEDIAPLAYER_VOLUME_SLIDER_THUMB_HOVER 4728
+#define IDR_MEDIAPLAYER_VOLUME_SLIDER_THUMB_DOWN 4729
+#define IDR_MEDIAPLAYER_VOLUME_SLIDER_THUMB_DISABLED 4730
+#define IDR_MEDIAPLAYER_CLOSEDCAPTION_BUTTON 4731
+#define IDR_MEDIAPLAYER_CLOSEDCAPTION_BUTTON_HOVER 4732
+#define IDR_MEDIAPLAYER_CLOSEDCAPTION_BUTTON_DOWN 4733
+#define IDR_MEDIAPLAYER_CLOSEDCAPTION_BUTTON_DISABLED 4734
+#define IDR_MEDIAPLAYER_FULLSCREEN_BUTTON 4735
+#define IDR_MEDIAPLAYER_FULLSCREEN_BUTTON_HOVER 4736
+#define IDR_MEDIAPLAYER_FULLSCREEN_BUTTON_DOWN 4737
+#define IDR_MEDIAPLAYER_FULLSCREEN_BUTTON_DISABLED 4738
+#define IDR_MEDIAPLAYER_OVERLAY_PLAY_BUTTON 4739
+#define IDR_OVERHANG_PATTERN 4740
+#define IDR_OVERHANG_SHADOW 4741
+#define IDR_ALIAS_CURSOR 4742
+#define IDR_CELL_CURSOR 4743
+#define IDR_EAST_RESIZE_CURSOR 4744
+#define IDR_EASTWEST_RESIZE_CURSOR 4745
+#define IDR_HELP_CURSOR 4746
+#define IDR_LINK_CURSOR 4747
+#define IDR_MOVE_CURSOR 4748
+#define IDR_NONE_CURSOR 4749
+#define IDR_NORTHEAST_RESIZE_CURSOR 4750
+#define IDR_NORTHEASTSOUTHWEST_RESIZE_CURSOR 4751
+#define IDR_NORTH_RESIZE_CURSOR 4752
+#define IDR_NORTHSOUTH_RESIZE_CURSOR 4753
+#define IDR_NORTHWEST_RESIZE_CURSOR 4754
+#define IDR_NORTHWESTSOUTHEAST_RESIZE_CURSOR 4755
+#define IDR_PROGRESS_CURSOR 4756
+#define IDR_SOUTHEAST_RESIZE_CURSOR 4757
+#define IDR_SOUTH_RESIZE_CURSOR 4758
+#define IDR_SOUTHWEST_RESIZE_CURSOR 4759
+#define IDR_VERTICALTEXT_CURSOR 4760
+#define IDR_WAIT_CURSOR 4761
+#define IDR_WEST_RESIZE_CURSOR 4762
+#define IDR_ZOOMIN_CURSOR 4763
+#define IDR_ZOOMOUT_CURSOR 4764
+#define IDR_PAN_SCROLL_ICON 4765
+#define IDR_SEARCH_CANCEL 4766
+#define IDR_SEARCH_CANCEL_PRESSED 4767
+#define IDR_SEARCH_MAGNIFIER 4768
+#define IDR_SEARCH_MAGNIFIER_RESULTS 4769
+#define IDR_TEXTAREA_RESIZER 4770
+#define IDR_AUTOFILL_CC_AMEX 4771
+#define IDR_AUTOFILL_CC_DINERS 4772
+#define IDR_AUTOFILL_CC_DISCOVER 4773
+#define IDR_AUTOFILL_CC_GENERIC 4774
+#define IDR_AUTOFILL_CC_JCB 4775
+#define IDR_AUTOFILL_CC_MASTERCARD 4776
+#define IDR_AUTOFILL_CC_VISA 4777
+#define IDR_PDF_BUTTON_FTP 4778
+#define IDR_PDF_BUTTON_FTP_HOVER 4779
+#define IDR_PDF_BUTTON_FTP_PRESSED 4780
+#define IDR_PDF_BUTTON_FTW 4781
+#define IDR_PDF_BUTTON_FTW_HOVER 4782
+#define IDR_PDF_BUTTON_FTW_PRESSED 4783
+#define IDR_PDF_BUTTON_ZOOMIN_END 4784
+#define IDR_PDF_BUTTON_ZOOMIN_END_HOVER 4785
+#define IDR_PDF_BUTTON_ZOOMIN_END_PRESSED 4786
+#define IDR_PDF_BUTTON_ZOOMIN 4787
+#define IDR_PDF_BUTTON_ZOOMIN_HOVER 4788
+#define IDR_PDF_BUTTON_ZOOMIN_PRESSED 4789
+#define IDR_PDF_BUTTON_ZOOMOUT 4790
+#define IDR_PDF_BUTTON_ZOOMOUT_HOVER 4791
+#define IDR_PDF_BUTTON_ZOOMOUT_PRESSED 4792
+#define IDR_PDF_BUTTON_SAVE 4793
+#define IDR_PDF_BUTTON_SAVE_HOVER 4794
+#define IDR_PDF_BUTTON_SAVE_PRESSED 4795
+#define IDR_PDF_BUTTON_PRINT 4796
+#define IDR_PDF_BUTTON_PRINT_HOVER 4797
+#define IDR_PDF_BUTTON_PRINT_PRESSED 4798
+#define IDR_PDF_BUTTON_PRINT_DISABLED 4799
+#define IDR_PDF_THUMBNAIL_0 4800
+#define IDR_PDF_THUMBNAIL_1 4801
+#define IDR_PDF_THUMBNAIL_2 4802
+#define IDR_PDF_THUMBNAIL_3 4803
+#define IDR_PDF_THUMBNAIL_4 4804
+#define IDR_PDF_THUMBNAIL_5 4805
+#define IDR_PDF_THUMBNAIL_6 4806
+#define IDR_PDF_THUMBNAIL_7 4807
+#define IDR_PDF_THUMBNAIL_8 4808
+#define IDR_PDF_THUMBNAIL_9 4809
+#define IDR_PDF_THUMBNAIL_NUM_BACKGROUND 4810
+#define IDR_PDF_PROGRESS_BAR_0 4811
+#define IDR_PDF_PROGRESS_BAR_1 4812
+#define IDR_PDF_PROGRESS_BAR_2 4813
+#define IDR_PDF_PROGRESS_BAR_3 4814
+#define IDR_PDF_PROGRESS_BAR_4 4815
+#define IDR_PDF_PROGRESS_BAR_5 4816
+#define IDR_PDF_PROGRESS_BAR_6 4817
+#define IDR_PDF_PROGRESS_BAR_7 4818
+#define IDR_PDF_PROGRESS_BAR_8 4819
+#define IDR_PDF_PROGRESS_BAR_BACKGROUND 4820
+#define IDR_PDF_PAGE_INDICATOR_BACKGROUND 4821
+#define IDR_PDF_PAGE_DROPSHADOW 4822
+#define IDR_PASSWORD_GENERATION_ICON 4823
+#define IDR_PASSWORD_GENERATION_ICON_HOVER 4824
+#define IDR_SYNTHETIC_TOUCH_CURSOR 4825
#endif // CEF_INCLUDE_CEF_PACK_RESOURCES_H_
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
#define IDS_DEFAULT_PRINT_DOCUMENT_TITLE 28019
#define IDS_PRINT_SPOOL_FAILED_TITLE_TEXT 28020
#define IDS_PRINT_SPOOL_FAILED_ERROR_TEXT 28021
-#define IDS_PRINT_INVALID_PRINTER_SETTINGS 28022
-#define IDS_UTILITY_PROCESS_EMF_CONVERTOR_NAME 28023
-#define IDS_UTILITY_PROCESS_PROXY_RESOLVER_NAME 28024
-#define IDS_SPELLCHECK_DICTIONARY 28025
-#define IDS_CONTENT_CONTEXT_ADD_TO_DICTIONARY 28026
-#define IDS_CONTENT_CONTEXT_NO_SPELLING_SUGGESTIONS 28027
+#define IDS_PRINT_PREVIEW_INVALID_PRINTER_SETTINGS 28022
// ---------------------------------------------------------------------------
-// From components_strings.h:
-
-#define IDS_JAVASCRIPT_ALERT_DEFAULT_TITLE 30000
-#define IDS_JAVASCRIPT_MESSAGEBOX_DEFAULT_TITLE 30001
-#define IDS_JAVASCRIPT_ALERT_TITLE 30002
-#define IDS_JAVASCRIPT_MESSAGEBOX_TITLE 30003
-#define IDS_JAVASCRIPT_MESSAGEBOX_SUPPRESS_OPTION 30004
-#define IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE 30005
-#define IDS_BEFOREUNLOAD_MESSAGEBOX_FOOTER 30006
-#define IDS_BEFOREUNLOAD_MESSAGEBOX_OK_BUTTON_LABEL 30007
-#define IDS_BEFOREUNLOAD_MESSAGEBOX_CANCEL_BUTTON_LABEL 30008
-#define IDS_BEFORERELOAD_MESSAGEBOX_TITLE 30009
-#define IDS_BEFORERELOAD_MESSAGEBOX_FOOTER 30010
-#define IDS_BEFORERELOAD_MESSAGEBOX_OK_BUTTON_LABEL 30011
-#define IDS_BEFORERELOAD_MESSAGEBOX_CANCEL_BUTTON_LABEL 30012
-#define IDS_AUTOFILL_CLEAR_FORM_MENU_ITEM 30013
-#define IDS_AUTOFILL_WARNING_FORM_DISABLED 30014
-#define IDS_AUTOFILL_WARNING_INSECURE_CONNECTION 30015
-#define IDS_AUTOFILL_CC_AMEX 30016
-#define IDS_AUTOFILL_CC_AMEX_SHORT 30017
-#define IDS_AUTOFILL_CC_DINERS 30018
-#define IDS_AUTOFILL_CC_DISCOVER 30019
-#define IDS_AUTOFILL_CC_JCB 30020
-#define IDS_AUTOFILL_CC_MASTERCARD 30021
-#define IDS_AUTOFILL_CC_UNION_PAY 30022
-#define IDS_AUTOFILL_CC_VISA 30023
-#define IDS_AUTOFILL_CC_GENERIC 30024
-#define IDS_AUTOFILL_ADDRESS_LINE_SEPARATOR 30025
-#define IDS_AUTOFILL_ADDRESS_SUMMARY_SEPARATOR 30026
-#define IDS_AUTOFILL_FIELD_LABEL_STATE 30027
-#define IDS_AUTOFILL_FIELD_LABEL_AREA 30028
-#define IDS_AUTOFILL_FIELD_LABEL_COUNTY 30029
-#define IDS_AUTOFILL_FIELD_LABEL_DEPARTMENT 30030
-#define IDS_AUTOFILL_FIELD_LABEL_DISTRICT 30031
-#define IDS_AUTOFILL_FIELD_LABEL_EMIRATE 30032
-#define IDS_AUTOFILL_FIELD_LABEL_ISLAND 30033
-#define IDS_AUTOFILL_FIELD_LABEL_PARISH 30034
-#define IDS_AUTOFILL_FIELD_LABEL_PREFECTURE 30035
-#define IDS_AUTOFILL_FIELD_LABEL_PROVINCE 30036
-#define IDS_AUTOFILL_FIELD_LABEL_ZIP_CODE 30037
-#define IDS_AUTOFILL_FIELD_LABEL_POSTAL_CODE 30038
-#define IDS_AUTOFILL_FIELD_LABEL_COUNTRY 30039
-#define IDS_AUTOFILL_SHOW_PREDICTIONS_TITLE 30040
-#define IDS_AUTOFILL_DIALOG_PRIVACY_POLICY_LINK 30041
-#define IDS_AUTOFILL_OPTIONS_POPUP 30042
-#define IDS_AUTOFILL_CREDIT_CARD_NOT_SUPPORTED_BY_WALLET 30043
-#define IDS_AUTOFILL_CREDIT_CARD_NOT_SUPPORTED_BY_WALLET_FOR_MERCHANT 30044
-#define IDS_AUTOFILL_SCAN_CREDIT_CARD 30046
-#define IDS_AUTOFILL_PASSWORD_FIELD_SUGGESTIONS_TITLE 30047
-#define IDS_AUTOFILL_CC_INFOBAR_ACCEPT 30048
-#define IDS_AUTOFILL_CC_INFOBAR_DENY 30049
-#define IDS_AUTOFILL_CC_INFOBAR_TEXT 30050
-#define IDS_BOOKMARK_BAR_FOLDER_NAME 30051
-#define IDS_BOOKMARK_BAR_MOBILE_FOLDER_NAME 30053
-#define IDS_BOOKMARK_BAR_OTHER_FOLDER_NAME 30054
-#define IDS_BOOKMARK_BAR_MANAGED_FOLDER_DOMAIN_NAME 30055
-#define IDS_BOOKMARK_BAR_MANAGED_FOLDER_DEFAULT_NAME 30056
-#define IDS_BOOKMARK_BAR_SUPERVISED_FOLDER_DEFAULT_NAME 30057
-#define IDS_DATA_REDUCTION_PROXY_TITLE 30058
-#define IDS_DATA_REDUCTION_PROXY_BACK_BUTTON 30059
-#define IDS_DATA_REDUCTION_PROXY_CONTINUE_BUTTON 30060
-#define IDS_DATA_REDUCTION_PROXY_CANNOT_PROXY_HEADING 30061
-#define IDS_DATA_REDUCTION_PROXY_CANNOT_PROXY_PRIMARY_PARAGRAPH 30062
-#define IDS_DATA_REDUCTION_PROXY_CANNOT_PROXY_SECONDARY_PARAGRAPH 30063
-#define IDS_DOM_DISTILLER_WEBUI_ENTRY_URL 30064
-#define IDS_DOM_DISTILLER_WEBUI_ENTRY_ADD 30065
-#define IDS_DOM_DISTILLER_WEBUI_ENTRY_ADD_FAILED 30066
-#define IDS_DOM_DISTILLER_WEBUI_VIEW_URL 30067
-#define IDS_DOM_DISTILLER_WEBUI_VIEW_URL_FAILED 30068
-#define IDS_DOM_DISTILLER_WEBUI_REFRESH 30069
-#define IDS_DOM_DISTILLER_WEBUI_FETCHING_ENTRIES 30070
-#define IDS_DOM_DISTILLER_VIEWER_FAILED_TO_FIND_ARTICLE_TITLE 30071
-#define IDS_DOM_DISTILLER_VIEWER_FAILED_TO_FIND_ARTICLE_CONTENT 30072
-#define IDS_DOM_DISTILLER_VIEWER_NO_DATA_TITLE 30073
-#define IDS_DOM_DISTILLER_VIEWER_NO_DATA_CONTENT 30074
-#define IDS_DOM_DISTILLER_VIEWER_VIEW_ORIGINAL 30075
-#define IDS_DOM_DISTILLER_VIEWER_LOADING_STRING 30076
-#define IDS_DOM_DISTILLER_QUALITY_QUESTION 30077
-#define IDS_DOM_DISTILLER_QUALITY_ANSWER_YES 30078
-#define IDS_DOM_DISTILLER_QUALITY_ANSWER_NO 30079
-#define IDS_DOM_DISTILLER_WEBUI_TITLE 30080
-#define IDS_ERRORPAGES_SUGGESTION_VISIT_GOOGLE_CACHE 30081
-#define IDS_ERRORPAGES_SUGGESTION_CORRECTED_URL 30082
-#define IDS_ERRORPAGES_SUGGESTION_ALTERNATE_URL 30083
-#define IDS_AUTOCOMPLETE_SEARCH_DESCRIPTION 30084
-#define IDS_KEYWORD_SEARCH 30085
-#define IDS_EXTENSION_KEYWORD_COMMAND 30086
-#define IDS_EMPTY_KEYWORD_VALUE 30087
-#define IDS_LINK_FROM_CLIPBOARD 30088
-#define IDS_PASSWORD_MANAGER_EMPTY_LOGIN 30089
-#define IDS_PDF_NEED_PASSWORD 30090
-#define IDS_PDF_PAGE_LOADING 30091
-#define IDS_PDF_PAGE_LOAD_FAILED 30092
-#define IDS_PDF_PROGRESS_LOADING 30093
-#define IDS_POLICY_DM_STATUS_SUCCESS 30094
-#define IDS_POLICY_DM_STATUS_REQUEST_INVALID 30095
-#define IDS_POLICY_DM_STATUS_REQUEST_FAILED 30096
-#define IDS_POLICY_DM_STATUS_TEMPORARY_UNAVAILABLE 30097
-#define IDS_POLICY_DM_STATUS_HTTP_STATUS_ERROR 30098
-#define IDS_POLICY_DM_STATUS_RESPONSE_DECODING_ERROR 30099
-#define IDS_POLICY_DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED 30100
-#define IDS_POLICY_DM_STATUS_SERVICE_DEVICE_NOT_FOUND 30101
-#define IDS_POLICY_DM_STATUS_SERVICE_MANAGEMENT_TOKEN_INVALID 30102
-#define IDS_POLICY_DM_STATUS_SERVICE_ACTIVATION_PENDING 30103
-#define IDS_POLICY_DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER 30104
-#define IDS_POLICY_DM_STATUS_SERVICE_DEVICE_ID_CONFLICT 30105
-#define IDS_POLICY_DM_STATUS_SERVICE_MISSING_LICENSES 30106
-#define IDS_POLICY_DM_STATUS_SERVICE_DEPROVISIONED 30107
-#define IDS_POLICY_DM_STATUS_SERVICE_POLICY_NOT_FOUND 30108
-#define IDS_POLICY_DM_STATUS_UNKNOWN_ERROR 30109
-#define IDS_POLICY_DM_STATUS_SERVICE_DOMAIN_MISMATCH 30110
-#define IDS_POLICY_VALIDATION_OK 30111
-#define IDS_POLICY_VALIDATION_BAD_INITIAL_SIGNATURE 30112
-#define IDS_POLICY_VALIDATION_BAD_SIGNATURE 30113
-#define IDS_POLICY_VALIDATION_ERROR_CODE_PRESENT 30114
-#define IDS_POLICY_VALIDATION_PAYLOAD_PARSE_ERROR 30115
-#define IDS_POLICY_VALIDATION_WRONG_POLICY_TYPE 30116
-#define IDS_POLICY_VALIDATION_WRONG_SETTINGS_ENTITY_ID 30117
-#define IDS_POLICY_VALIDATION_BAD_TIMESTAMP 30118
-#define IDS_POLICY_VALIDATION_WRONG_TOKEN 30119
-#define IDS_POLICY_VALIDATION_BAD_USERNAME 30120
-#define IDS_POLICY_VALIDATION_POLICY_PARSE_ERROR 30121
-#define IDS_POLICY_VALIDATION_BAD_KEY_VERIFICATION_SIGNATURE 30122
-#define IDS_POLICY_VALIDATION_UNKNOWN_ERROR 30123
-#define IDS_POLICY_STORE_STATUS_OK 30124
-#define IDS_POLICY_STORE_STATUS_LOAD_ERROR 30125
-#define IDS_POLICY_STORE_STATUS_STORE_ERROR 30126
-#define IDS_POLICY_STORE_STATUS_PARSE_ERROR 30127
-#define IDS_POLICY_STORE_STATUS_SERIALIZE_ERROR 30128
-#define IDS_POLICY_STORE_STATUS_VALIDATION_ERROR 30129
-#define IDS_POLICY_STORE_STATUS_BAD_STATE 30130
-#define IDS_POLICY_STORE_STATUS_UNKNOWN_ERROR 30131
-#define IDS_POLICY_ASSOCIATION_STATE_ACTIVE 30132
-#define IDS_POLICY_ASSOCIATION_STATE_UNMANAGED 30133
-#define IDS_POLICY_ASSOCIATION_STATE_DEPROVISIONED 30134
-#define IDS_POLICY_TYPE_ERROR 30135
-#define IDS_POLICY_OUT_OF_RANGE_ERROR 30136
-#define IDS_POLICY_VALUE_FORMAT_ERROR 30137
-#define IDS_POLICY_DEFAULT_SEARCH_DISABLED 30138
-#define IDS_POLICY_NOT_SPECIFIED_ERROR 30139
-#define IDS_POLICY_SUBKEY_ERROR 30140
-#define IDS_POLICY_LIST_ENTRY_ERROR 30141
-#define IDS_POLICY_SCHEMA_VALIDATION_ERROR 30142
-#define IDS_POLICY_INVALID_SEARCH_URL_ERROR 30143
-#define IDS_POLICY_INVALID_PROXY_MODE_ERROR 30144
-#define IDS_POLICY_INVALID_UPDATE_URL_ERROR 30145
-#define IDS_POLICY_PROXY_MODE_DISABLED_ERROR 30146
-#define IDS_POLICY_PROXY_MODE_AUTO_DETECT_ERROR 30147
-#define IDS_POLICY_PROXY_MODE_PAC_URL_ERROR 30148
-#define IDS_POLICY_PROXY_MODE_FIXED_SERVERS_ERROR 30149
-#define IDS_POLICY_PROXY_MODE_SYSTEM_ERROR 30150
-#define IDS_POLICY_PROXY_BOTH_SPECIFIED_ERROR 30151
-#define IDS_POLICY_PROXY_NEITHER_SPECIFIED_ERROR 30152
-#define IDS_POLICY_OVERRIDDEN 30153
-#define IDS_POLICY_DEPRECATED 30154
-#define IDS_POLICY_VALUE_DEPRECATED 30155
-#define IDS_POLICY_LEVEL_ERROR 30160
-#define IDS_POLICY_OK 30161
-#define IDS_POLICY_UNSET 30162
-#define IDS_POLICY_UNKNOWN 30163
-#define IDS_POLICY_TITLE 30164
-#define IDS_POLICY_FILTER_PLACEHOLDER 30165
-#define IDS_POLICY_RELOAD_POLICIES 30166
-#define IDS_POLICY_STATUS 30167
-#define IDS_POLICY_STATUS_DEVICE 30168
-#define IDS_POLICY_STATUS_USER 30169
-#define IDS_POLICY_LABEL_DOMAIN 30170
-#define IDS_POLICY_LABEL_USERNAME 30171
-#define IDS_POLICY_LABEL_CLIENT_ID 30172
-#define IDS_POLICY_LABEL_ASSET_ID 30173
-#define IDS_POLICY_LABEL_LOCATION 30174
-#define IDS_POLICY_LABEL_DIRECTORY_API_ID 30175
-#define IDS_POLICY_LABEL_TIME_SINCE_LAST_REFRESH 30176
-#define IDS_POLICY_NOT_SPECIFIED 30177
-#define IDS_POLICY_NEVER_FETCHED 30178
-#define IDS_POLICY_LABEL_REFRESH_INTERVAL 30179
-#define IDS_POLICY_LABEL_STATUS 30180
-#define IDS_POLICY_SHOW_UNSET 30181
-#define IDS_POLICY_NO_POLICIES_SET 30182
-#define IDS_POLICY_HEADER_SCOPE 30183
-#define IDS_POLICY_HEADER_LEVEL 30184
-#define IDS_POLICY_HEADER_NAME 30185
-#define IDS_POLICY_HEADER_VALUE 30186
-#define IDS_POLICY_HEADER_STATUS 30187
-#define IDS_POLICY_SHOW_EXPANDED_VALUE 30188
-#define IDS_POLICY_HIDE_EXPANDED_VALUE 30189
-#define IDS_POLICY_SCOPE_USER 30190
-#define IDS_POLICY_SCOPE_DEVICE 30191
-#define IDS_POLICY_LEVEL_RECOMMENDED 30192
-#define IDS_POLICY_LEVEL_MANDATORY 30193
-#define IDS_POLICY_INVALID_BOOKMARK 30194
-#define IDS_TRANSLATE_INFOBAR_OPTIONS 30195
-#define IDS_TRANSLATE_INFOBAR_OPTIONS_NEVER_TRANSLATE_LANG 30196
-#define IDS_TRANSLATE_INFOBAR_OPTIONS_NEVER_TRANSLATE_SITE 30197
-#define IDS_TRANSLATE_INFOBAR_OPTIONS_ALWAYS 30198
-#define IDS_TRANSLATE_INFOBAR_OPTIONS_REPORT_ERROR 30199
-#define IDS_TRANSLATE_INFOBAR_OPTIONS_ABOUT 30200
-#define IDS_TRANSLATE_INFOBAR_BEFORE_MESSAGE 30201
-#define IDS_TRANSLATE_INFOBAR_ACCEPT 30204
-#define IDS_TRANSLATE_INFOBAR_DENY 30205
-#define IDS_TRANSLATE_INFOBAR_NEVER_TRANSLATE 30206
-#define IDS_TRANSLATE_INFOBAR_ALWAYS_TRANSLATE 30208
-#define IDS_TRANSLATE_INFOBAR_TRANSLATING_TO 30209
-#define IDS_TRANSLATE_INFOBAR_AFTER_MESSAGE 30210
-#define IDS_TRANSLATE_INFOBAR_AFTER_MESSAGE_AUTODETERMINED_SOURCE_LANGUAGE 30211
-#define IDS_TRANSLATE_INFOBAR_REVERT 30213
-#define IDS_TRANSLATE_INFOBAR_RETRY 30214
-#define IDS_TRANSLATE_INFOBAR_ERROR_CANT_CONNECT 30215
-#define IDS_TRANSLATE_INFOBAR_ERROR_CANT_TRANSLATE 30216
-#define IDS_TRANSLATE_INFOBAR_UNKNOWN_PAGE_LANGUAGE 30217
-#define IDS_TRANSLATE_INFOBAR_ERROR_SAME_LANGUAGE 30218
-#define IDS_TRANSLATE_INFOBAR_UNSUPPORTED_PAGE_LANGUAGE 30219
-#define IDS_BOOKMARK_BAR_UNDO 30221
-#define IDS_BOOKMARK_BAR_REDO 30222
-#define IDS_BOOKMARK_BAR_UNDO_ADD 30223
-#define IDS_BOOKMARK_BAR_REDO_ADD 30224
-#define IDS_BOOKMARK_BAR_UNDO_DELETE 30225
-#define IDS_BOOKMARK_BAR_REDO_DELETE 30226
-#define IDS_BOOKMARK_BAR_UNDO_EDIT 30227
-#define IDS_BOOKMARK_BAR_REDO_EDIT 30228
-#define IDS_BOOKMARK_BAR_UNDO_MOVE 30229
-#define IDS_BOOKMARK_BAR_REDO_MOVE 30230
-#define IDS_BOOKMARK_BAR_UNDO_REORDER 30231
-#define IDS_BOOKMARK_BAR_REDO_REORDER 30232
-#define IDS_LEARN_MORE 30233
-
-// ---------------------------------------------------------------------------
-// From content_strings.h:
+// From ui_strings.h:
-#define IDS_DETAILS_WITHOUT_SUMMARY_LABEL 19000
-#define IDS_SEARCHABLE_INDEX_INTRO 19001
-#define IDS_FORM_CALENDAR_CLEAR 19002
-#define IDS_FORM_CALENDAR_TODAY 19003
-#define IDS_FORM_DATE_FORMAT_DAY_IN_MONTH 19004
-#define IDS_FORM_DATE_FORMAT_MONTH 19005
-#define IDS_FORM_DATE_FORMAT_YEAR 19006
-#define IDS_FORM_SUBMIT_LABEL 19007
-#define IDS_FORM_INPUT_ALT 19008
-#define IDS_FORM_RESET_LABEL 19009
-#define IDS_FORM_FILE_BUTTON_LABEL 19010
-#define IDS_FORM_MULTIPLE_FILES_BUTTON_LABEL 19011
-#define IDS_FORM_FILE_NO_FILE_LABEL 19012
-#define IDS_FORM_FILE_MULTIPLE_UPLOAD 19013
-#define IDS_FORM_OTHER_COLOR_LABEL 19014
-#define IDS_FORM_OTHER_DATE_LABEL 19015
-#define IDS_FORM_OTHER_MONTH_LABEL 19016
-#define IDS_FORM_OTHER_TIME_LABEL 19017
-#define IDS_FORM_OTHER_WEEK_LABEL 19018
-#define IDS_FORM_PLACEHOLDER_FOR_DAY_OF_MONTH_FIELD 19019
-#define IDS_FORM_PLACEHOLDER_FOR_MONTH_FIELD 19020
-#define IDS_FORM_PLACEHOLDER_FOR_YEAR_FIELD 19021
-#define IDS_FORM_SELECT_MENU_LIST_TEXT 19022
-#define IDS_FORM_THIS_MONTH_LABEL 19023
-#define IDS_FORM_THIS_WEEK_LABEL 19024
-#define IDS_FORM_WEEK_NUMBER_LABEL 19025
-#define IDS_RECENT_SEARCHES_NONE 19026
-#define IDS_RECENT_SEARCHES 19027
-#define IDS_RECENT_SEARCHES_CLEAR 19028
-#define IDS_AX_CALENDAR_SHOW_MONTH_SELECTOR 19029
-#define IDS_AX_CALENDAR_SHOW_NEXT_MONTH 19030
-#define IDS_AX_CALENDAR_SHOW_PREVIOUS_MONTH 19031
-#define IDS_AX_CALENDAR_WEEK_DESCRIPTION 19032
-#define IDS_AX_ROLE_ARTICLE 19033
-#define IDS_AX_ROLE_BANNER 19034
-#define IDS_AX_ROLE_COMPLEMENTARY 19035
-#define IDS_AX_ROLE_DESCRIPTION_DETAIL 19036
-#define IDS_AX_ROLE_DESCRIPTION_LIST 19037
-#define IDS_AX_ROLE_DESCRIPTION_TERM 19038
-#define IDS_AX_ROLE_WEB_AREA 19039
-#define IDS_AX_ROLE_LINK 19040
-#define IDS_AX_ROLE_LIST_MARKER 19041
-#define IDS_AX_ROLE_IMAGE_MAP 19042
-#define IDS_AX_ROLE_HEADING 19043
-#define IDS_AX_ROLE_FIGURE 19044
-#define IDS_AX_ROLE_REGION 19045
-#define IDS_AX_ROLE_ADDRESS 19049
-#define IDS_AX_ROLE_MAIN_CONTENT 19050
-#define IDS_AX_ROLE_NAVIGATIONAL_LINK 19051
-#define IDS_AX_ROLE_FORM 19052
-#define IDS_AX_ROLE_MATH 19053
-#define IDS_AX_ROLE_STATUS 19054
-#define IDS_AX_ROLE_SEARCH_BOX 19055
-#define IDS_AX_ROLE_SWITCH 19056
-#define IDS_AX_BUTTON_ACTION_VERB 19057
-#define IDS_AX_RADIO_BUTTON_ACTION_VERB 19058
-#define IDS_AX_TEXT_FIELD_ACTION_VERB 19059
-#define IDS_AX_CHECKED_CHECK_BOX_ACTION_VERB 19060
-#define IDS_AX_UNCHECKED_CHECK_BOX_ACTION_VERB 19061
-#define IDS_AX_LINK_ACTION_VERB 19062
-#define IDS_AX_AM_PM_FIELD_TEXT 19063
-#define IDS_AX_DAY_OF_MONTH_FIELD_TEXT 19064
-#define IDS_AX_DATE_TIME_FIELD_EMPTY_VALUE_TEXT 19065
-#define IDS_AX_HOUR_FIELD_TEXT 19066
-#define IDS_AX_MEDIA_DEFAULT 19067
-#define IDS_AX_MEDIA_AUDIO_ELEMENT 19068
-#define IDS_AX_MEDIA_VIDEO_ELEMENT 19069
-#define IDS_AX_MEDIA_MUTE_BUTTON 19070
-#define IDS_AX_MEDIA_UNMUTE_BUTTON 19071
-#define IDS_AX_MEDIA_PLAY_BUTTON 19072
-#define IDS_AX_MEDIA_PAUSE_BUTTON 19073
-#define IDS_AX_MEDIA_SLIDER 19074
-#define IDS_AX_MEDIA_SLIDER_THUMB 19075
-#define IDS_AX_MEDIA_CURRENT_TIME_DISPLAY 19076
-#define IDS_AX_MEDIA_TIME_REMAINING_DISPLAY 19077
-#define IDS_AX_MEDIA_STATUS_DISPLAY 19078
-#define IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON 19079
-#define IDS_AX_MEDIA_EXIT_FULL_SCREEN_BUTTON 19080
-#define IDS_AX_MEDIA_SHOW_CLOSED_CAPTIONS_BUTTON 19081
-#define IDS_AX_MEDIA_HIDE_CLOSED_CAPTIONS_BUTTON 19082
-#define IDS_AX_MEDIA_CAST_OFF_BUTTON 19083
-#define IDS_AX_MEDIA_CAST_ON_BUTTON 19084
-#define IDS_AX_MEDIA_AUDIO_ELEMENT_HELP 19085
-#define IDS_AX_MEDIA_VIDEO_ELEMENT_HELP 19086
-#define IDS_AX_MEDIA_MUTE_BUTTON_HELP 19087
-#define IDS_AX_MEDIA_UNMUTE_BUTTON_HELP 19088
-#define IDS_AX_MEDIA_PLAY_BUTTON_HELP 19089
-#define IDS_AX_MEDIA_PAUSE_BUTTON_HELP 19090
-#define IDS_AX_MEDIA_AUDIO_SLIDER_HELP 19091
-#define IDS_AX_MEDIA_VIDEO_SLIDER_HELP 19092
-#define IDS_AX_MEDIA_SLIDER_THUMB_HELP 19093
-#define IDS_AX_MEDIA_CURRENT_TIME_DISPLAY_HELP 19094
-#define IDS_AX_MEDIA_TIME_REMAINING_DISPLAY_HELP 19095
-#define IDS_AX_MEDIA_STATUS_DISPLAY_HELP 19096
-#define IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON_HELP 19097
-#define IDS_AX_MEDIA_EXIT_FULL_SCREEN_BUTTON_HELP 19098
-#define IDS_AX_MEDIA_SHOW_CLOSED_CAPTIONS_BUTTON_HELP 19099
-#define IDS_AX_MEDIA_HIDE_CLOSED_CAPTIONS_BUTTON_HELP 19100
-#define IDS_AX_MEDIA_CAST_OFF_BUTTON_HELP 19101
-#define IDS_AX_MEDIA_CAST_ON_BUTTON_HELP 19102
-#define IDS_AX_MILLISECOND_FIELD_TEXT 19103
-#define IDS_AX_MINUTE_FIELD_TEXT 19104
-#define IDS_AX_MONTH_FIELD_TEXT 19105
-#define IDS_AX_SECOND_FIELD_TEXT 19106
-#define IDS_AX_WEEK_OF_YEAR_FIELD_TEXT 19107
-#define IDS_AX_YEAR_FIELD_TEXT 19108
-#define IDS_KEYGEN_HIGH_GRADE_KEY 19109
-#define IDS_KEYGEN_MED_GRADE_KEY 19110
-#define IDS_FORM_INPUT_WEEK_TEMPLATE 19111
-#define IDS_FORM_VALIDATION_VALUE_MISSING_MULTIPLE_FILE 19112
-#define IDS_FORM_VALIDATION_TYPE_MISMATCH 19113
-#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_EMPTY 19114
-#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_EMPTY_DOMAIN 19115
-#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_EMPTY_LOCAL 19116
-#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_INVALID_DOMAIN 19117
-#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_INVALID_DOTS 19118
-#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_INVALID_LOCAL 19119
-#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_NO_AT_SIGN 19120
-#define IDS_FORM_VALIDATION_TYPE_MISMATCH_MULTIPLE_EMAIL 19121
-#define IDS_FORM_VALIDATION_RANGE_UNDERFLOW 19122
-#define IDS_FORM_VALIDATION_RANGE_UNDERFLOW_DATETIME 19123
-#define IDS_FORM_VALIDATION_RANGE_OVERFLOW 19124
-#define IDS_FORM_VALIDATION_RANGE_OVERFLOW_DATETIME 19125
-#define IDS_FORM_VALIDATION_BAD_INPUT_DATETIME 19126
-#define IDS_FORM_VALIDATION_BAD_INPUT_NUMBER 19127
-#define IDS_FORM_VALIDATION_VALUE_MISSING 19128
-#define IDS_FORM_VALIDATION_VALUE_MISSING_CHECKBOX 19129
-#define IDS_FORM_VALIDATION_VALUE_MISSING_FILE 19130
-#define IDS_FORM_VALIDATION_VALUE_MISSING_RADIO 19131
-#define IDS_FORM_VALIDATION_VALUE_MISSING_SELECT 19132
-#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL 19133
-#define IDS_FORM_VALIDATION_TYPE_MISMATCH_URL 19134
-#define IDS_FORM_VALIDATION_PATTERN_MISMATCH 19135
-#define IDS_FORM_VALIDATION_STEP_MISMATCH 19136
-#define IDS_FORM_VALIDATION_STEP_MISMATCH_CLOSE_TO_LIMIT 19137
-#define IDS_FORM_VALIDATION_TOO_LONG 19138
-#define IDS_FORM_VALIDATION_TOO_SHORT 19139
-#define IDS_PLUGIN_INITIALIZATION_ERROR 19140
+#define IDS_TIME_SECS_DEFAULT 11000
+#define IDS_TIME_SEC_SINGULAR 11001
+#define IDS_TIME_SECS_ZERO 11002
+#define IDS_TIME_SECS_TWO 11003
+#define IDS_TIME_SECS_FEW 11004
+#define IDS_TIME_SECS_MANY 11005
+#define IDS_TIME_MINS_DEFAULT 11006
+#define IDS_TIME_MIN_SINGULAR 11007
+#define IDS_TIME_MINS_ZERO 11008
+#define IDS_TIME_MINS_TWO 11009
+#define IDS_TIME_MINS_FEW 11010
+#define IDS_TIME_MINS_MANY 11011
+#define IDS_TIME_HOURS_DEFAULT 11012
+#define IDS_TIME_HOUR_SINGULAR 11013
+#define IDS_TIME_HOURS_ZERO 11014
+#define IDS_TIME_HOURS_TWO 11015
+#define IDS_TIME_HOURS_FEW 11016
+#define IDS_TIME_HOURS_MANY 11017
+#define IDS_TIME_DAYS_DEFAULT 11018
+#define IDS_TIME_DAY_SINGULAR 11019
+#define IDS_TIME_DAYS_ZERO 11020
+#define IDS_TIME_DAYS_TWO 11021
+#define IDS_TIME_DAYS_FEW 11022
+#define IDS_TIME_DAYS_MANY 11023
+#define IDS_TIME_REMAINING_SECS_DEFAULT 11024
+#define IDS_TIME_REMAINING_SEC_SINGULAR 11025
+#define IDS_TIME_REMAINING_SECS_ZERO 11026
+#define IDS_TIME_REMAINING_SECS_TWO 11027
+#define IDS_TIME_REMAINING_SECS_FEW 11028
+#define IDS_TIME_REMAINING_SECS_MANY 11029
+#define IDS_TIME_REMAINING_MINS_DEFAULT 11030
+#define IDS_TIME_REMAINING_MIN_SINGULAR 11031
+#define IDS_TIME_REMAINING_MINS_ZERO 11032
+#define IDS_TIME_REMAINING_MINS_TWO 11033
+#define IDS_TIME_REMAINING_MINS_FEW 11034
+#define IDS_TIME_REMAINING_MINS_MANY 11035
+#define IDS_TIME_REMAINING_LONG_MINS_DEFAULT 11036
+#define IDS_TIME_REMAINING_LONG_MIN_SINGULAR 11037
+#define IDS_TIME_REMAINING_LONG_MINS_ZERO 11038
+#define IDS_TIME_REMAINING_LONG_MINS_TWO 11039
+#define IDS_TIME_REMAINING_LONG_MINS_FEW 11040
+#define IDS_TIME_REMAINING_LONG_MINS_MANY 11041
+#define IDS_TIME_REMAINING_HOURS_DEFAULT 11042
+#define IDS_TIME_REMAINING_HOUR_SINGULAR 11043
+#define IDS_TIME_REMAINING_HOURS_ZERO 11044
+#define IDS_TIME_REMAINING_HOURS_TWO 11045
+#define IDS_TIME_REMAINING_HOURS_FEW 11046
+#define IDS_TIME_REMAINING_HOURS_MANY 11047
+#define IDS_TIME_REMAINING_DAYS_DEFAULT 11048
+#define IDS_TIME_REMAINING_DAY_SINGULAR 11049
+#define IDS_TIME_REMAINING_DAYS_ZERO 11050
+#define IDS_TIME_REMAINING_DAYS_TWO 11051
+#define IDS_TIME_REMAINING_DAYS_FEW 11052
+#define IDS_TIME_REMAINING_DAYS_MANY 11053
+#define IDS_TIME_DURATION_LONG_SECS_DEFAULT 11054
+#define IDS_TIME_DURATION_LONG_SEC_SINGULAR 11055
+#define IDS_TIME_DURATION_LONG_SECS_ZERO 11056
+#define IDS_TIME_DURATION_LONG_SECS_TWO 11057
+#define IDS_TIME_DURATION_LONG_SECS_FEW 11058
+#define IDS_TIME_DURATION_LONG_SECS_MANY 11059
+#define IDS_TIME_DURATION_LONG_MINS_DEFAULT 11060
+#define IDS_TIME_DURATION_LONG_MIN_SINGULAR 11061
+#define IDS_TIME_DURATION_LONG_MINS_ZERO 11062
+#define IDS_TIME_DURATION_LONG_MINS_TWO 11063
+#define IDS_TIME_DURATION_LONG_MINS_FEW 11064
+#define IDS_TIME_DURATION_LONG_MINS_MANY 11065
+#define IDS_TIME_ELAPSED_SECS_DEFAULT 11066
+#define IDS_TIME_ELAPSED_SEC_SINGULAR 11067
+#define IDS_TIME_ELAPSED_SECS_ZERO 11068
+#define IDS_TIME_ELAPSED_SECS_TWO 11069
+#define IDS_TIME_ELAPSED_SECS_FEW 11070
+#define IDS_TIME_ELAPSED_SECS_MANY 11071
+#define IDS_TIME_ELAPSED_MINS_DEFAULT 11072
+#define IDS_TIME_ELAPSED_MIN_SINGULAR 11073
+#define IDS_TIME_ELAPSED_MINS_ZERO 11074
+#define IDS_TIME_ELAPSED_MINS_TWO 11075
+#define IDS_TIME_ELAPSED_MINS_FEW 11076
+#define IDS_TIME_ELAPSED_MINS_MANY 11077
+#define IDS_TIME_ELAPSED_HOURS_DEFAULT 11078
+#define IDS_TIME_ELAPSED_HOUR_SINGULAR 11079
+#define IDS_TIME_ELAPSED_HOURS_ZERO 11080
+#define IDS_TIME_ELAPSED_HOURS_TWO 11081
+#define IDS_TIME_ELAPSED_HOURS_FEW 11082
+#define IDS_TIME_ELAPSED_HOURS_MANY 11083
+#define IDS_TIME_ELAPSED_DAYS_DEFAULT 11084
+#define IDS_TIME_ELAPSED_DAY_SINGULAR 11085
+#define IDS_TIME_ELAPSED_DAYS_ZERO 11086
+#define IDS_TIME_ELAPSED_DAYS_TWO 11087
+#define IDS_TIME_ELAPSED_DAYS_FEW 11088
+#define IDS_TIME_ELAPSED_DAYS_MANY 11089
+#define IDS_PAST_TIME_TODAY 11090
+#define IDS_PAST_TIME_YESTERDAY 11091
+#define IDS_APP_MENU_EMPTY_SUBMENU 11092
+#define IDS_APP_UNTITLED_SHORTCUT_FILE_NAME 11093
+#define IDS_APP_SAVEAS_ALL_FILES 11094
+#define IDS_APP_SAVEAS_EXTENSION_FORMAT 11095
+#define IDS_SELECT_UPLOAD_FOLDER_DIALOG_TITLE 11096
+#define IDS_SELECT_FOLDER_DIALOG_TITLE 11099
+#define IDS_SAVE_AS_DIALOG_TITLE 11100
+#define IDS_OPEN_FILE_DIALOG_TITLE 11101
+#define IDS_OPEN_FILES_DIALOG_TITLE 11102
+#define IDS_SAVEAS_ALL_FILES 11103
+#define IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON 11104
+#define IDS_APP_ACCACTION_PRESS 11105
+#define IDS_APP_ACCNAME_CLOSE 11106
+#define IDS_APP_ACCNAME_MINIMIZE 11107
+#define IDS_APP_ACCNAME_MAXIMIZE 11108
+#define IDS_APP_ACCNAME_RESTORE 11109
+#define IDS_APP_SCROLLBAR_CXMENU_SCROLLHERE 11110
+#define IDS_APP_SCROLLBAR_CXMENU_SCROLLLEFTEDGE 11111
+#define IDS_APP_SCROLLBAR_CXMENU_SCROLLRIGHTEDGE 11112
+#define IDS_APP_SCROLLBAR_CXMENU_SCROLLHOME 11113
+#define IDS_APP_SCROLLBAR_CXMENU_SCROLLEND 11114
+#define IDS_APP_SCROLLBAR_CXMENU_SCROLLPAGEUP 11115
+#define IDS_APP_SCROLLBAR_CXMENU_SCROLLPAGEDOWN 11116
+#define IDS_APP_SCROLLBAR_CXMENU_SCROLLLEFT 11117
+#define IDS_APP_SCROLLBAR_CXMENU_SCROLLRIGHT 11118
+#define IDS_APP_SCROLLBAR_CXMENU_SCROLLUP 11119
+#define IDS_APP_SCROLLBAR_CXMENU_SCROLLDOWN 11120
+#define IDS_APP_UNDO 11121
+#define IDS_APP_CUT 11122
+#define IDS_APP_COPY 11123
+#define IDS_APP_PASTE 11124
+#define IDS_APP_DELETE 11125
+#define IDS_APP_SELECT_ALL 11126
+#define IDS_APP_OK 11127
+#define IDS_APP_CANCEL 11128
+#define IDS_APP_CLOSE 11129
+#define IDS_APP_ESC_KEY 11130
+#define IDS_APP_TAB_KEY 11131
+#define IDS_APP_INSERT_KEY 11132
+#define IDS_APP_HOME_KEY 11133
+#define IDS_APP_DELETE_KEY 11134
+#define IDS_APP_END_KEY 11135
+#define IDS_APP_PAGEUP_KEY 11136
+#define IDS_APP_PAGEDOWN_KEY 11137
+#define IDS_APP_LEFT_ARROW_KEY 11138
+#define IDS_APP_RIGHT_ARROW_KEY 11139
+#define IDS_APP_UP_ARROW_KEY 11140
+#define IDS_APP_DOWN_ARROW_KEY 11141
+#define IDS_APP_ENTER_KEY 11142
+#define IDS_APP_F1_KEY 11143
+#define IDS_APP_F11_KEY 11144
+#define IDS_APP_BACKSPACE_KEY 11145
+#define IDS_APP_COMMA_KEY 11146
+#define IDS_APP_PERIOD_KEY 11147
+#define IDS_APP_MEDIA_NEXT_TRACK_KEY 11148
+#define IDS_APP_MEDIA_PLAY_PAUSE_KEY 11149
+#define IDS_APP_MEDIA_PREV_TRACK_KEY 11150
+#define IDS_APP_MEDIA_STOP_KEY 11151
+#define IDS_APP_CONTROL_MODIFIER 11152
+#define IDS_APP_ALT_MODIFIER 11153
+#define IDS_APP_SHIFT_MODIFIER 11154
+#define IDS_APP_COMMAND_MODIFIER 11155
+#define IDS_APP_BYTES 11156
+#define IDS_APP_KIBIBYTES 11157
+#define IDS_APP_MEBIBYTES 11158
+#define IDS_APP_GIBIBYTES 11159
+#define IDS_APP_TEBIBYTES 11160
+#define IDS_APP_PEBIBYTES 11161
+#define IDS_APP_BYTES_PER_SECOND 11162
+#define IDS_APP_KIBIBYTES_PER_SECOND 11163
+#define IDS_APP_MEBIBYTES_PER_SECOND 11164
+#define IDS_APP_GIBIBYTES_PER_SECOND 11165
+#define IDS_APP_TEBIBYTES_PER_SECOND 11166
+#define IDS_APP_PEBIBYTES_PER_SECOND 11167
+#define IDS_MESSAGE_CENTER_ACCESSIBLE_NAME 11168
+#define IDS_MESSAGE_CENTER_NOTIFIER_DISABLE 11169
+#define IDS_MESSAGE_CENTER_FOOTER_TITLE 11170
+#define IDS_MESSAGE_CENTER_SETTINGS_BUTTON_LABEL 11171
+#define IDS_MESSAGE_CENTER_SETTINGS_GO_BACK_BUTTON_TOOLTIP 11172
+#define IDS_MESSAGE_CENTER_SETTINGS_DIALOG_DESCRIPTION 11173
+#define IDS_MESSAGE_CENTER_SETTINGS_DESCRIPTION_MULTIUSER 11174
+#define IDS_MESSAGE_CENTER_SETTINGS 11175
+#define IDS_MESSAGE_CENTER_CLEAR_ALL 11176
+#define IDS_MESSAGE_CENTER_QUIET_MODE_BUTTON_TOOLTIP 11177
+#define IDS_MESSAGE_CENTER_NO_MESSAGES 11178
+#define IDS_MESSAGE_CENTER_QUIET_MODE 11179
+#define IDS_MESSAGE_CENTER_QUIET_MODE_1HOUR 11180
+#define IDS_MESSAGE_CENTER_QUIET_MODE_1DAY 11181
+#define IDS_MESSAGE_CENTER_CLOSE_NOTIFICATION_BUTTON_ACCESSIBLE_NAME 11182
+#define IDS_MESSAGE_CENTER_EXPAND_NOTIFICATION_BUTTON_ACCESSIBLE_NAME 11183
+#define IDS_MESSAGE_CENTER_NOTIFIER_SCREENSHOT_NAME 11184
+#define IDS_MESSAGE_CENTER_NOTIFICATION_BUTTON_COPY_SCREENSHOT_TO_CLIPBOARD 11185
+#define IDS_MESSAGE_CENTER_MORE_FROM 11186
+#define IDS_APP_LIST_HELP 11187
+#define IDS_APP_LIST_OPEN_SETTINGS 11188
+#define IDS_APP_LIST_OPEN_FEEDBACK 11189
+#define IDS_APP_LIST_FOLDER_NAME_PLACEHOLDER 11190
+#define IDS_APP_LIST_SPEECH_HINT_TEXT 11191
// ---------------------------------------------------------------------------
-// From ui_strings.h:
+// From webkit_strings.h:
-#define IDS_TIME_SECS 11000
-#define IDS_TIME_LONG_SECS 11001
-#define IDS_TIME_LONG_SECS_2ND 11002
-#define IDS_TIME_MINS 11003
-#define IDS_TIME_LONG_MINS 11004
-#define IDS_TIME_LONG_MINS_1ST 11005
-#define IDS_TIME_LONG_MINS_2ND 11006
-#define IDS_TIME_HOURS 11007
-#define IDS_TIME_HOURS_1ST 11008
-#define IDS_TIME_HOURS_2ND 11009
-#define IDS_TIME_DAYS 11010
-#define IDS_TIME_DAYS_1ST 11011
-#define IDS_TIME_REMAINING_SECS 11012
-#define IDS_TIME_REMAINING_LONG_SECS 11013
-#define IDS_TIME_REMAINING_MINS 11014
-#define IDS_TIME_REMAINING_LONG_MINS 11015
-#define IDS_TIME_REMAINING_HOURS 11016
-#define IDS_TIME_REMAINING_DAYS 11017
-#define IDS_TIME_ELAPSED_SECS 11018
-#define IDS_TIME_ELAPSED_MINS 11019
-#define IDS_TIME_ELAPSED_HOURS 11020
-#define IDS_TIME_ELAPSED_DAYS 11021
-#define IDS_PAST_TIME_TODAY 11022
-#define IDS_PAST_TIME_YESTERDAY 11023
-#define IDS_APP_MENU_EMPTY_SUBMENU 11024
-#define IDS_APP_UNTITLED_SHORTCUT_FILE_NAME 11025
-#define IDS_APP_SAVEAS_ALL_FILES 11026
-#define IDS_APP_SAVEAS_EXTENSION_FORMAT 11027
-#define IDS_SELECT_UPLOAD_FOLDER_DIALOG_TITLE 11028
-#define IDS_SELECT_FOLDER_DIALOG_TITLE 11031
-#define IDS_SAVE_AS_DIALOG_TITLE 11032
-#define IDS_OPEN_FILE_DIALOG_TITLE 11033
-#define IDS_OPEN_FILES_DIALOG_TITLE 11034
-#define IDS_SAVEAS_ALL_FILES 11035
-#define IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON 11036
-#define IDS_APP_ACCACTION_PRESS 11037
-#define IDS_APP_ACCNAME_CLOSE 11038
-#define IDS_APP_ACCNAME_MINIMIZE 11039
-#define IDS_APP_ACCNAME_MAXIMIZE 11040
-#define IDS_APP_ACCNAME_RESTORE 11041
-#define IDS_APP_SCROLLBAR_CXMENU_SCROLLHERE 11042
-#define IDS_APP_SCROLLBAR_CXMENU_SCROLLLEFTEDGE 11043
-#define IDS_APP_SCROLLBAR_CXMENU_SCROLLRIGHTEDGE 11044
-#define IDS_APP_SCROLLBAR_CXMENU_SCROLLHOME 11045
-#define IDS_APP_SCROLLBAR_CXMENU_SCROLLEND 11046
-#define IDS_APP_SCROLLBAR_CXMENU_SCROLLPAGEUP 11047
-#define IDS_APP_SCROLLBAR_CXMENU_SCROLLPAGEDOWN 11048
-#define IDS_APP_SCROLLBAR_CXMENU_SCROLLLEFT 11049
-#define IDS_APP_SCROLLBAR_CXMENU_SCROLLRIGHT 11050
-#define IDS_APP_SCROLLBAR_CXMENU_SCROLLUP 11051
-#define IDS_APP_SCROLLBAR_CXMENU_SCROLLDOWN 11052
-#define IDS_APP_UNDO 11053
-#define IDS_APP_CUT 11054
-#define IDS_APP_COPY 11055
-#define IDS_APP_PASTE 11056
-#define IDS_APP_DELETE 11057
-#define IDS_APP_SELECT_ALL 11058
-#define IDS_DELETE_BACKWARD 11059
-#define IDS_DELETE_FORWARD 11060
-#define IDS_DELETE_TO_BEGINNING_OF_LINE 11061
-#define IDS_DELETE_TO_END_OF_LINE 11062
-#define IDS_DELETE_WORD_BACKWARD 11063
-#define IDS_DELETE_WORD_FORWARD 11064
-#define IDS_MOVE_DOWN 11065
-#define IDS_MOVE_LEFT 11066
-#define IDS_MOVE_LEFT_AND_MODIFY_SELECTION 11067
-#define IDS_MOVE_RIGHT 11068
-#define IDS_MOVE_RIGHT_AND_MODIFY_SELECTION 11069
-#define IDS_MOVE_WORD_LEFT 11070
-#define IDS_MOVE_WORD_LEFT_AND_MODIFY_SELECTION 11071
-#define IDS_MOVE_WORD_RIGHT 11072
-#define IDS_MOVE_WORD_RIGHT_AND_MODIFY_SELECTION 11073
-#define IDS_MOVE_TO_BEGINNING_OF_LINE 11074
-#define IDS_MOVE_TO_BEGINNING_OF_LINE_AND_MODIFY_SELECTION 11075
-#define IDS_MOVE_TO_END_OF_LINE 11076
-#define IDS_MOVE_TO_END_OF_LINE_AND_MODIFY_SELECTION 11077
-#define IDS_MOVE_UP 11078
-#define IDS_APP_REDO 11079
-#define IDS_APP_OK 11080
-#define IDS_APP_CANCEL 11081
-#define IDS_APP_CLOSE 11082
-#define IDS_APP_ESC_KEY 11083
-#define IDS_APP_TAB_KEY 11084
-#define IDS_APP_INSERT_KEY 11085
-#define IDS_APP_HOME_KEY 11086
-#define IDS_APP_DELETE_KEY 11087
-#define IDS_APP_END_KEY 11088
-#define IDS_APP_PAGEUP_KEY 11089
-#define IDS_APP_PAGEDOWN_KEY 11090
-#define IDS_APP_LEFT_ARROW_KEY 11091
-#define IDS_APP_RIGHT_ARROW_KEY 11092
-#define IDS_APP_UP_ARROW_KEY 11093
-#define IDS_APP_DOWN_ARROW_KEY 11094
-#define IDS_APP_ENTER_KEY 11095
-#define IDS_APP_SPACE_KEY 11096
-#define IDS_APP_F1_KEY 11097
-#define IDS_APP_F11_KEY 11098
-#define IDS_APP_BACKSPACE_KEY 11099
-#define IDS_APP_COMMA_KEY 11100
-#define IDS_APP_PERIOD_KEY 11101
-#define IDS_APP_MEDIA_NEXT_TRACK_KEY 11102
-#define IDS_APP_MEDIA_PLAY_PAUSE_KEY 11103
-#define IDS_APP_MEDIA_PREV_TRACK_KEY 11104
-#define IDS_APP_MEDIA_STOP_KEY 11105
-#define IDS_APP_CONTROL_MODIFIER 11106
-#define IDS_APP_ALT_MODIFIER 11107
-#define IDS_APP_SHIFT_MODIFIER 11108
-#define IDS_APP_COMMAND_MODIFIER 11109
-#define IDS_APP_SEARCH_MODIFIER 11110
-#define IDS_APP_BYTES 11111
-#define IDS_APP_KIBIBYTES 11112
-#define IDS_APP_MEBIBYTES 11113
-#define IDS_APP_GIBIBYTES 11114
-#define IDS_APP_TEBIBYTES 11115
-#define IDS_APP_PEBIBYTES 11116
-#define IDS_APP_BYTES_PER_SECOND 11117
-#define IDS_APP_KIBIBYTES_PER_SECOND 11118
-#define IDS_APP_MEBIBYTES_PER_SECOND 11119
-#define IDS_APP_GIBIBYTES_PER_SECOND 11120
-#define IDS_APP_TEBIBYTES_PER_SECOND 11121
-#define IDS_APP_PEBIBYTES_PER_SECOND 11122
-#define IDS_MESSAGE_CENTER_ACCESSIBLE_NAME 11123
-#define IDS_MESSAGE_CENTER_NOTIFIER_DISABLE 11124
-#define IDS_MESSAGE_CENTER_FOOTER_TITLE 11125
-#define IDS_MESSAGE_CENTER_SETTINGS_BUTTON_LABEL 11126
-#define IDS_MESSAGE_CENTER_SETTINGS_DIALOG_DESCRIPTION 11128
-#define IDS_MESSAGE_CENTER_SETTINGS_DESCRIPTION_MULTIUSER 11129
-#define IDS_MESSAGE_CENTER_SETTINGS 11130
-#define IDS_MESSAGE_CENTER_CLEAR_ALL 11131
-#define IDS_MESSAGE_CENTER_QUIET_MODE_BUTTON_TOOLTIP 11132
-#define IDS_MESSAGE_CENTER_NO_MESSAGES 11133
-#define IDS_MESSAGE_CENTER_QUIET_MODE 11134
-#define IDS_MESSAGE_CENTER_QUIET_MODE_1HOUR 11135
-#define IDS_MESSAGE_CENTER_QUIET_MODE_1DAY 11136
-#define IDS_MESSAGE_CENTER_CLOSE_NOTIFICATION_BUTTON_ACCESSIBLE_NAME 11137
-#define IDS_APP_LIST_HELP 11140
-#define IDS_APP_LIST_OPEN_SETTINGS 11141
-#define IDS_APP_LIST_OPEN_FEEDBACK 11142
-#define IDS_APP_LIST_BACK 11143
-#define IDS_APP_LIST_ALL_APPS 11144
-#define IDS_APP_LIST_FOLDER_NAME_PLACEHOLDER 11145
-#define IDS_APP_LIST_FOLDER_BUTTON_ACCESSIBILE_NAME 11146
-#define IDS_APP_LIST_FOLDER_OPEN_FOLDER_ACCESSIBILE_NAME 11147
-#define IDS_APP_LIST_FOLDER_CLOSE_FOLDER_ACCESSIBILE_NAME 11148
-#define IDS_APP_LIST_SPEECH_HINT_TEXT 11149
-#define IDS_APP_LIST_SPEECH_NETWORK_ERROR_HINT_TEXT 11150
+#define IDS_DETAILS_WITHOUT_SUMMARY_LABEL 18500
+#define IDS_SEARCHABLE_INDEX_INTRO 18501
+#define IDS_FORM_CALENDAR_CLEAR 18502
+#define IDS_FORM_CALENDAR_TODAY 18503
+#define IDS_FORM_DATE_FORMAT_DAY_IN_MONTH 18504
+#define IDS_FORM_DATE_FORMAT_MONTH 18505
+#define IDS_FORM_DATE_FORMAT_YEAR 18506
+#define IDS_FORM_SUBMIT_LABEL 18507
+#define IDS_FORM_INPUT_ALT 18508
+#define IDS_FORM_RESET_LABEL 18509
+#define IDS_FORM_FILE_BUTTON_LABEL 18510
+#define IDS_FORM_MULTIPLE_FILES_BUTTON_LABEL 18511
+#define IDS_FORM_FILE_NO_FILE_LABEL 18512
+#define IDS_FORM_FILE_NO_FILE_DRAG_LABEL 18513
+#define IDS_FORM_FILE_MULTIPLE_UPLOAD 18514
+#define IDS_FORM_OTHER_COLOR_LABEL 18515
+#define IDS_FORM_OTHER_DATE_LABEL 18516
+#define IDS_FORM_OTHER_MONTH_LABEL 18517
+#define IDS_FORM_OTHER_TIME_LABEL 18518
+#define IDS_FORM_OTHER_WEEK_LABEL 18519
+#define IDS_FORM_PLACEHOLDER_FOR_DAY_OF_MONTH_FIELD 18520
+#define IDS_FORM_PLACEHOLDER_FOR_MONTH_FIELD 18521
+#define IDS_FORM_PLACEHOLDER_FOR_YEAR_FIELD 18522
+#define IDS_FORM_THIS_MONTH_LABEL 18523
+#define IDS_FORM_THIS_WEEK_LABEL 18524
+#define IDS_FORM_WEEK_NUMBER_LABEL 18525
+#define IDS_RECENT_SEARCHES_NONE 18526
+#define IDS_RECENT_SEARCHES 18527
+#define IDS_RECENT_SEARCHES_CLEAR 18528
+#define IDS_IMAGE_TITLE_FOR_FILENAME 18529
+#define IDS_AX_ROLE_WEB_AREA 18530
+#define IDS_AX_ROLE_LINK 18531
+#define IDS_AX_ROLE_LIST_MARKER 18532
+#define IDS_AX_ROLE_IMAGE_MAP 18533
+#define IDS_AX_ROLE_HEADING 18534
+#define IDS_AX_ROLE_FOOTER 18535
+#define IDS_AX_ROLE_STEPPER 18536
+#define IDS_AX_BUTTON_ACTION_VERB 18537
+#define IDS_AX_RADIO_BUTTON_ACTION_VERB 18538
+#define IDS_AX_TEXT_FIELD_ACTION_VERB 18539
+#define IDS_AX_CHECKED_CHECK_BOX_ACTION_VERB 18540
+#define IDS_AX_UNCHECKED_CHECK_BOX_ACTION_VERB 18541
+#define IDS_AX_LINK_ACTION_VERB 18542
+#define IDS_AX_AM_PM_FIELD_TEXT 18543
+#define IDS_AX_DAY_OF_MONTH_FIELD_TEXT 18544
+#define IDS_AX_DATE_TIME_FIELD_EMPTY_VALUE_TEXT 18545
+#define IDS_AX_HOUR_FIELD_TEXT 18546
+#define IDS_AX_MEDIA_DEFAULT 18547
+#define IDS_AX_MEDIA_AUDIO_ELEMENT 18548
+#define IDS_AX_MEDIA_VIDEO_ELEMENT 18549
+#define IDS_AX_MEDIA_MUTE_BUTTON 18550
+#define IDS_AX_MEDIA_UNMUTE_BUTTON 18551
+#define IDS_AX_MEDIA_PLAY_BUTTON 18552
+#define IDS_AX_MEDIA_PAUSE_BUTTON 18553
+#define IDS_AX_MEDIA_SLIDER 18554
+#define IDS_AX_MEDIA_SLIDER_THUMB 18555
+#define IDS_AX_MEDIA_REWIND_BUTTON 18556
+#define IDS_AX_MEDIA_RETURN_TO_REALTIME_BUTTON 18557
+#define IDS_AX_MEDIA_CURRENT_TIME_DISPLAY 18558
+#define IDS_AX_MEDIA_TIME_REMAINING_DISPLAY 18559
+#define IDS_AX_MEDIA_STATUS_DISPLAY 18560
+#define IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON 18561
+#define IDS_AX_MEDIA_EXIT_FULL_SCREEN_BUTTON 18562
+#define IDS_AX_MEDIA_SEEK_FORWARD_BUTTON 18563
+#define IDS_AX_MEDIA_SEEK_BACK_BUTTON 18564
+#define IDS_AX_MEDIA_SHOW_CLOSED_CAPTIONS_BUTTON 18565
+#define IDS_AX_MEDIA_HIDE_CLOSED_CAPTIONS_BUTTON 18566
+#define IDS_AX_MEDIA_AUDIO_ELEMENT_HELP 18567
+#define IDS_AX_MEDIA_VIDEO_ELEMENT_HELP 18568
+#define IDS_AX_MEDIA_MUTE_BUTTON_HELP 18569
+#define IDS_AX_MEDIA_UNMUTE_BUTTON_HELP 18570
+#define IDS_AX_MEDIA_PLAY_BUTTON_HELP 18571
+#define IDS_AX_MEDIA_PAUSE_BUTTON_HELP 18572
+#define IDS_AX_MEDIA_SLIDER_HELP 18573
+#define IDS_AX_MEDIA_SLIDER_THUMB_HELP 18574
+#define IDS_AX_MEDIA_REWIND_BUTTON_HELP 18575
+#define IDS_AX_MEDIA_RETURN_TO_REALTIME_BUTTON_HELP 18576
+#define IDS_AX_MEDIA_CURRENT_TIME_DISPLAY_HELP 18577
+#define IDS_AX_MEDIA_TIME_REMAINING_DISPLAY_HELP 18578
+#define IDS_AX_MEDIA_STATUS_DISPLAY_HELP 18579
+#define IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON_HELP 18580
+#define IDS_AX_MEDIA_EXIT_FULL_SCREEN_BUTTON_HELP 18581
+#define IDS_AX_MEDIA_SEEK_FORWARD_BUTTON_HELP 18582
+#define IDS_AX_MEDIA_SEEK_BACK_BUTTON_HELP 18583
+#define IDS_AX_MEDIA_SHOW_CLOSED_CAPTIONS_BUTTON_HELP 18584
+#define IDS_AX_MEDIA_HIDE_CLOSED_CAPTIONS_BUTTON_HELP 18585
+#define IDS_AX_MILLISECOND_FIELD_TEXT 18586
+#define IDS_AX_MINUTE_FIELD_TEXT 18587
+#define IDS_AX_MONTH_FIELD_TEXT 18588
+#define IDS_AX_SECOND_FIELD_TEXT 18589
+#define IDS_AX_WEEK_OF_YEAR_FIELD_TEXT 18590
+#define IDS_AX_YEAR_FIELD_TEXT 18591
+#define IDS_KEYGEN_HIGH_GRADE_KEY 18592
+#define IDS_KEYGEN_MED_GRADE_KEY 18593
+#define IDS_FORM_INPUT_WEEK_TEMPLATE 18594
+#define IDS_FORM_VALIDATION_VALUE_MISSING_MULTIPLE_FILE 18595
+#define IDS_FORM_VALIDATION_TYPE_MISMATCH 18596
+#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_EMPTY 18597
+#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_EMPTY_DOMAIN 18598
+#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_EMPTY_LOCAL 18599
+#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_INVALID_DOMAIN 18600
+#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_INVALID_DOTS 18601
+#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_INVALID_LOCAL 18602
+#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_NO_AT_SIGN 18603
+#define IDS_FORM_VALIDATION_TYPE_MISMATCH_MULTIPLE_EMAIL 18604
+#define IDS_FORM_VALIDATION_RANGE_UNDERFLOW 18605
+#define IDS_FORM_VALIDATION_RANGE_UNDERFLOW_DATETIME 18606
+#define IDS_FORM_VALIDATION_RANGE_OVERFLOW 18607
+#define IDS_FORM_VALIDATION_RANGE_OVERFLOW_DATETIME 18608
+#define IDS_FORM_VALIDATION_BAD_INPUT_DATETIME 18609
+#define IDS_FORM_VALIDATION_BAD_INPUT_NUMBER 18610
+#define IDS_FORM_VALIDATION_VALUE_MISSING 18611
+#define IDS_FORM_VALIDATION_VALUE_MISSING_CHECKBOX 18612
+#define IDS_FORM_VALIDATION_VALUE_MISSING_FILE 18613
+#define IDS_FORM_VALIDATION_VALUE_MISSING_RADIO 18614
+#define IDS_FORM_VALIDATION_VALUE_MISSING_SELECT 18615
+#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL 18616
+#define IDS_FORM_VALIDATION_TYPE_MISMATCH_URL 18617
+#define IDS_FORM_VALIDATION_PATTERN_MISMATCH 18618
+#define IDS_FORM_VALIDATION_STEP_MISMATCH 18619
+#define IDS_FORM_VALIDATION_STEP_MISMATCH_CLOSE_TO_LIMIT 18620
+#define IDS_FORM_VALIDATION_TOO_LONG 18621
+#define IDS_PDF_NEED_PASSWORD 18622
+#define IDS_PDF_PAGE_LOADING 18623
+#define IDS_PDF_LOADING_PROGRESS 18624
+#define IDS_PDF_PAGE_LOAD_FAILED 18625
+#define IDS_PDF_PROGRESS_LOADING 18626
+#define IDS_PLUGIN_INITIALIZATION_ERROR 18627
#endif // CEF_INCLUDE_CEF_PACK_STRINGS_H_
+++ /dev/null
-// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// ---------------------------------------------------------------------------
-//
-// The contents of this file must follow a specific format in order to
-// support the CEF translator tool. See the translator.README.txt file in the
-// tools directory for more information.
-//
-
-#ifndef CEF_INCLUDE_CEF_PARSER_H_
-#define CEF_INCLUDE_CEF_PARSER_H_
-#pragma once
-
-#include <vector>
-
-#include "include/cef_base.h"
-#include "include/cef_values.h"
-
-///
-// Parse the specified |url| into its component parts.
-// Returns false if the URL is empty or invalid.
-///
-/*--cef()--*/
-bool CefParseURL(const CefString& url,
- CefURLParts& parts);
-
-///
-// Creates a URL from the specified |parts|, which must contain a non-empty
-// spec or a non-empty host and path (at a minimum), but not both.
-// Returns false if |parts| isn't initialized as described.
-///
-/*--cef()--*/
-bool CefCreateURL(const CefURLParts& parts,
- CefString& url);
-
-///
-// Returns the mime type for the specified file extension or an empty string if
-// unknown.
-///
-/*--cef()--*/
-CefString CefGetMimeType(const CefString& extension);
-
-// Get the extensions associated with the given mime type. This should be passed
-// in lower case. There could be multiple extensions for a given mime type, like
-// "html,htm" for "text/html", or "txt,text,html,..." for "text/*". Any existing
-// elements in the provided vector will not be erased.
-/*--cef()--*/
-void CefGetExtensionsForMimeType(const CefString& mime_type,
- std::vector<CefString>& extensions);
-
-///
-// Encodes |data| as a base64 string.
-///
-/*--cef()--*/
-CefString CefBase64Encode(const void* data, size_t data_size);
-
-///
-// Decodes the base64 encoded string |data|. The returned value will be NULL if
-// the decoding fails.
-///
-/*--cef()--*/
-CefRefPtr<CefBinaryValue> CefBase64Decode(const CefString& data);
-
-///
-// Escapes characters in |text| which are unsuitable for use as a query
-// parameter value. Everything except alphanumerics and -_.!~*'() will be
-// converted to "%XX". If |use_plus| is true spaces will change to "+". The
-// result is basically the same as encodeURIComponent in Javacript.
-///
-/*--cef()--*/
-CefString CefURIEncode(const CefString& text, bool use_plus);
-
-///
-// Unescapes |text| and returns the result. Unescaping consists of looking for
-// the exact pattern "%XX" where each X is a hex digit and converting to the
-// character with the numerical value of those digits (e.g. "i%20=%203%3b"
-// unescapes to "i = 3;"). If |convert_to_utf8| is true this function will
-// attempt to interpret the initial decoded result as UTF-8. If the result is
-// convertable into UTF-8 it will be returned as converted. Otherwise the
-// initial decoded result will be returned. The |unescape_rule| parameter
-// supports further customization the decoding process.
-///
-/*--cef()--*/
-CefString CefURIDecode(const CefString& text,
- bool convert_to_utf8,
- cef_uri_unescape_rule_t unescape_rule);
-
-///
-// Parses |string| which represents a CSS color value. If |strict| is true
-// strict parsing rules will be applied. Returns true on success or false on
-// error. If parsing succeeds |color| will be set to the color value otherwise
-// |color| will remain unchanged.
-///
-/*--cef()--*/
-bool CefParseCSSColor(const CefString& string,
- bool strict,
- cef_color_t& color);
-
-#endif // CEF_INCLUDE_CEF_PARSER_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// ---------------------------------------------------------------------------
-//
-// The contents of this file must follow a specific format in order to
-// support the CEF translator tool. See the translator.README.txt file in the
-// tools directory for more information.
-//
-
-#ifndef CEF_INCLUDE_CEF_PRINT_HANDLER_H_
-#define CEF_INCLUDE_CEF_PRINT_HANDLER_H_
-#pragma once
-
-#include "include/cef_base.h"
-#include "include/cef_browser.h"
-#include "include/cef_print_settings.h"
-
-///
-// Callback interface for asynchronous continuation of print dialog requests.
-///
-/*--cef(source=library)--*/
-class CefPrintDialogCallback : public virtual CefBase {
- public:
- ///
- // Continue printing with the specified |settings|.
- ///
- /*--cef(capi_name=cont)--*/
- virtual void Continue(CefRefPtr<CefPrintSettings> settings) =0;
-
- ///
- // Cancel the printing.
- ///
- /*--cef()--*/
- virtual void Cancel() =0;
-};
-
-///
-// Callback interface for asynchronous continuation of print job requests.
-///
-/*--cef(source=library)--*/
-class CefPrintJobCallback : public virtual CefBase {
- public:
- ///
- // Indicate completion of the print job.
- ///
- /*--cef(capi_name=cont)--*/
- virtual void Continue() =0;
-};
-
-
-///
-// Implement this interface to handle printing on Linux. The methods of this
-// class will be called on the browser process UI thread.
-///
-/*--cef(source=client)--*/
-class CefPrintHandler : public virtual CefBase {
- public:
- ///
- // Synchronize |settings| with client state. If |get_defaults| is true then
- // populate |settings| with the default print settings. Do not keep a
- // reference to |settings| outside of this callback.
- ///
- /*--cef()--*/
- virtual void OnPrintSettings(CefRefPtr<CefPrintSettings> settings,
- bool get_defaults) =0;
-
- ///
- // Show the print dialog. Execute |callback| once the dialog is dismissed.
- // Return true if the dialog will be displayed or false to cancel the
- // printing immediately.
- ///
- /*--cef()--*/
- virtual bool OnPrintDialog(bool has_selection,
- CefRefPtr<CefPrintDialogCallback> callback) =0;
-
- ///
- // Send the print job to the printer. Execute |callback| once the job is
- // completed. Return true if the job will proceed or false to cancel the job
- // immediately.
- ///
- /*--cef()--*/
- virtual bool OnPrintJob(const CefString& document_name,
- const CefString& pdf_file_path,
- CefRefPtr<CefPrintJobCallback> callback) =0;
-
- ///
- // Reset client state related to printing.
- ///
- /*--cef()--*/
- virtual void OnPrintReset() =0;
-};
-
-#endif // CEF_INCLUDE_CEF_PRINT_HANDLER_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// ---------------------------------------------------------------------------
-//
-// The contents of this file must follow a specific format in order to
-// support the CEF translator tool. See the translator.README.txt file in the
-// tools directory for more information.
-//
-
-#ifndef CEF_INCLUDE_CEF_PRINT_SETTINGS_H_
-#define CEF_INCLUDE_CEF_PRINT_SETTINGS_H_
-#pragma once
-
-#include <vector>
-
-#include "include/cef_base.h"
-
-///
-// Class representing print settings.
-///
-/*--cef(source=library)--*/
-class CefPrintSettings : public virtual CefBase {
- public:
- typedef cef_color_model_t ColorModel;
- typedef cef_duplex_mode_t DuplexMode;
- typedef std::vector<CefPageRange> PageRangeList;
-
- ///
- // Create a new CefPrintSettings object.
- ///
- /*--cef()--*/
- static CefRefPtr<CefPrintSettings> Create();
-
- ///
- // Returns true if this object is valid. Do not call any other methods if this
- // function returns false.
- ///
- /*--cef()--*/
- virtual bool IsValid() =0;
-
- ///
- // Returns true if the values of this object are read-only. Some APIs may
- // expose read-only objects.
- ///
- /*--cef()--*/
- virtual bool IsReadOnly() =0;
-
- ///
- // Returns a writable copy of this object.
- ///
- /*--cef()--*/
- virtual CefRefPtr<CefPrintSettings> Copy() =0;
-
- ///
- // Set the page orientation.
- ///
- /*--cef()--*/
- virtual void SetOrientation(bool landscape) =0;
-
- ///
- // Returns true if the orientation is landscape.
- ///
- /*--cef()--*/
- virtual bool IsLandscape() =0;
-
- ///
- // Set the printer printable area in device units.
- // Some platforms already provide flipped area. Set |landscape_needs_flip|
- // to false on those platforms to avoid double flipping.
- ///
- /*--cef()--*/
- virtual void SetPrinterPrintableArea(
- const CefSize& physical_size_device_units,
- const CefRect& printable_area_device_units,
- bool landscape_needs_flip) =0;
-
- ///
- // Set the device name.
- ///
- /*--cef(optional_param=name)--*/
- virtual void SetDeviceName(const CefString& name) =0;
-
- ///
- // Get the device name.
- ///
- /*--cef()--*/
- virtual CefString GetDeviceName() =0;
-
- ///
- // Set the DPI (dots per inch).
- ///
- /*--cef()--*/
- virtual void SetDPI(int dpi) =0;
-
- ///
- // Get the DPI (dots per inch).
- ///
- /*--cef()--*/
- virtual int GetDPI() =0;
-
- ///
- // Set the page ranges.
- ///
- /*--cef()--*/
- virtual void SetPageRanges(const PageRangeList& ranges) =0;
-
- ///
- // Returns the number of page ranges that currently exist.
- ///
- /*--cef()--*/
- virtual size_t GetPageRangesCount() =0;
-
- ///
- // Retrieve the page ranges.
- ///
- /*--cef(count_func=ranges:GetPageRangesCount)--*/
- virtual void GetPageRanges(PageRangeList& ranges) =0;
-
- ///
- // Set whether only the selection will be printed.
- ///
- /*--cef()--*/
- virtual void SetSelectionOnly(bool selection_only) =0;
-
- ///
- // Returns true if only the selection will be printed.
- ///
- /*--cef()--*/
- virtual bool IsSelectionOnly() =0;
-
- ///
- // Set whether pages will be collated.
- ///
- /*--cef()--*/
- virtual void SetCollate(bool collate) =0;
-
- ///
- // Returns true if pages will be collated.
- ///
- /*--cef()--*/
- virtual bool WillCollate() =0;
-
- ///
- // Set the color model.
- ///
- /*--cef()--*/
- virtual void SetColorModel(ColorModel model) =0;
-
- ///
- // Get the color model.
- ///
- /*--cef(default_retval=COLOR_MODEL_UNKNOWN)--*/
- virtual ColorModel GetColorModel() =0;
-
- ///
- // Set the number of copies.
- ///
- /*--cef()--*/
- virtual void SetCopies(int copies) =0;
-
- ///
- // Get the number of copies.
- ///
- /*--cef()--*/
- virtual int GetCopies() =0;
-
- ///
- // Set the duplex mode.
- ///
- /*--cef()--*/
- virtual void SetDuplexMode(DuplexMode mode) =0;
-
- ///
- // Get the duplex mode.
- ///
- /*--cef(default_retval=DUPLEX_MODE_UNKNOWN)--*/
- virtual DuplexMode GetDuplexMode() =0;
-};
-
-#endif // CEF_INCLUDE_CEF_PRINT_SETTINGS_H_
-
#include "include/cef_base.h"
#include "include/cef_browser.h"
-#include "include/cef_drag_data.h"
#include <vector>
///
/*--cef(source=client)--*/
class CefRenderHandler : public virtual CefBase {
public:
- typedef cef_cursor_type_t CursorType;
- typedef cef_drag_operations_mask_t DragOperation;
- typedef cef_drag_operations_mask_t DragOperationsMask;
typedef cef_paint_element_type_t PaintElementType;
typedef std::vector<CefRect> RectList;
///
// Called when the browser wants to move or resize the popup widget. |rect|
- // contains the new location and size in view coordinates.
+ // contains the new location and size.
///
/*--cef()--*/
virtual void OnPopupSize(CefRefPtr<CefBrowser> browser,
const CefRect& rect) {}
///
- // Called when an element should be painted. Pixel values passed to this
- // method are scaled relative to view coordinates based on the value of
- // CefScreenInfo.device_scale_factor returned from GetScreenInfo. |type|
- // indicates whether the element is the view or the popup widget. |buffer|
- // contains the pixel data for the whole image. |dirtyRects| contains the set
- // of rectangles in pixel coordinates that need to be repainted. |buffer| will
- // be |width|*|height|*4 bytes in size and represents a BGRA image with an
- // upper-left origin.
+ // Called when an element should be painted. |type| indicates whether the
+ // element is the view or the popup widget. |buffer| contains the pixel data
+ // for the whole image. |dirtyRects| contains the set of rectangles that need
+ // to be repainted. On Windows |buffer| will be |width|*|height|*4 bytes
+ // in size and represents a BGRA image with an upper-left origin.
///
/*--cef()--*/
virtual void OnPaint(CefRefPtr<CefBrowser> browser,
int width, int height) =0;
///
- // Called when the browser's cursor has changed. If |type| is CT_CUSTOM then
- // |custom_cursor_info| will be populated with the custom cursor information.
+ // Called when the browser window's cursor has changed.
///
/*--cef()--*/
virtual void OnCursorChange(CefRefPtr<CefBrowser> browser,
- CefCursorHandle cursor,
- CursorType type,
- const CefCursorInfo& custom_cursor_info) {}
-
- ///
- // Called when the user starts dragging content in the web view. Contextual
- // information about the dragged content is supplied by |drag_data|.
- // (|x|, |y|) is the drag start location in screen coordinates.
- // OS APIs that run a system message loop may be used within the
- // StartDragging call.
- //
- // Return false to abort the drag operation. Don't call any of
- // CefBrowserHost::DragSource*Ended* methods after returning false.
- //
- // Return true to handle the drag operation. Call
- // CefBrowserHost::DragSourceEndedAt and DragSourceSystemDragEnded either
- // synchronously or asynchronously to inform the web view that the drag
- // operation has ended.
- ///
- /*--cef()--*/
- virtual bool StartDragging(CefRefPtr<CefBrowser> browser,
- CefRefPtr<CefDragData> drag_data,
- DragOperationsMask allowed_ops,
- int x, int y) { return false; }
-
- ///
- // Called when the web view wants to update the mouse cursor during a
- // drag & drop operation. |operation| describes the allowed operation
- // (none, move, copy, link).
- ///
- /*--cef()--*/
- virtual void UpdateDragCursor(CefRefPtr<CefBrowser> browser,
- DragOperation operation) {}
+ CefCursorHandle cursor) {}
///
// Called when the scroll offset has changed.
///
/*--cef()--*/
- virtual void OnScrollOffsetChanged(CefRefPtr<CefBrowser> browser,
- double x,
- double y) {}
+ virtual void OnScrollOffsetChanged(CefRefPtr<CefBrowser> browser) {}
};
#endif // CEF_INCLUDE_CEF_RENDER_HANDLER_H_
virtual void SetFirstPartyForCookies(const CefString& url) =0;
///
- // Get the resource type for this request. Only available in the browser
- // process.
+ // Get the resource type for this request. Accurate resource type information
+ // may only be available in the browser process.
///
/*--cef(default_retval=RT_SUB_RESOURCE)--*/
virtual ResourceType GetResourceType() =0;
///
/*--cef(default_retval=TT_EXPLICIT)--*/
virtual TransitionType GetTransitionType() =0;
-
- ///
- // Returns the globally unique identifier for this request or 0 if not
- // specified. Can be used by CefRequestHandler implementations in the browser
- // process to track a single request across multiple callbacks.
- ///
- /*--cef()--*/
- virtual uint64 GetIdentifier() =0;
};
#define CEF_INCLUDE_CEF_REQUEST_CONTEXT_H_
#pragma once
-#include "include/cef_cookie.h"
#include "include/cef_request_context_handler.h"
-class CefSchemeHandlerFactory;
-
///
// A request context provides request handling for a set of related browser
-// or URL request objects. A request context can be specified when creating a
-// new browser via the CefBrowserHost static factory methods or when creating a
-// new URL request via the CefURLRequest static factory methods. Browser objects
-// with different request contexts will never be hosted in the same render
-// process. Browser objects with the same request context may or may not be
-// hosted in the same render process depending on the process model. Browser
-// objects created indirectly via the JavaScript window.open function or
-// targeted links will share the same render process and the same request
-// context as the source browser. When running in single-process mode there is
-// only a single render process (the main process) and so all browsers created
-// in single-process mode will share the same request context. This will be the
-// first request context passed into a CefBrowserHost static factory method and
-// all other request context objects will be ignored.
+// objects. A request context is specified when creating a new browser object
+// via the CefBrowserHost static factory methods. Browser objects with different
+// request contexts will never be hosted in the same render process. Browser
+// objects with the same request context may or may not be hosted in the same
+// render process depending on the process model. Browser objects created
+// indirectly via the JavaScript window.open function or targeted links will
+// share the same render process and the same request context as the source
+// browser. When running in single-process mode there is only a single render
+// process (the main process) and so all browsers created in single-process mode
+// will share the same request context. This will be the first request context
+// passed into a CefBrowserHost static factory method and all other request
+// context objects will be ignored.
///
/*--cef(source=library,no_debugct_check)--*/
class CefRequestContext : public virtual CefBase {
static CefRefPtr<CefRequestContext> GetGlobalContext();
///
- // Creates a new context object with the specified |settings| and optional
- // |handler|.
+ // Creates a new context object with the specified handler.
///
/*--cef(optional_param=handler)--*/
static CefRefPtr<CefRequestContext> CreateContext(
- const CefRequestContextSettings& settings,
- CefRefPtr<CefRequestContextHandler> handler);
-
- ///
- // Creates a new context object that shares storage with |other| and uses an
- // optional |handler|.
- ///
- /*--cef(capi_name=create_context_shared,optional_param=handler)--*/
- static CefRefPtr<CefRequestContext> CreateContext(
- CefRefPtr<CefRequestContext> other,
CefRefPtr<CefRequestContextHandler> handler);
///
virtual bool IsSame(CefRefPtr<CefRequestContext> other) =0;
///
- // Returns true if this object is sharing the same storage as |that| object.
- ///
- /*--cef()--*/
- virtual bool IsSharingWith(CefRefPtr<CefRequestContext> other) =0;
-
- ///
- // Returns true if this object is the global context. The global context is
- // used by default when creating a browser or URL request with a NULL context
- // argument.
+ // Returns true if this object is the global context.
///
/*--cef()--*/
virtual bool IsGlobal() =0;
///
/*--cef()--*/
virtual CefRefPtr<CefRequestContextHandler> GetHandler() =0;
-
- ///
- // Returns the cache path for this object. If empty an "incognito mode"
- // in-memory cache is being used.
- ///
- /*--cef()--*/
- virtual CefString GetCachePath() =0;
-
- ///
- // Returns the default cookie manager for this object. This will be the global
- // cookie manager if this object is the global request context. Otherwise,
- // this will be the default cookie manager used when this request context does
- // not receive a value via CefRequestContextHandler::GetCookieManager(). If
- // |callback| is non-NULL it will be executed asnychronously on the IO thread
- // after the manager's storage has been initialized.
- ///
- /*--cef(optional_param=callback)--*/
- virtual CefRefPtr<CefCookieManager> GetDefaultCookieManager(
- CefRefPtr<CefCompletionCallback> callback) =0;
-
- ///
- // Register a scheme handler factory for the specified |scheme_name| and
- // optional |domain_name|. An empty |domain_name| value for a standard scheme
- // will cause the factory to match all domain names. The |domain_name| value
- // will be ignored for non-standard schemes. If |scheme_name| is a built-in
- // scheme and no handler is returned by |factory| then the built-in scheme
- // handler factory will be called. If |scheme_name| is a custom scheme then
- // you must also implement the CefApp::OnRegisterCustomSchemes() method in all
- // processes. This function may be called multiple times to change or remove
- // the factory that matches the specified |scheme_name| and optional
- // |domain_name|. Returns false if an error occurs. This function may be
- // called on any thread in the browser process.
- ///
- /*--cef(optional_param=domain_name,optional_param=factory)--*/
- virtual bool RegisterSchemeHandlerFactory(
- const CefString& scheme_name,
- const CefString& domain_name,
- CefRefPtr<CefSchemeHandlerFactory> factory) =0;
-
- ///
- // Clear all registered scheme handler factories. Returns false on error. This
- // function may be called on any thread in the browser process.
- ///
- /*--cef()--*/
- virtual bool ClearSchemeHandlerFactories() =0;
};
#endif // CEF_INCLUDE_CEF_REQUEST_CONTEXT_H_
#include "include/cef_cookie.h"
///
-// Implement this interface to provide handler implementations. The handler
-// instance will not be released until all objects related to the context have
-// been destroyed.
+// Implement this interface to provide handler implementations.
///
/*--cef(source=client,no_debugct_check)--*/
class CefRequestContextHandler : public virtual CefBase {
public:
///
- // Called on the IO thread to retrieve the cookie manager. If this method
- // returns NULL the default cookie manager retrievable via
- // CefRequestContext::GetDefaultCookieManager() will be used.
+ // Called on the IO thread to retrieve the cookie manager. The global cookie
+ // manager will be used if this method returns NULL.
///
/*--cef()--*/
virtual CefRefPtr<CefCookieManager> GetCookieManager() { return NULL; }
#include "include/cef_resource_handler.h"
#include "include/cef_response.h"
#include "include/cef_request.h"
-#include "include/cef_ssl_info.h"
#include "include/cef_web_plugin.h"
-
///
-// Callback interface used for asynchronous continuation of url requests.
+// Callback interface used for asynchronous continuation of quota requests.
///
/*--cef(source=library)--*/
-class CefRequestCallback : public virtual CefBase {
+class CefQuotaCallback : public virtual CefBase {
public:
///
- // Continue the url request. If |allow| is true the request will be continued.
- // Otherwise, the request will be canceled.
+ // Continue the quota request. If |allow| is true the request will be
+ // allowed. Otherwise, the request will be denied.
///
/*--cef(capi_name=cont)--*/
virtual void Continue(bool allow) =0;
///
- // Cancel the url request.
+ // Cancel the quota request.
///
/*--cef()--*/
virtual void Cancel() =0;
};
+///
+// Callback interface used for asynchronous continuation of url requests when
+// invalid SSL certificates are encountered.
+///
+/*--cef(source=library)--*/
+class CefAllowCertificateErrorCallback : public virtual CefBase {
+ public:
+ ///
+ // Continue the url request. If |allow| is true the request will be
+ // continued. Otherwise, the request will be canceled.
+ ///
+ /*--cef(capi_name=cont)--*/
+ virtual void Continue(bool allow) =0;
+};
+
+
///
// Implement this interface to handle events related to browser requests. The
// methods of this class will be called on the thread indicated.
/*--cef(source=client)--*/
class CefRequestHandler : public virtual CefBase {
public:
- typedef cef_return_value_t ReturnValue;
typedef cef_termination_status_t TerminationStatus;
- typedef cef_window_open_disposition_t WindowOpenDisposition;
///
// Called on the UI thread before browser navigation. Return true to cancel
}
///
- // Called on the UI thread before OnBeforeBrowse in certain limited cases
- // where navigating a new or different browser might be desirable. This
- // includes user-initiated navigation that might open in a special way (e.g.
- // links clicked via middle-click or ctrl + left-click) and certain types of
- // cross-origin navigation initiated from the renderer process (e.g.
- // navigating the top-level frame to/from a file URL). The |browser| and
- // |frame| values represent the source of the navigation. The
- // |target_disposition| value indicates where the user intended to navigate
- // the browser based on standard Chromium behaviors (e.g. current tab,
- // new tab, etc). The |user_gesture| value will be true if the browser
- // navigated via explicit user gesture (e.g. clicking a link) or false if it
- // navigated automatically (e.g. via the DomContentLoaded event). Return true
- // to cancel the navigation or false to allow the navigation to proceed in the
- // source browser's top-level frame.
+ // Called on the IO thread before a resource request is loaded. The |request|
+ // object may be modified. To cancel the request return true otherwise return
+ // false.
///
/*--cef()--*/
- virtual bool OnOpenURLFromTab(CefRefPtr<CefBrowser> browser,
- CefRefPtr<CefFrame> frame,
- const CefString& target_url,
- WindowOpenDisposition target_disposition,
- bool user_gesture) {
+ virtual bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser,
+ CefRefPtr<CefFrame> frame,
+ CefRefPtr<CefRequest> request) {
return false;
}
- ///
- // Called on the IO thread before a resource request is loaded. The |request|
- // object may be modified. Return RV_CONTINUE to continue the request
- // immediately. Return RV_CONTINUE_ASYNC and call CefRequestCallback::
- // Continue() at a later time to continue or cancel the request
- // asynchronously. Return RV_CANCEL to cancel the request immediately.
- //
- ///
- /*--cef(default_retval=RV_CONTINUE)--*/
- virtual ReturnValue OnBeforeResourceLoad(
- CefRefPtr<CefBrowser> browser,
- CefRefPtr<CefFrame> frame,
- CefRefPtr<CefRequest> request,
- CefRefPtr<CefRequestCallback> callback) {
- return RV_CONTINUE;
- }
-
///
// Called on the IO thread before a resource is loaded. To allow the resource
// to load normally return NULL. To specify a handler for the resource return
}
///
- // Called on the IO thread when a resource load is redirected. The |request|
- // parameter will contain the old URL and other request-related information.
- // The |new_url| parameter will contain the new URL and can be changed if
- // desired. The |request| object cannot be modified in this callback.
+ // Called on the IO thread when a resource load is redirected. The |old_url|
+ // parameter will contain the old URL. The |new_url| parameter will contain
+ // the new URL and can be changed if desired.
///
/*--cef()--*/
virtual void OnResourceRedirect(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
- CefRefPtr<CefRequest> request,
+ const CefString& old_url,
CefString& new_url) {}
- ///
- // Called on the IO thread when a resource response is received. To allow the
- // resource to load normally return false. To redirect or retry the resource
- // modify |request| (url, headers or post body) and return true. The
- // |response| object cannot be modified in this callback.
- ///
- /*--cef()--*/
- virtual bool OnResourceResponse(CefRefPtr<CefBrowser> browser,
- CefRefPtr<CefFrame> frame,
- CefRefPtr<CefRequest> request,
- CefRefPtr<CefResponse> response) {
- return false;
- }
-
///
// Called on the IO thread when the browser needs credentials from the user.
// |isProxy| indicates whether the host is a proxy server. |host| contains the
// hostname and |port| contains the port number. Return true to continue the
- // request and call CefAuthCallback::Continue() either in this method or
- // at a later time when the authentication information is available. Return
- // false to cancel the request immediately.
+ // request and call CefAuthCallback::Continue() when the authentication
+ // information is available. Return false to cancel the request.
///
/*--cef(optional_param=realm)--*/
virtual bool GetAuthCredentials(CefRefPtr<CefBrowser> browser,
// Called on the IO thread when JavaScript requests a specific storage quota
// size via the webkitStorageInfo.requestQuota function. |origin_url| is the
// origin of the page making the request. |new_size| is the requested quota
- // size in bytes. Return true to continue the request and call
- // CefRequestCallback::Continue() either in this method or at a later time to
- // grant or deny the request. Return false to cancel the request immediately.
+ // size in bytes. Return true and call CefQuotaCallback::Continue() either in
+ // this method or at a later time to grant or deny the request. Return false
+ // to cancel the request.
///
- /*--cef()--*/
+ /*--cef(optional_param=realm)--*/
virtual bool OnQuotaRequest(CefRefPtr<CefBrowser> browser,
const CefString& origin_url,
int64 new_size,
- CefRefPtr<CefRequestCallback> callback) {
+ CefRefPtr<CefQuotaCallback> callback) {
return false;
}
///
// Called on the UI thread to handle requests for URLs with an invalid
- // SSL certificate. Return true and call CefRequestCallback::Continue() either
- // in this method or at a later time to continue or cancel the request. Return
- // false to cancel the request immediately. If |callback| is empty the error
- // cannot be recovered from and the request will be canceled automatically.
- // If CefSettings.ignore_certificate_errors is set all invalid certificates
- // will be accepted without calling this method.
+ // SSL certificate. Return true and call CefAllowCertificateErrorCallback::
+ // Continue() either in this method or at a later time to continue or cancel
+ // the request. Return false to cancel the request immediately. If |callback|
+ // is empty the error cannot be recovered from and the request will be
+ // canceled automatically. If CefSettings.ignore_certificate_errors is set
+ // all invalid certificates will be accepted without calling this method.
///
/*--cef()--*/
virtual bool OnCertificateError(
- CefRefPtr<CefBrowser> browser,
cef_errorcode_t cert_error,
const CefString& request_url,
- CefRefPtr<CefSSLInfo> ssl_info,
- CefRefPtr<CefRequestCallback> callback) {
+ CefRefPtr<CefAllowCertificateErrorCallback> callback) {
return false;
}
virtual void OnPluginCrashed(CefRefPtr<CefBrowser> browser,
const CefString& plugin_path) {}
- ///
- // Called on the browser process UI thread when the render view associated
- // with |browser| is ready to receive/handle IPC messages in the render
- // process.
- ///
- /*--cef()--*/
- virtual void OnRenderViewReady(CefRefPtr<CefBrowser> browser) {}
-
///
// Called on the browser process UI thread when the render process
// terminates unexpectedly. |status| indicates how the process
#define CEF_INCLUDE_CEF_RUNNABLE_H_
#pragma once
-#if defined(BUILDING_CEF_SHARED)
-// The implementation of cef_runnable.h depends on an obsolete version of
-// base/tuple.h that is implemented by cef_tuple.h for client applications but
-// is not compatible with the version used when building Chromium/CEF.
-#error This header cannot be used when building Chromium/CEF.
-#endif
-
-#include "include/base/cef_tuple.h"
#include "include/cef_base.h"
#include "include/cef_task.h"
+#ifdef BUILDING_CEF_SHARED
+#include "base/tuple.h"
+#else
+#include "internal/cef_tuple.h"
+#endif
// CefRunnableMethodTraits -----------------------------------------------------
//
+++ /dev/null
-// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef CEF_INCLUDE_CEF_SANDBOX_WIN_H_
-#define CEF_INCLUDE_CEF_SANDBOX_WIN_H_
-#pragma once
-
-#include "include/cef_base.h"
-
-#if defined(OS_WIN)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// The sandbox is used to restrict sub-processes (renderer, plugin, GPU, etc)
-// from directly accessing system resources. This helps to protect the user
-// from untrusted and potentially malicious Web content.
-// See http://www.chromium.org/developers/design-documents/sandbox for
-// complete details.
-//
-// To enable the sandbox on Windows the following requirements must be met:
-// 1. Use the same executable for the browser process and all sub-processes.
-// 2. Link the executable with the cef_sandbox static library.
-// 3. Call the cef_sandbox_info_create() function from within the executable
-// (not from a separate DLL) and pass the resulting pointer into both the
-// CefExecutProcess() and CefInitialize() functions via the
-// |windows_sandbox_info| parameter.
-
-///
-// Create the sandbox information object for this process. It is safe to create
-// multiple of this object and to destroy the object immediately after passing
-// into the CefExecutProcess() and/or CefInitialize() functions.
-///
-void* cef_sandbox_info_create();
-
-///
-// Destroy the specified sandbox information object.
-///
-void cef_sandbox_info_destroy(void* sandbox_info);
-
-#ifdef __cplusplus
-}
-
-///
-// Manages the life span of a sandbox information object.
-///
-class CefScopedSandboxInfo {
- public:
- CefScopedSandboxInfo() {
- sandbox_info_ = cef_sandbox_info_create();
- }
- ~CefScopedSandboxInfo() {
- cef_sandbox_info_destroy(sandbox_info_);
- }
-
- void* sandbox_info() const { return sandbox_info_; }
-
- private:
- void* sandbox_info_;
-};
-#endif // __cplusplus
-
-#endif // defined(OS_WIN)
-
-#endif // CEF_INCLUDE_CEF_SANDBOX_WIN_H_
///
-// Register a scheme handler factory with the global request context. An empty
-// |domain_name| value for a standard scheme will cause the factory to match all
-// domain names. The |domain_name| value will be ignored for non-standard
-// schemes. If |scheme_name| is a built-in scheme and no handler is returned by
-// |factory| then the built-in scheme handler factory will be called. If
-// |scheme_name| is a custom scheme then you must also implement the
-// CefApp::OnRegisterCustomSchemes() method in all processes. This function may
-// be called multiple times to change or remove the factory that matches the
-// specified |scheme_name| and optional |domain_name|. Returns false if an error
-// occurs. This function may be called on any thread in the browser process.
-// Using this function is equivalent to calling
-// CefRequestContext::GetGlobalContext()->RegisterSchemeHandlerFactory().
+// Register a scheme handler factory for the specified |scheme_name| and
+// optional |domain_name|. An empty |domain_name| value for a standard scheme
+// will cause the factory to match all domain names. The |domain_name| value
+// will be ignored for non-standard schemes. If |scheme_name| is a built-in
+// scheme and no handler is returned by |factory| then the built-in scheme
+// handler factory will be called. If |scheme_name| is a custom scheme then
+// also implement the CefApp::OnRegisterCustomSchemes() method in all processes.
+// This function may be called multiple times to change or remove the factory
+// that matches the specified |scheme_name| and optional |domain_name|.
+// Returns false if an error occurs. This function may be called on any thread
+// in the browser process.
///
/*--cef(optional_param=domain_name,optional_param=factory)--*/
bool CefRegisterSchemeHandlerFactory(
CefRefPtr<CefSchemeHandlerFactory> factory);
///
-// Clear all scheme handler factories registered with the global request
-// context. Returns false on error. This function may be called on any thread in
-// the browser process. Using this function is equivalent to calling
-// CefRequestContext::GetGlobalContext()->ClearSchemeHandlerFactories().
+// Clear all registered scheme handler factories. Returns false on error. This
+// function may be called on any thread in the browser process.
///
/*--cef()--*/
bool CefClearSchemeHandlerFactories();
+++ /dev/null
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// ---------------------------------------------------------------------------
-//
-// The contents of this file must follow a specific format in order to
-// support the CEF translator tool. See the translator.README.txt file in the
-// tools directory for more information.
-//
-
-#ifndef CEF_INCLUDE_CEF_SSL_INFO_H_
-#define CEF_INCLUDE_CEF_SSL_INFO_H_
-#pragma once
-
-#include <vector>
-
-#include "include/cef_base.h"
-#include "include/cef_values.h"
-
-///
-// Class representing the issuer or subject field of an X.509 certificate.
-///
-/*--cef(source=library)--*/
-class CefSSLCertPrincipal : public virtual CefBase {
- public:
- ///
- // Returns a name that can be used to represent the issuer. It tries in this
- // order: CN, O and OU and returns the first non-empty one found.
- ///
- /*--cef()--*/
- virtual CefString GetDisplayName() =0;
-
- ///
- // Returns the common name.
- ///
- /*--cef()--*/
- virtual CefString GetCommonName() =0;
-
- ///
- // Returns the locality name.
- ///
- /*--cef()--*/
- virtual CefString GetLocalityName() =0;
-
- ///
- // Returns the state or province name.
- ///
- /*--cef()--*/
- virtual CefString GetStateOrProvinceName() =0;
-
- ///
- // Returns the country name.
- ///
- /*--cef()--*/
- virtual CefString GetCountryName() =0;
-
- ///
- // Retrieve the list of street addresses.
- ///
- /*--cef()--*/
- virtual void GetStreetAddresses(std::vector<CefString>& addresses) =0;
-
- ///
- // Retrieve the list of organization names.
- ///
- /*--cef()--*/
- virtual void GetOrganizationNames(std::vector<CefString>& names) =0;
-
- ///
- // Retrieve the list of organization unit names.
- ///
- /*--cef()--*/
- virtual void GetOrganizationUnitNames(std::vector<CefString>& names) =0;
-
- ///
- // Retrieve the list of domain components.
- ///
- /*--cef()--*/
- virtual void GetDomainComponents(std::vector<CefString>& components) =0;
-};
-
-///
-// Class representing SSL information.
-///
-/*--cef(source=library)--*/
-class CefSSLInfo : public virtual CefBase {
- public:
- ///
- // Returns the subject of the X.509 certificate. For HTTPS server
- // certificates this represents the web server. The common name of the
- // subject should match the host name of the web server.
- ///
- /*--cef()--*/
- virtual CefRefPtr<CefSSLCertPrincipal> GetSubject() =0;
-
- ///
- // Returns the issuer of the X.509 certificate.
- ///
- /*--cef()--*/
- virtual CefRefPtr<CefSSLCertPrincipal> GetIssuer() =0;
-
- ///
- // Returns the DER encoded serial number for the X.509 certificate. The value
- // possibly includes a leading 00 byte.
- ///
- /*--cef()--*/
- virtual CefRefPtr<CefBinaryValue> GetSerialNumber() =0;
-
- ///
- // Returns the date before which the X.509 certificate is invalid.
- // CefTime.GetTimeT() will return 0 if no date was specified.
- ///
- /*--cef()--*/
- virtual CefTime GetValidStart() =0;
-
- ///
- // Returns the date after which the X.509 certificate is invalid.
- // CefTime.GetTimeT() will return 0 if no date was specified.
- ///
- /*--cef()--*/
- virtual CefTime GetValidExpiry() =0;
-
- ///
- // Returns the DER encoded data for the X.509 certificate.
- ///
- /*--cef()--*/
- virtual CefRefPtr<CefBinaryValue> GetDEREncoded() =0;
-
- ///
- // Returns the PEM encoded data for the X.509 certificate.
- ///
- /*--cef()--*/
- virtual CefRefPtr<CefBinaryValue> GetPEMEncoded() =0;
-};
-
-#endif // CEF_INCLUDE_CEF_SSL_INFO_H_
#pragma once
#include "include/cef_base.h"
-#include "include/cef_callback.h"
///
// Implement this interface to receive notification when tracing has completed.
///
-// Start tracing events on all processes. Tracing is initialized asynchronously
-// and |callback| will be executed on the UI thread after initialization is
-// complete.
+// Start tracing events on all processes. Tracing begins immediately locally,
+// and asynchronously on child processes as soon as they receive the
+// BeginTracing request.
//
// If CefBeginTracing was called previously, or if a CefEndTracingAsync call is
// pending, CefBeginTracing will fail and return false.
//
// This function must be called on the browser process UI thread.
///
-/*--cef(optional_param=categories,optional_param=callback)--*/
-bool CefBeginTracing(const CefString& categories,
- CefRefPtr<CefCompletionCallback> callback);
+/*--cef(optional_param=categories)--*/
+bool CefBeginTracing(const CefString& categories);
///
// Stop tracing events on all processes.
// This function must be called on the browser process UI thread.
///
/*--cef(optional_param=tracing_file,optional_param=callback)--*/
-bool CefEndTracing(const CefString& tracing_file,
- CefRefPtr<CefEndTracingCallback> callback);
+bool CefEndTracingAsync(const CefString& tracing_file,
+ CefRefPtr<CefEndTracingCallback> callback);
///
// Returns the current system trace time or, if none is defined, the current
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
+// Copyright (c) 2012 Marshall A. Greenblatt. Portions copyright (c) 2012
// Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
//
// Events are issued against categories. Whereas LOG's categories are statically
// defined, TRACE categories are created implicitly with a string. For example:
-// TRACE_EVENT_INSTANT0("MY_SUBSYSTEM", "SomeImportantEvent")
+// CEF_TRACE_EVENT_INSTANT0("MY_SUBSYSTEM", "SomeImportantEvent")
//
// Events can be INSTANT, or can be pairs of BEGIN and END in the same scope:
-// TRACE_EVENT_BEGIN0("MY_SUBSYSTEM", "SomethingCostly")
+// CEF_TRACE_EVENT_BEGIN0("MY_SUBSYSTEM", "SomethingCostly")
// doSomethingCostly()
-// TRACE_EVENT_END0("MY_SUBSYSTEM", "SomethingCostly")
+// CEF_TRACE_EVENT_END0("MY_SUBSYSTEM", "SomethingCostly")
// Note: Our tools can't always determine the correct BEGIN/END pairs unless
// these are used in the same scope. Use ASYNC_BEGIN/ASYNC_END macros if you
// need them to be in separate scopes.
// A common use case is to trace entire function scopes. This issues a trace
// BEGIN and END automatically:
// void doSomethingCostly() {
-// TRACE_EVENT0("MY_SUBSYSTEM", "doSomethingCostly");
+// CEF_TRACE_EVENT0("MY_SUBSYSTEM", "doSomethingCostly");
// ...
// }
//
// Additional parameters can be associated with an event:
// void doSomethingCostly2(int howMuch) {
-// TRACE_EVENT1("MY_SUBSYSTEM", "doSomethingCostly",
+// CEF_TRACE_EVENT1("MY_SUBSYSTEM", "doSomethingCostly",
// "howMuch", howMuch);
// ...
// }
// [single threaded sender code]
// static int send_count = 0;
// ++send_count;
-// TRACE_EVENT_ASYNC_BEGIN0("ipc", "message", send_count);
+// CEF_TRACE_EVENT_ASYNC_BEGIN0("ipc", "message", send_count);
// Send(new MyMessage(send_count));
// [receive code]
// void OnMyMessage(send_count) {
-// TRACE_EVENT_ASYNC_END0("ipc", "message", send_count);
+// CEF_TRACE_EVENT_ASYNC_END0("ipc", "message", send_count);
// }
// The third parameter is a unique ID to match ASYNC_BEGIN/ASYNC_END pairs.
// ASYNC_BEGIN and ASYNC_END can occur on any thread of any traced process.
// class MyTracedClass {
// public:
// MyTracedClass() {
-// TRACE_EVENT_ASYNC_BEGIN0("category", "MyTracedClass", this);
+// CEF_TRACE_EVENT_ASYNC_BEGIN0("category", "MyTracedClass", this);
// }
// ~MyTracedClass() {
-// TRACE_EVENT_ASYNC_END0("category", "MyTracedClass", this);
+// CEF_TRACE_EVENT_ASYNC_END0("category", "MyTracedClass", this);
// }
// }
//
// The trace event also supports counters, which is a way to track a quantity
// as it varies over time. Counters are created with the following macro:
-// TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter", g_myCounterValue);
+// CEF_TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter", g_myCounterValue);
//
// Counters are process-specific. The macro itself can be issued from any
// thread, however.
//
// Sometimes, you want to track two counters at once. You can do this with two
// counter macros:
-// TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter0", g_myCounterValue[0]);
-// TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter1", g_myCounterValue[1]);
+// CEF_TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter0", g_myCounterValue[0]);
+// CEF_TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter1", g_myCounterValue[1]);
// Or you can do it with a combined macro:
-// TRACE_COUNTER2("MY_SUBSYSTEM", "myCounter",
+// CEF_TRACE_COUNTER2("MY_SUBSYSTEM", "myCounter",
// "bytesPinned", g_myCounterValue[0],
// "bytesAllocated", g_myCounterValue[1]);
// This indicates to the tracing UI that these counters should be displayed
// in a single graph, as a summed area chart.
//
// Since counters are in a global namespace, you may want to disembiguate with a
-// unique ID, by using the TRACE_COUNTER_ID* variations.
+// unique ID, by using the CEF_TRACE_COUNTER_ID* variations.
//
// By default, trace collection is compiled in, but turned off at runtime.
// Collecting trace data is the responsibility of the embedding application. In
// in for category, name, and arg_names. Thus, the following code will cause
// problems:
// char* str = strdup("impprtantName");
-// TRACE_EVENT_INSTANT0("SUBSYSTEM", str); // BAD!
+// CEF_TRACE_EVENT_INSTANT0("SUBSYSTEM", str); // BAD!
// free(str); // Trace system now has dangling pointer
//
// To avoid this issue with the |name| and |arg_name| parameters, use the
-// TRACE_EVENT_COPY_XXX overloads of the macros at additional runtime
+// CEF_TRACE_EVENT_COPY_XXX overloads of the macros at additional runtime
// overhead.
// Notes: The category must always be in a long-lived char* (i.e. static const).
// The |arg_values|, when used, are always deep copied with the _COPY
// All macros are thread safe and can be used from any process.
///
-#ifndef CEF_INCLUDE_BASE_CEF_TRACE_EVENT_H_
-#define CEF_INCLUDE_BASE_CEF_TRACE_EVENT_H_
+#ifndef CEF_INCLUDE_CEF_TRACE_EVENT_H_
+#define CEF_INCLUDE_CEF_TRACE_EVENT_H_
#pragma once
-#if defined(TRACE_EVENT0)
-// Do nothing if the macros provided by this header already exist.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/debug/trace_event.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
+#include "include/internal/cef_export.h"
+#include "include/internal/cef_types.h"
-#include "include/internal/cef_trace_event_internal.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Functions for tracing counters and functions; called from macros.
+// - |category| string must have application lifetime (static or literal). They
+// may not include "(quotes) chars.
+// - |argX_name|, |argX_val|, |valueX_name|, |valeX_val| are optional parameters
+// and represent pairs of name and values of arguments
+// - |copy| is used to avoid memory scoping issues with the |name| and
+// |arg_name| parameters by copying them
+// - |id| is used to disambiguate counters with the same name, or match async
+// trace events
+
+CEF_EXPORT void cef_trace_event_instant(const char* category,
+ const char* name,
+ const char* arg1_name,
+ uint64 arg1_val,
+ const char* arg2_name,
+ uint64 arg2_val,
+ int copy);
+CEF_EXPORT void cef_trace_event_begin(const char* category,
+ const char* name,
+ const char* arg1_name,
+ uint64 arg1_val,
+ const char* arg2_name,
+ uint64 arg2_val,
+ int copy);
+CEF_EXPORT void cef_trace_event_end(const char* category,
+ const char* name,
+ const char* arg1_name,
+ uint64 arg1_val,
+ const char* arg2_name,
+ uint64 arg2_val,
+ int copy);
+CEF_EXPORT void cef_trace_counter(const char* category,
+ const char* name,
+ const char* value1_name,
+ uint64 value1_val,
+ const char* value2_name,
+ uint64 value2_val,
+ int copy);
+CEF_EXPORT void cef_trace_counter_id(const char* category,
+ const char* name,
+ uint64 id,
+ const char* value1_name,
+ uint64 value1_val,
+ const char* value2_name,
+ uint64 value2_val,
+ int copy);
+CEF_EXPORT void cef_trace_event_async_begin(const char* category,
+ const char* name,
+ uint64 id,
+ const char* arg1_name,
+ uint64 arg1_val,
+ const char* arg2_name,
+ uint64 arg2_val,
+ int copy);
+CEF_EXPORT void cef_trace_event_async_step_into(const char* category,
+ const char* name,
+ uint64 id,
+ uint64 step,
+ const char* arg1_name,
+ uint64 arg1_val,
+ int copy);
+CEF_EXPORT void cef_trace_event_async_step_past(const char* category,
+ const char* name,
+ uint64 id,
+ uint64 step,
+ const char* arg1_name,
+ uint64 arg1_val,
+ int copy);
+CEF_EXPORT void cef_trace_event_async_end(const char* category,
+ const char* name,
+ uint64 id,
+ const char* arg1_name,
+ uint64 arg1_val,
+ const char* arg2_name,
+ uint64 arg2_val,
+ int copy);
+
+#ifdef __cplusplus
+}
+#endif
// Records a pair of begin and end events called "name" for the current
// scope, with 0, 1 or 2 associated arguments. If the category is not
// enabled, then this does nothing.
// - category and name strings must have application lifetime (statics or
// literals). They may not include " chars.
-#define TRACE_EVENT0(category, name) \
+#define CEF_TRACE_EVENT0(category, name) \
cef_trace_event_begin(category, name, NULL, 0, NULL, 0, false); \
CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name)
-#define TRACE_EVENT1(category, name, arg1_name, arg1_val) \
+#define CEF_TRACE_EVENT1(category, name, arg1_name, arg1_val) \
cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, false); \
CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name)
-#define TRACE_EVENT2(category, name, arg1_name, arg1_val, arg2_name, \
+#define CEF_TRACE_EVENT2(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val) \
cef_trace_event_begin(category, name, arg1_name, arg1_val, \
arg2_name, arg2_val, false); \
// Implementation detail: internal macro to end end event when the scope ends.
#define CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name) \
- cef_trace_event::CefTraceEndOnScopeClose \
+ cef_trace_event_internal::CefTraceEndOnScopeClose \
CEF_INTERNAL_TRACE_EVENT_UID(profileScope)(category, name)
// Records a single event called "name" immediately, with 0, 1 or 2
// does nothing.
// - category and name strings must have application lifetime (statics or
// literals). They may not include " chars.
-#define TRACE_EVENT_INSTANT0(category, name) \
+#define CEF_TRACE_EVENT_INSTANT0(category, name) \
cef_trace_event_instant(category, name, NULL, 0, NULL, 0, false)
-#define TRACE_EVENT_INSTANT1(category, name, arg1_name, arg1_val) \
+#define CEF_TRACE_EVENT_INSTANT1(category, name, arg1_name, arg1_val) \
cef_trace_event_instant(category, name, arg1_name, arg1_val, NULL, 0, false)
-#define TRACE_EVENT_INSTANT2(category, name, arg1_name, arg1_val, \
+#define CEF_TRACE_EVENT_INSTANT2(category, name, arg1_name, arg1_val, \
arg2_name, arg2_val) \
cef_trace_event_instant(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val, false)
-#define TRACE_EVENT_COPY_INSTANT0(category, name) \
+#define CEF_TRACE_EVENT_COPY_INSTANT0(category, name) \
cef_trace_event_instant(category, name, NULL, 0, NULL, 0, true)
-#define TRACE_EVENT_COPY_INSTANT1(category, name, arg1_name, arg1_val) \
+#define CEF_TRACE_EVENT_COPY_INSTANT1(category, name, arg1_name, arg1_val) \
cef_trace_event_instant(category, name, arg1_name, arg1_val, NULL, 0, true)
-#define TRACE_EVENT_COPY_INSTANT2(category, name, arg1_name, arg1_val, \
+#define CEF_TRACE_EVENT_COPY_INSTANT2(category, name, arg1_name, arg1_val, \
arg2_name, arg2_val) \
cef_trace_event_instant(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val, true)
// does nothing.
// - category and name strings must have application lifetime (statics or
// literals). They may not include " chars.
-#define TRACE_EVENT_BEGIN0(category, name) \
+#define CEF_TRACE_EVENT_BEGIN0(category, name) \
cef_trace_event_begin(category, name, NULL, 0, NULL, 0, false)
-#define TRACE_EVENT_BEGIN1(category, name, arg1_name, arg1_val) \
+#define CEF_TRACE_EVENT_BEGIN1(category, name, arg1_name, arg1_val) \
cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, false)
-#define TRACE_EVENT_BEGIN2(category, name, arg1_name, arg1_val, \
+#define CEF_TRACE_EVENT_BEGIN2(category, name, arg1_name, arg1_val, \
arg2_name, arg2_val) \
cef_trace_event_begin(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val, false)
-#define TRACE_EVENT_COPY_BEGIN0(category, name) \
+#define CEF_TRACE_EVENT_COPY_BEGIN0(category, name) \
cef_trace_event_begin(category, name, NULL, 0, NULL, 0, true)
-#define TRACE_EVENT_COPY_BEGIN1(category, name, arg1_name, arg1_val) \
+#define CEF_TRACE_EVENT_COPY_BEGIN1(category, name, arg1_name, arg1_val) \
cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, true)
-#define TRACE_EVENT_COPY_BEGIN2(category, name, arg1_name, arg1_val, \
+#define CEF_TRACE_EVENT_COPY_BEGIN2(category, name, arg1_name, arg1_val, \
arg2_name, arg2_val) \
cef_trace_event_begin(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val, true)
// is not enabled, then this does nothing.
// - category and name strings must have application lifetime (statics or
// literals). They may not include " chars.
-#define TRACE_EVENT_END0(category, name) \
+#define CEF_TRACE_EVENT_END0(category, name) \
cef_trace_event_end(category, name, NULL, 0, NULL, 0, false)
-#define TRACE_EVENT_END1(category, name, arg1_name, arg1_val) \
+#define CEF_TRACE_EVENT_END1(category, name, arg1_name, arg1_val) \
cef_trace_event_end(category, name, arg1_name, arg1_val, NULL, 0, false)
-#define TRACE_EVENT_END2(category, name, arg1_name, arg1_val, \
+#define CEF_TRACE_EVENT_END2(category, name, arg1_name, arg1_val, \
arg2_name, arg2_val) \
cef_trace_event_end(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val, false)
-#define TRACE_EVENT_COPY_END0(category, name) \
+#define CEF_TRACE_EVENT_COPY_END0(category, name) \
cef_trace_event_end(category, name, NULL, 0, NULL, 0, true)
-#define TRACE_EVENT_COPY_END1(category, name, arg1_name, arg1_val) \
+#define CEF_TRACE_EVENT_COPY_END1(category, name, arg1_name, arg1_val) \
cef_trace_event_end(category, name, arg1_name, arg1_val, NULL, 0, true)
-#define TRACE_EVENT_COPY_END2(category, name, arg1_name, arg1_val, \
+#define CEF_TRACE_EVENT_COPY_END2(category, name, arg1_name, arg1_val, \
arg2_name, arg2_val) \
cef_trace_event_end(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val, true)
// must be representable as a 32 bit integer.
// - category and name strings must have application lifetime (statics or
// literals). They may not include " chars.
-#define TRACE_COUNTER1(category, name, value) \
+#define CEF_TRACE_COUNTER1(category, name, value) \
cef_trace_counter(category, name, NULL, value, NULL, 0, false)
-#define TRACE_COPY_COUNTER1(category, name, value) \
+#define CEF_TRACE_COPY_COUNTER1(category, name, value) \
cef_trace_counter(category, name, NULL, value, NULL, 0, true)
// Records the values of a multi-parted counter called "name" immediately.
// values as a stacked-bar chart.
// - category and name strings must have application lifetime (statics or
// literals). They may not include " chars.
-#define TRACE_COUNTER2(category, name, value1_name, value1_val, \
+#define CEF_TRACE_COUNTER2(category, name, value1_name, value1_val, \
value2_name, value2_val) \
cef_trace_counter(category, name, value1_name, value1_val, value2_name, \
value2_val, false)
-#define TRACE_COPY_COUNTER2(category, name, value1_name, value1_val, \
+#define CEF_TRACE_COPY_COUNTER2(category, name, value1_name, value1_val, \
value2_name, value2_val) \
cef_trace_counter(category, name, value1_name, value1_val, value2_name, \
value2_val, true)
// be a pointer or an integer value up to 64 bits. If it's a pointer, the
// bits will be xored with a hash of the process ID so that the same pointer
// on two different processes will not collide.
-#define TRACE_COUNTER_ID1(category, name, id, value) \
+#define CEF_TRACE_COUNTER_ID1(category, name, id, value) \
cef_trace_counter_id(category, name, id, NULL, value, NULL, 0, false)
-#define TRACE_COPY_COUNTER_ID1(category, name, id, value) \
+#define CEF_TRACE_COPY_COUNTER_ID1(category, name, id, value) \
cef_trace_counter_id(category, name, id, NULL, value, NULL, 0, true)
// Records the values of a multi-parted counter called "name" immediately.
// be a pointer or an integer value up to 64 bits. If it's a pointer, the
// bits will be xored with a hash of the process ID so that the same pointer
// on two different processes will not collide.
-#define TRACE_COUNTER_ID2(category, name, id, value1_name, value1_val, \
+#define CEF_TRACE_COUNTER_ID2(category, name, id, value1_name, value1_val, \
value2_name, value2_val) \
cef_trace_counter_id(category, name, id, value1_name, value1_val, \
value2_name, value2_val, false)
-#define TRACE_COPY_COUNTER_ID2(category, name, id, value1_name, \
+#define CEF_TRACE_COPY_COUNTER_ID2(category, name, id, value1_name, \
value1_val, value2_name, value2_val) \
cef_trace_counter_id(category, name, id, value1_name, value1_val, \
value2_name, value2_val, true)
// An async operation can span threads and processes, but all events in that
// operation must use the same |name| and |id|. Each event can have its own
// args.
-#define TRACE_EVENT_ASYNC_BEGIN0(category, name, id) \
+#define CEF_TRACE_EVENT_ASYNC_BEGIN0(category, name, id) \
cef_trace_event_async_begin(category, name, id, NULL, 0, NULL, 0, false)
-#define TRACE_EVENT_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \
+#define CEF_TRACE_EVENT_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \
cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, NULL, \
0, false)
-#define TRACE_EVENT_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \
+#define CEF_TRACE_EVENT_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \
arg2_name, arg2_val) \
cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, \
arg2_name, arg2_val, false)
-#define TRACE_EVENT_COPY_ASYNC_BEGIN0(category, name, id) \
+#define CEF_TRACE_EVENT_COPY_ASYNC_BEGIN0(category, name, id) \
cef_trace_event_async_begin(category, name, id, NULL, 0, NULL, 0, true)
-#define TRACE_EVENT_COPY_ASYNC_BEGIN1(category, name, id, arg1_name, \
+#define CEF_TRACE_EVENT_COPY_ASYNC_BEGIN1(category, name, id, arg1_name, \
arg1_val) \
cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, NULL, \
0, true)
-#define TRACE_EVENT_COPY_ASYNC_BEGIN2(category, name, id, arg1_name, \
+#define CEF_TRACE_EVENT_COPY_ASYNC_BEGIN2(category, name, id, arg1_name, \
arg1_val, arg2_name, arg2_val) \
cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, \
arg2_name, arg2_val, true)
// within the async event. This should be called at the beginning of the next
// phase of an asynchronous operation. The ASYNC_BEGIN event must not have any
// ASYNC_STEP_PAST events.
-#define TRACE_EVENT_ASYNC_STEP_INTO0(category, name, id, step) \
+#define CEF_TRACE_EVENT_ASYNC_STEP_INTO0(category, name, id, step) \
cef_trace_event_async_step_into(category, name, id, step, NULL, 0, false)
-#define TRACE_EVENT_ASYNC_STEP_INTO1(category, name, id, step, \
+#define CEF_TRACE_EVENT_ASYNC_STEP_INTO1(category, name, id, step, \
arg1_name, arg1_val) \
cef_trace_event_async_step_into(category, name, id, step, arg1_name, \
arg1_val, false)
-#define TRACE_EVENT_COPY_ASYNC_STEP_INTO0(category, name, id, step) \
+#define CEF_TRACE_EVENT_COPY_ASYNC_STEP_INTO0(category, name, id, step) \
cef_trace_event_async_step_into(category, name, id, step, NULL, 0, true)
-#define TRACE_EVENT_COPY_ASYNC_STEP_INTO1(category, name, id, step, \
+#define CEF_TRACE_EVENT_COPY_ASYNC_STEP_INTO1(category, name, id, step, \
arg1_name, arg1_val) \
cef_trace_event_async_step_into(category, name, id, step, arg1_name, \
arg1_val, true)
// within the async event. This should be called at the beginning of the next
// phase of an asynchronous operation. The ASYNC_BEGIN event must not have any
// ASYNC_STEP_INTO events.
-#define TRACE_EVENT_ASYNC_STEP_PAST0(category, name, id, step) \
+#define CEF_TRACE_EVENT_ASYNC_STEP_PAST0(category, name, id, step) \
cef_trace_event_async_step_past(category, name, id, step, NULL, 0, false)
-#define TRACE_EVENT_ASYNC_STEP_PAST1(category, name, id, step, \
+#define CEF_TRACE_EVENT_ASYNC_STEP_PAST1(category, name, id, step, \
arg1_name, arg1_val) \
cef_trace_event_async_step_past(category, name, id, step, arg1_name, \
arg1_val, false)
-#define TRACE_EVENT_COPY_ASYNC_STEP_PAST0(category, name, id, step) \
+#define CEF_TRACE_EVENT_COPY_ASYNC_STEP_PAST0(category, name, id, step) \
cef_trace_event_async_step_past(category, name, id, step, NULL, 0, true)
-#define TRACE_EVENT_COPY_ASYNC_STEP_PAST1(category, name, id, step, \
+#define CEF_TRACE_EVENT_COPY_ASYNC_STEP_PAST1(category, name, id, step, \
arg1_name, arg1_val) \
cef_trace_event_async_step_past(category, name, id, step, arg1_name, \
arg1_val, true)
// Records a single ASYNC_END event for "name" immediately. If the category
// is not enabled, then this does nothing.
-#define TRACE_EVENT_ASYNC_END0(category, name, id) \
+#define CEF_TRACE_EVENT_ASYNC_END0(category, name, id) \
cef_trace_event_async_end(category, name, id, NULL, 0, NULL, 0, false)
-#define TRACE_EVENT_ASYNC_END1(category, name, id, arg1_name, arg1_val) \
+#define CEF_TRACE_EVENT_ASYNC_END1(category, name, id, arg1_name, arg1_val) \
cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, NULL, 0, \
false)
-#define TRACE_EVENT_ASYNC_END2(category, name, id, arg1_name, arg1_val, \
+#define CEF_TRACE_EVENT_ASYNC_END2(category, name, id, arg1_name, arg1_val, \
arg2_name, arg2_val) \
cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, \
arg2_name, arg2_val, false)
-#define TRACE_EVENT_COPY_ASYNC_END0(category, name, id) \
+#define CEF_TRACE_EVENT_COPY_ASYNC_END0(category, name, id) \
cef_trace_event_async_end(category, name, id, NULL, 0, NULL, 0, true)
-#define TRACE_EVENT_COPY_ASYNC_END1(category, name, id, arg1_name, \
+#define CEF_TRACE_EVENT_COPY_ASYNC_END1(category, name, id, arg1_name, \
arg1_val) \
cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, NULL, 0, \
true)
-#define TRACE_EVENT_COPY_ASYNC_END2(category, name, id, arg1_name, \
+#define CEF_TRACE_EVENT_COPY_ASYNC_END2(category, name, id, arg1_name, \
arg1_val, arg2_name, arg2_val) \
cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, \
arg2_name, arg2_val, true)
-namespace cef_trace_event {
+namespace cef_trace_event_internal {
-// Used by TRACE_EVENTx macro. Do not use directly.
+// Used by CEF_TRACE_EVENTx macro. Do not use directly.
class CefTraceEndOnScopeClose {
public:
CefTraceEndOnScopeClose(const char* category, const char* name)
const char* name_;
};
-} // cef_trace_event
-
-#endif // !BUILDING_CEF_SHARED
+} // cef_trace_event_internal
-#endif // CEF_INCLUDE_BASE_CEF_TRACE_EVENT_H_
+#endif // CEF_INCLUDE_CEF_TRACE_EVENT_H_
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// tools directory for more information.
//
-#ifndef CEF_INCLUDE_CEF_FIND_HANDLER_H_
-#define CEF_INCLUDE_CEF_FIND_HANDLER_H_
+#ifndef CEF_INCLUDE_CEF_URL_H_
+#define CEF_INCLUDE_CEF_URL_H_
#pragma once
#include "include/cef_base.h"
-#include "include/cef_browser.h"
///
-// Implement this interface to handle events related to find results. The
-// methods of this class will be called on the UI thread.
+// Parse the specified |url| into its component parts.
+// Returns false if the URL is empty or invalid.
///
-/*--cef(source=client)--*/
-class CefFindHandler : public virtual CefBase {
- public:
- ///
- // Called to report find results returned by CefBrowserHost::Find().
- // |identifer| is the identifier passed to Find(), |count| is the number of
- // matches currently identified, |selectionRect| is the location of where the
- // match was found (in window coordinates), |activeMatchOrdinal| is the
- // current position in the search results, and |finalUpdate| is true if this
- // is the last find notification.
- ///
- /*--cef()--*/
- virtual void OnFindResult(CefRefPtr<CefBrowser> browser,
- int identifier,
- int count,
- const CefRect& selectionRect,
- int activeMatchOrdinal,
- bool finalUpdate) {}
-};
+/*--cef()--*/
+bool CefParseURL(const CefString& url,
+ CefURLParts& parts);
-#endif // CEF_INCLUDE_CEF_FIND_HANDLER_H_
+///
+// Creates a URL from the specified |parts|, which must contain a non-empty
+// spec or a non-empty host and path (at a minimum), but not both.
+// Returns false if |parts| isn't initialized as described.
+///
+/*--cef()--*/
+bool CefCreateURL(const CefURLParts& parts,
+ CefString& url);
+
+///
+// Returns the mime type for the specified file extension or an empty string if
+// unknown.
+///
+/*--cef()--*/
+CefString CefGetMimeType(const CefString& extension);
+
+#endif // CEF_INCLUDE_CEF_URL_H_
#include "include/cef_auth_callback.h"
#include "include/cef_base.h"
#include "include/cef_request.h"
-#include "include/cef_request_context.h"
#include "include/cef_response.h"
class CefURLRequestClient;
// would not normally be rendered then the response may receive special
// handling inside the browser (for example, via the file download code path
// instead of the URL request code path). The |request| object will be marked
- // as read-only after calling this method. In the browser process if
- // |request_context| is empty the global request context will be used. In the
- // render process |request_context| must be empty and the context associated
- // with the current renderer process' browser will be used.
+ // as read-only after calling this method.
///
- /*--cef(optional_param=request_context)--*/
+ /*--cef()--*/
static CefRefPtr<CefURLRequest> Create(
CefRefPtr<CefRequest> request,
- CefRefPtr<CefURLRequestClient> client,
- CefRefPtr<CefRequestContext> request_context);
+ CefRefPtr<CefURLRequestClient> client);
///
// Returns the request object used to create this URL request. The returned
///
/*--cef()--*/
virtual void OnUploadProgress(CefRefPtr<CefURLRequest> request,
- int64 current,
- int64 total) =0;
+ uint64 current,
+ uint64 total) =0;
///
// Notifies the client of download progress. |current| denotes the number of
///
/*--cef()--*/
virtual void OnDownloadProgress(CefRefPtr<CefURLRequest> request,
- int64 current,
- int64 total) =0;
+ uint64 current,
+ uint64 total) =0;
///
// Called when some part of the response is read. |data| contains the current
///
// Create a new CefV8Value object of type Date. This method should only be
- // called from within the scope of a CefRenderProcessHandler, CefV8Handler or
+ // called from within the scope of a CefV8ContextHandler, CefV8Handler or
// CefV8Accessor callback, or in combination with calling Enter() and Exit()
// on a stored CefV8Context reference.
///
///
// Create a new CefV8Value object of type object with optional accessor. This
// method should only be called from within the scope of a
- // CefRenderProcessHandler, CefV8Handler or CefV8Accessor callback, or in
+ // CefV8ContextHandler, CefV8Handler or CefV8Accessor callback, or in
// combination with calling Enter() and Exit() on a stored CefV8Context
// reference.
///
///
// Create a new CefV8Value object of type array with the specified |length|.
// If |length| is negative the returned array will have length 0. This method
- // should only be called from within the scope of a CefRenderProcessHandler,
+ // should only be called from within the scope of a CefV8ContextHandler,
// CefV8Handler or CefV8Accessor callback, or in combination with calling
// Enter() and Exit() on a stored CefV8Context reference.
///
///
// Create a new CefV8Value object of type function. This method should only be
- // called from within the scope of a CefRenderProcessHandler, CefV8Handler or
+ // called from within the scope of a CefV8ContextHandler, CefV8Handler or
// CefV8Accessor callback, or in combination with calling Enter() and Exit()
// on a stored CefV8Context reference.
///
#include <vector>
#include "include/cef_base.h"
-class CefBinaryValue;
class CefDictionaryValue;
class CefListValue;
typedef cef_value_type_t CefValueType;
-///
-// Class that wraps other data value types. Complex types (binary, dictionary
-// and list) will be referenced but not owned by this object. Can be used on any
-// process and thread.
-///
-/*--cef(source=library)--*/
-class CefValue : public virtual CefBase {
- public:
- ///
- // Creates a new object.
- ///
- /*--cef()--*/
- static CefRefPtr<CefValue> Create();
-
- ///
- // Returns true if the underlying data is valid. This will always be true for
- // simple types. For complex types (binary, dictionary and list) the
- // underlying data may become invalid if owned by another object (e.g. list or
- // dictionary) and that other object is then modified or destroyed. This value
- // object can be re-used by calling Set*() even if the underlying data is
- // invalid.
- ///
- /*--cef()--*/
- virtual bool IsValid() =0;
-
- ///
- // Returns true if the underlying data is owned by another object.
- ///
- /*--cef()--*/
- virtual bool IsOwned() =0;
-
- ///
- // Returns true if the underlying data is read-only. Some APIs may expose
- // read-only objects.
- ///
- /*--cef()--*/
- virtual bool IsReadOnly() =0;
-
- ///
- // Returns true if this object and |that| object have the same underlying
- // data. If true modifications to this object will also affect |that| object
- // and vice-versa.
- ///
- /*--cef()--*/
- virtual bool IsSame(CefRefPtr<CefValue> that) =0;
-
- ///
- // Returns true if this object and |that| object have an equivalent underlying
- // value but are not necessarily the same object.
- ///
- /*--cef()--*/
- virtual bool IsEqual(CefRefPtr<CefValue> that) =0;
-
- ///
- // Returns a copy of this object. The underlying data will also be copied.
- ///
- /*--cef()--*/
- virtual CefRefPtr<CefValue> Copy() =0;
-
- ///
- // Returns the underlying value type.
- ///
- /*--cef(default_retval=VTYPE_INVALID)--*/
- virtual CefValueType GetType() =0;
-
- ///
- // Returns the underlying value as type bool.
- ///
- /*--cef()--*/
- virtual bool GetBool() =0;
-
- ///
- // Returns the underlying value as type int.
- ///
- /*--cef()--*/
- virtual int GetInt() =0;
-
- ///
- // Returns the underlying value as type double.
- ///
- /*--cef()--*/
- virtual double GetDouble() =0;
-
- ///
- // Returns the underlying value as type string.
- ///
- /*--cef()--*/
- virtual CefString GetString() =0;
-
- ///
- // Returns the underlying value as type binary. The returned reference may
- // become invalid if the value is owned by another object or if ownership is
- // transferred to another object in the future. To maintain a reference to
- // the value after assigning ownership to a dictionary or list pass this
- // object to the SetValue() method instead of passing the returned reference
- // to SetBinary().
- ///
- /*--cef()--*/
- virtual CefRefPtr<CefBinaryValue> GetBinary() =0;
-
- ///
- // Returns the underlying value as type dictionary. The returned reference may
- // become invalid if the value is owned by another object or if ownership is
- // transferred to another object in the future. To maintain a reference to
- // the value after assigning ownership to a dictionary or list pass this
- // object to the SetValue() method instead of passing the returned reference
- // to SetDictionary().
- ///
- /*--cef()--*/
- virtual CefRefPtr<CefDictionaryValue> GetDictionary() =0;
-
- ///
- // Returns the underlying value as type list. The returned reference may
- // become invalid if the value is owned by another object or if ownership is
- // transferred to another object in the future. To maintain a reference to
- // the value after assigning ownership to a dictionary or list pass this
- // object to the SetValue() method instead of passing the returned reference
- // to SetList().
- ///
- /*--cef()--*/
- virtual CefRefPtr<CefListValue> GetList() =0;
-
- ///
- // Sets the underlying value as type null. Returns true if the value was set
- // successfully.
- ///
- /*--cef()--*/
- virtual bool SetNull() =0;
-
- ///
- // Sets the underlying value as type bool. Returns true if the value was set
- // successfully.
- ///
- /*--cef()--*/
- virtual bool SetBool(bool value) =0;
-
- ///
- // Sets the underlying value as type int. Returns true if the value was set
- // successfully.
- ///
- /*--cef()--*/
- virtual bool SetInt(int value) =0;
-
- ///
- // Sets the underlying value as type double. Returns true if the value was set
- // successfully.
- ///
- /*--cef()--*/
- virtual bool SetDouble(double value) =0;
-
- ///
- // Sets the underlying value as type string. Returns true if the value was set
- // successfully.
- ///
- /*--cef(optional_param=value)--*/
- virtual bool SetString(const CefString& value) =0;
-
- ///
- // Sets the underlying value as type binary. Returns true if the value was set
- // successfully. This object keeps a reference to |value| and ownership of the
- // underlying data remains unchanged.
- ///
- /*--cef()--*/
- virtual bool SetBinary(CefRefPtr<CefBinaryValue> value) =0;
-
- ///
- // Sets the underlying value as type dict. Returns true if the value was set
- // successfully. This object keeps a reference to |value| and ownership of the
- // underlying data remains unchanged.
- ///
- /*--cef()--*/
- virtual bool SetDictionary(CefRefPtr<CefDictionaryValue> value) =0;
-
- ///
- // Sets the underlying value as type list. Returns true if the value was set
- // successfully. This object keeps a reference to |value| and ownership of the
- // underlying data remains unchanged.
- ///
- /*--cef()--*/
- virtual bool SetList(CefRefPtr<CefListValue> value) =0;
-};
-
-
///
// Class representing a binary value. Can be used on any process and thread.
///
size_t data_size);
///
- // Returns true if this object is valid. This object may become invalid if
- // the underlying data is owned by another object (e.g. list or dictionary)
- // and that other object is then modified or destroyed. Do not call any other
- // methods if this method returns false.
+ // Returns true if this object is valid. Do not call any other methods if this
+ // method returns false.
///
/*--cef()--*/
virtual bool IsValid() =0;
/*--cef()--*/
virtual bool IsOwned() =0;
- ///
- // Returns true if this object and |that| object have the same underlying
- // data.
- ///
- /*--cef()--*/
- virtual bool IsSame(CefRefPtr<CefBinaryValue> that) =0;
-
- ///
- // Returns true if this object and |that| object have an equivalent underlying
- // value but are not necessarily the same object.
- ///
- /*--cef()--*/
- virtual bool IsEqual(CefRefPtr<CefBinaryValue> that) =0;
-
///
// Returns a copy of this object. The data in this object will also be copied.
///
static CefRefPtr<CefDictionaryValue> Create();
///
- // Returns true if this object is valid. This object may become invalid if
- // the underlying data is owned by another object (e.g. list or dictionary)
- // and that other object is then modified or destroyed. Do not call any other
- // methods if this method returns false.
+ // Returns true if this object is valid. Do not call any other methods if this
+ // method returns false.
///
/*--cef()--*/
virtual bool IsValid() =0;
/*--cef()--*/
virtual bool IsReadOnly() =0;
- ///
- // Returns true if this object and |that| object have the same underlying
- // data. If true modifications to this object will also affect |that| object
- // and vice-versa.
- ///
- /*--cef()--*/
- virtual bool IsSame(CefRefPtr<CefDictionaryValue> that) =0;
-
- ///
- // Returns true if this object and |that| object have an equivalent underlying
- // value but are not necessarily the same object.
- ///
- /*--cef()--*/
- virtual bool IsEqual(CefRefPtr<CefDictionaryValue> that) =0;
-
///
// Returns a writable copy of this object. If |exclude_empty_children| is true
// any empty dictionaries or lists will be excluded from the copy.
/*--cef(default_retval=VTYPE_INVALID)--*/
virtual CefValueType GetType(const CefString& key) =0;
- ///
- // Returns the value at the specified key. For simple types the returned
- // value will copy existing data and modifications to the value will not
- // modify this object. For complex types (binary, dictionary and list) the
- // returned value will reference existing data and modifications to the value
- // will modify this object.
- ///
- /*--cef()--*/
- virtual CefRefPtr<CefValue> GetValue(const CefString& key) =0;
-
///
// Returns the value at the specified key as type bool.
///
virtual CefString GetString(const CefString& key) =0;
///
- // Returns the value at the specified key as type binary. The returned
- // value will reference existing data.
+ // Returns the value at the specified key as type binary.
///
/*--cef()--*/
virtual CefRefPtr<CefBinaryValue> GetBinary(const CefString& key) =0;
///
- // Returns the value at the specified key as type dictionary. The returned
- // value will reference existing data and modifications to the value will
- // modify this object.
+ // Returns the value at the specified key as type dictionary.
///
/*--cef()--*/
virtual CefRefPtr<CefDictionaryValue> GetDictionary(const CefString& key) =0;
///
- // Returns the value at the specified key as type list. The returned value
- // will reference existing data and modifications to the value will modify
- // this object.
+ // Returns the value at the specified key as type list.
///
/*--cef()--*/
virtual CefRefPtr<CefListValue> GetList(const CefString& key) =0;
- ///
- // Sets the value at the specified key. Returns true if the value was set
- // successfully. If |value| represents simple data then the underlying data
- // will be copied and modifications to |value| will not modify this object. If
- // |value| represents complex data (binary, dictionary or list) then the
- // underlying data will be referenced and modifications to |value| will modify
- // this object.
- ///
- /*--cef()--*/
- virtual bool SetValue(const CefString& key, CefRefPtr<CefValue> value) =0;
-
///
// Sets the value at the specified key as type null. Returns true if the
// value was set successfully.
///
// Sets the value at the specified key as type dict. Returns true if the
- // value was set successfully. If |value| is currently owned by another object
+ // value was set successfully. After calling this method the |value| object
+ // will no longer be valid. If |value| is currently owned by another object
// then the value will be copied and the |value| reference will not change.
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
///
// Sets the value at the specified key as type list. Returns true if the
- // value was set successfully. If |value| is currently owned by another object
+ // value was set successfully. After calling this method the |value| object
+ // will no longer be valid. If |value| is currently owned by another object
// then the value will be copied and the |value| reference will not change.
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
static CefRefPtr<CefListValue> Create();
///
- // Returns true if this object is valid. This object may become invalid if
- // the underlying data is owned by another object (e.g. list or dictionary)
- // and that other object is then modified or destroyed. Do not call any other
- // methods if this method returns false.
+ // Returns true if this object is valid. Do not call any other methods if this
+ // method returns false.
///
/*--cef()--*/
virtual bool IsValid() =0;
/*--cef()--*/
virtual bool IsReadOnly() =0;
- ///
- // Returns true if this object and |that| object have the same underlying
- // data. If true modifications to this object will also affect |that| object
- // and vice-versa.
- ///
- /*--cef()--*/
- virtual bool IsSame(CefRefPtr<CefListValue> that) =0;
-
- ///
- // Returns true if this object and |that| object have an equivalent underlying
- // value but are not necessarily the same object.
- ///
- /*--cef()--*/
- virtual bool IsEqual(CefRefPtr<CefListValue> that) =0;
-
///
// Returns a writable copy of this object.
///
/*--cef(default_retval=VTYPE_INVALID,index_param=index)--*/
virtual CefValueType GetType(int index) =0;
- ///
- // Returns the value at the specified index. For simple types the returned
- // value will copy existing data and modifications to the value will not
- // modify this object. For complex types (binary, dictionary and list) the
- // returned value will reference existing data and modifications to the value
- // will modify this object.
- ///
- /*--cef(index_param=index)--*/
- virtual CefRefPtr<CefValue> GetValue(int index) =0;
-
///
// Returns the value at the specified index as type bool.
///
virtual CefString GetString(int index) =0;
///
- // Returns the value at the specified index as type binary. The returned
- // value will reference existing data.
+ // Returns the value at the specified index as type binary.
///
/*--cef(index_param=index)--*/
virtual CefRefPtr<CefBinaryValue> GetBinary(int index) =0;
///
- // Returns the value at the specified index as type dictionary. The returned
- // value will reference existing data and modifications to the value will
- // modify this object.
+ // Returns the value at the specified index as type dictionary.
///
/*--cef(index_param=index)--*/
virtual CefRefPtr<CefDictionaryValue> GetDictionary(int index) =0;
///
- // Returns the value at the specified index as type list. The returned
- // value will reference existing data and modifications to the value will
- // modify this object.
+ // Returns the value at the specified index as type list.
///
/*--cef(index_param=index)--*/
virtual CefRefPtr<CefListValue> GetList(int index) =0;
- ///
- // Sets the value at the specified index. Returns true if the value was set
- // successfully. If |value| represents simple data then the underlying data
- // will be copied and modifications to |value| will not modify this object. If
- // |value| represents complex data (binary, dictionary or list) then the
- // underlying data will be referenced and modifications to |value| will modify
- // this object.
- ///
- /*--cef(index_param=index)--*/
- virtual bool SetValue(int index, CefRefPtr<CefValue> value) =0;
-
///
// Sets the value at the specified index as type null. Returns true if the
// value was set successfully.
///
// Sets the value at the specified index as type binary. Returns true if the
- // value was set successfully. If |value| is currently owned by another object
+ // value was set successfully. After calling this method the |value| object
+ // will no longer be valid. If |value| is currently owned by another object
// then the value will be copied and the |value| reference will not change.
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
///
// Sets the value at the specified index as type dict. Returns true if the
- // value was set successfully. If |value| is currently owned by another object
+ // value was set successfully. After calling this method the |value| object
+ // will no longer be valid. If |value| is currently owned by another object
// then the value will be copied and the |value| reference will not change.
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
///
// Sets the value at the specified index as type list. Returns true if the
- // value was set successfully. If |value| is currently owned by another object
+ // value was set successfully. After calling this method the |value| object
+ // will no longer be valid. If |value| is currently owned by another object
// then the value will be copied and the |value| reference will not change.
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
-// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
#ifndef CEF_INCLUDE_CEF_VERSION_H_
#define CEF_INCLUDE_CEF_VERSION_H_
-#define CEF_VERSION "3.2378.1268.g4715a16"
#define CEF_VERSION_MAJOR 3
-#define CEF_COMMIT_NUMBER 1268
-#define CEF_COMMIT_HASH "4715a1644e292e191d3840b59a74f821be91daec"
-#define COPYRIGHT_YEAR 2015
+#define CEF_REVISION 1805
+#define COPYRIGHT_YEAR 2014
-#define CHROME_VERSION_MAJOR 44
+#define CHROME_VERSION_MAJOR 33
#define CHROME_VERSION_MINOR 0
-#define CHROME_VERSION_BUILD 2378
-#define CHROME_VERSION_PATCH 0
+#define CHROME_VERSION_BUILD 1750
+#define CHROME_VERSION_PATCH 170
#define DO_MAKE_STRING(p) #p
#define MAKE_STRING(p) DO_MAKE_STRING(p)
#ifndef APSTUDIO_HIDDEN_SYMBOLS
-#include "include/internal/cef_export.h"
-
#ifdef __cplusplus
extern "C" {
#endif
+#include "internal/cef_export.h"
+
// The API hash is created by analyzing CEF header files for C API type
// definitions. The hash value will change when header files are modified
// in a way that may cause binary incompatibility with other builds. The
// universal hash value will change if any platform is affected whereas the
// platform hash values will change only if that particular platform is
// affected.
-#define CEF_API_HASH_UNIVERSAL "2b3193123e3383250ab2063849efe7db537bd4c1"
+#define CEF_API_HASH_UNIVERSAL "97238e85785c70a4f1c5e3eec6f67fcbef2df89e"
#if defined(OS_WIN)
-#define CEF_API_HASH_PLATFORM "27c1156f5f9b4d4271ec2e146a1e10fb47a01712"
+#define CEF_API_HASH_PLATFORM "2a84f1539871434274323d2d6742545820a42dfe"
#elif defined(OS_MACOSX)
-#define CEF_API_HASH_PLATFORM "f6e8bce3f2a055cb80402692d500986607463e32"
+#define CEF_API_HASH_PLATFORM "7b1d9369d55ee8a12a7a848e3b82c4f8e5429632"
#elif defined(OS_LINUX)
-#define CEF_API_HASH_PLATFORM "e50a8044ea7deea0578a41f602f412826eb0ea0a"
+#define CEF_API_HASH_PLATFORM "c8fdbd5a5eea66912e3741daecaebbeba90d552f"
#endif
+///
+// Returns the CEF build revision for the libcef library.
+///
+CEF_EXPORT int cef_build_revision();
+
+///
// Returns CEF version information for the libcef library. The |entry|
// parameter describes which version component will be returned:
// 0 - CEF_VERSION_MAJOR
-// 1 - CEF_COMMIT_NUMBER
+// 1 - CEF_REVISION
// 2 - CHROME_VERSION_MAJOR
// 3 - CHROME_VERSION_MINOR
// 4 - CHROME_VERSION_BUILD
// hash value will be returned:
// 0 - CEF_API_HASH_PLATFORM
// 1 - CEF_API_HASH_UNIVERSAL
-// 2 - CEF_COMMIT_HASH
///
CEF_EXPORT const char* cef_api_hash(int entry);
--- /dev/null
+// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the name Chromium Embedded
+// Framework nor the names of its contributors may be used to endorse
+// or promote products derived from this software without specific prior
+// written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+#ifndef CEF_INCLUDE_INTERNAL_CEF_BUILD_H_
+#define CEF_INCLUDE_INTERNAL_CEF_BUILD_H_
+#pragma once
+
+#if defined(BUILDING_CEF_SHARED)
+
+#include "base/compiler_specific.h"
+
+#else // !BUILDING_CEF_SHARED
+
+#if defined(_WIN32)
+#ifndef OS_WIN
+#define OS_WIN 1
+#endif
+#elif defined(__APPLE__)
+#ifndef OS_MACOSX
+#define OS_MACOSX 1
+#endif
+#elif defined(__linux__)
+#ifndef OS_LINUX
+#define OS_LINUX 1
+#endif
+#else
+#error Please add support for your platform in cef_build.h
+#endif
+
+// For access to standard POSIXish features, use OS_POSIX instead of a
+// more specific macro.
+#if defined(OS_MACOSX) || defined(OS_LINUX)
+#ifndef OS_POSIX
+#define OS_POSIX 1
+#endif
+#endif
+
+// Compiler detection.
+#if defined(__GNUC__)
+#ifndef COMPILER_GCC
+#define COMPILER_GCC 1
+#endif
+#elif defined(_MSC_VER)
+#ifndef COMPILER_MSVC
+#define COMPILER_MSVC 1
+#endif
+#else
+#error Please add support for your compiler in cef_build.h
+#endif
+
+// Annotate a virtual method indicating it must be overriding a virtual
+// method in the parent class.
+// Use like:
+// virtual void foo() OVERRIDE;
+#ifndef OVERRIDE
+#if defined(COMPILER_MSVC)
+#define OVERRIDE override
+#elif defined(__clang__)
+#define OVERRIDE override
+#else
+#define OVERRIDE
+#endif
+#endif
+
+#ifndef ALLOW_THIS_IN_INITIALIZER_LIST
+#if defined(COMPILER_MSVC)
+
+// MSVC_PUSH_DISABLE_WARNING pushes |n| onto a stack of warnings to be disabled.
+// The warning remains disabled until popped by MSVC_POP_WARNING.
+#define MSVC_PUSH_DISABLE_WARNING(n) __pragma(warning(push)) \
+ __pragma(warning(disable:n))
+
+// MSVC_PUSH_WARNING_LEVEL pushes |n| as the global warning level. The level
+// remains in effect until popped by MSVC_POP_WARNING(). Use 0 to disable all
+// warnings.
+#define MSVC_PUSH_WARNING_LEVEL(n) __pragma(warning(push, n))
+
+// Pop effects of innermost MSVC_PUSH_* macro.
+#define MSVC_POP_WARNING() __pragma(warning(pop))
+
+// Allows |this| to be passed as an argument in constructor initializer lists.
+// This uses push/pop instead of the seemingly simpler suppress feature to avoid
+// having the warning be disabled for more than just |code|.
+//
+// Example usage:
+// Foo::Foo() : x(NULL), ALLOW_THIS_IN_INITIALIZER_LIST(y(this)), z(3) {}
+//
+// Compiler warning C4355: 'this': used in base member initializer list:
+// http://msdn.microsoft.com/en-us/library/3c594ae3(VS.80).aspx
+#define ALLOW_THIS_IN_INITIALIZER_LIST(code) MSVC_PUSH_DISABLE_WARNING(4355) \
+ code \
+ MSVC_POP_WARNING()
+#else // !COMPILER_MSVC
+
+#define ALLOW_THIS_IN_INITIALIZER_LIST(code) code
+
+#endif // !COMPILER_MSVC
+#endif
+
+#endif // !BUILDING_CEF_SHARED
+
+#endif // CEF_INCLUDE_INTERNAL_CEF_BUILD_H_
#define CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_
#pragma once
-#include "include/base/cef_build.h"
+#include "include/internal/cef_build.h"
#if defined(COMPILER_MSVC)
-// Copyright (c) 2008 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2010 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef CEF_INCLUDE_INTERNAL_CEF_WIN_H_
-#define CEF_INCLUDE_INTERNAL_CEF_WIN_H_
+#ifndef CEF_INCLUDE_INTERNAL_CEF_LINUX_H_
+#define CEF_INCLUDE_INTERNAL_CEF_LINUX_H_
#pragma once
-#include "include/internal/cef_types_win.h"
+#if defined(OS_LINUX)
+#include <pthread.h>
+#include "include/internal/cef_types_linux.h"
#include "include/internal/cef_types_wrappers.h"
-///
+// Atomic increment and decrement.
+inline long CefAtomicIncrement(long volatile *pDest) { // NOLINT(runtime/int)
+ return __sync_add_and_fetch(pDest, 1);
+}
+inline long CefAtomicDecrement(long volatile *pDest) { // NOLINT(runtime/int)
+ return __sync_sub_and_fetch(pDest, 1);
+}
+
+// Critical section wrapper.
+class CefCriticalSection {
+ public:
+ CefCriticalSection() {
+ pthread_mutexattr_init(&attr_);
+ pthread_mutexattr_settype(&attr_, PTHREAD_MUTEX_RECURSIVE);
+ pthread_mutex_init(&lock_, &attr_);
+ }
+ virtual ~CefCriticalSection() {
+ pthread_mutex_destroy(&lock_);
+ pthread_mutexattr_destroy(&attr_);
+ }
+ void Lock() {
+ pthread_mutex_lock(&lock_);
+ }
+ void Unlock() {
+ pthread_mutex_unlock(&lock_);
+ }
+
+ pthread_mutex_t lock_;
+ pthread_mutexattr_t attr_;
+};
+
// Handle types.
-///
#define CefCursorHandle cef_cursor_handle_t
#define CefEventHandle cef_event_handle_t
#define CefWindowHandle cef_window_handle_t
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
- target->instance = src->instance;
+ target->argc = src->argc;
+ target->argv = src->argv;
}
};
CefMainArgs() : parent() {}
explicit CefMainArgs(const cef_main_args_t& r) : parent(r) {}
explicit CefMainArgs(const CefMainArgs& r) : parent(r) {}
- explicit CefMainArgs(HINSTANCE hInstance) : parent() {
- instance = hInstance;
+ CefMainArgs(int argc_arg, char** argv_arg) : parent() {
+ argc = argc_arg;
+ argv = argv_arg;
}
};
typedef cef_window_info_t struct_type;
static inline void init(struct_type* s) {}
-
- static inline void clear(struct_type* s) {
- cef_string_clear(&s->window_name);
- }
+ static inline void clear(struct_type* s) {}
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
- target->ex_style = src->ex_style;
- cef_string_set(src->window_name.str, src->window_name.length,
- &target->window_name, copy);
- target->style = src->style;
- target->x = src->x;
- target->y = src->y;
- target->width = src->width;
- target->height = src->height;
- target->parent_window = src->parent_window;
- target->menu = src->menu;
- target->transparent_painting_enabled = src->transparent_painting_enabled;
- target->windowless_rendering_enabled = src->windowless_rendering_enabled;
- target->window = src->window;
+ target->parent_widget = src->parent_widget;
+ target->window_rendering_disabled = src->window_rendering_disabled;
+ target->transparent_painting = src->transparent_painting;
+ target->widget = src->widget;
}
};
-///
// Class representing window information.
-///
class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
public:
typedef CefStructBase<CefWindowInfoTraits> parent;
explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {}
explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {}
- ///
- // Create the browser as a child window.
- ///
- void SetAsChild(CefWindowHandle parent, RECT windowRect) {
- style = WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_TABSTOP |
- WS_VISIBLE;
- parent_window = parent;
- x = windowRect.left;
- y = windowRect.top;
- width = windowRect.right - windowRect.left;
- height = windowRect.bottom - windowRect.top;
+ void SetAsChild(CefWindowHandle ParentWidget) {
+ parent_widget = ParentWidget;
}
- ///
- // Create the browser as a popup window.
- ///
- void SetAsPopup(CefWindowHandle parent, const CefString& windowName) {
- style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS |
- WS_VISIBLE;
- parent_window = parent;
- x = CW_USEDEFAULT;
- y = CW_USEDEFAULT;
- width = CW_USEDEFAULT;
- height = CW_USEDEFAULT;
-
- cef_string_copy(windowName.c_str(), windowName.length(), &window_name);
+ void SetTransparentPainting(bool transparentPainting) {
+ transparent_painting = transparentPainting;
}
- ///
- // Create the browser using windowless (off-screen) rendering. No window
- // will be created for the browser and all rendering will occur via the
- // CefRenderHandler interface. The |parent| value will be used to identify
- // monitor info and to act as the parent window for dialogs, context menus,
- // etc. If |parent| is not provided then the main screen monitor will be used
- // and some functionality that requires a parent window may not function
- // correctly. If |transparent| is true a transparent background color will be
- // used (RGBA=0x00000000). If |transparent| is false the background will be
- // white and opaque. In order to create windowless browsers the
- // CefSettings.windowless_rendering_enabled value must be set to true.
- ///
- void SetAsWindowless(CefWindowHandle parent, bool transparent) {
- windowless_rendering_enabled = TRUE;
- parent_window = parent;
- transparent_painting_enabled = transparent;
+ void SetAsOffScreen(CefWindowHandle ParentWidget) {
+ window_rendering_disabled = true;
+ parent_widget = ParentWidget;
}
};
-#endif // CEF_INCLUDE_INTERNAL_CEF_WIN_H_
+#endif // OS_LINUX
+
+#endif // CEF_INCLUDE_INTERNAL_CEF_LINUX_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef CEF_INCLUDE_INTERNAL_CEF_LOGGING_INTERNAL_H_
-#define CEF_INCLUDE_INTERNAL_CEF_LOGGING_INTERNAL_H_
-#pragma once
-
-#include "include/internal/cef_export.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// See include/base/cef_logging.h for macros and intended usage.
-
-///
-// Gets the current log level.
-///
-CEF_EXPORT int cef_get_min_log_level();
-
-///
-// Gets the current vlog level for the given file (usually taken from
-// __FILE__). Note that |N| is the size *with* the null terminator.
-///
-CEF_EXPORT int cef_get_vlog_level(const char* file_start, size_t N);
-
-///
-// Add a log message. See the LogSeverity defines for supported |severity|
-// values.
-///
-CEF_EXPORT void cef_log(const char* file,
- int line,
- int severity,
- const char* message);
-
-#ifdef __cplusplus
-}
-#endif // __cplusplus
-
-#endif // CEF_INCLUDE_INTERNAL_CEF_LOGGING_INTERNAL_H_
-// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
+// Copyright (c) 2008 Marshall A. Greenblatt. Portions Copyright (c)
+// 2006-2008 Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
#define CEF_INCLUDE_INTERNAL_CEF_PTR_H_
#pragma once
-#include "include/base/cef_ref_counted.h"
+#include <stddef.h>
///
-// Smart pointer implementation that is an alias of scoped_refptr from
-// include/base/cef_ref_counted.h.
+// Smart pointer implementation borrowed from base/ref_counted.h
// <p>
// A smart pointer class for reference counted objects. Use this class instead
// of calling AddRef and Release manually on a reference counted object to
// </p>
///
template <class T>
-class CefRefPtr : public scoped_refptr<T> {
+class CefRefPtr {
public:
- typedef scoped_refptr<T> parent;
+ CefRefPtr() : ptr_(NULL) {
+ }
- CefRefPtr() : parent() {}
+ CefRefPtr(T* p) : ptr_(p) { // NOLINT(runtime/explicit)
+ if (ptr_)
+ ptr_->AddRef();
+ }
- CefRefPtr(T* p) : parent(p) {}
+ CefRefPtr(const CefRefPtr<T>& r) : ptr_(r.ptr_) {
+ if (ptr_)
+ ptr_->AddRef();
+ }
- CefRefPtr(const scoped_refptr<T>& r) : parent(r) {}
+ ~CefRefPtr() {
+ if (ptr_)
+ ptr_->Release();
+ }
- template <typename U>
- CefRefPtr(const scoped_refptr<U>& r) : parent(r) {}
+ T* get() const { return ptr_; }
+ operator T*() const { return ptr_; }
+ T* operator->() const { return ptr_; }
+
+ CefRefPtr<T>& operator=(T* p) {
+ // AddRef first so that self assignment should work
+ if (p)
+ p->AddRef();
+ if (ptr_ )
+ ptr_ ->Release();
+ ptr_ = p;
+ return *this;
+ }
+
+ CefRefPtr<T>& operator=(const CefRefPtr<T>& r) {
+ return *this = r.ptr_;
+ }
+
+ void swap(T** pp) {
+ T* p = ptr_;
+ ptr_ = *pp;
+ *pp = p;
+ }
+
+ void swap(CefRefPtr<T>& r) {
+ swap(&r.ptr_); // NOLINT(build/include_what_you_use)
+ }
+
+ private:
+ T* ptr_;
};
#endif // CEF_INCLUDE_INTERNAL_CEF_PTR_H_
// modification. It is the user's responsibility to provide synchronization if
// modifying CEF strings from multiple threads.
-#include <stddef.h>
-
-#include "include/base/cef_build.h"
-#include "include/internal/cef_export.h"
-
#ifdef __cplusplus
extern "C" {
#endif
+#include "include/internal/cef_build.h"
+#include "include/internal/cef_export.h"
+#include <stddef.h>
+
// CEF character type definitions. wchar_t is 2 bytes on Windows and 4 bytes on
// most other platforms.
#include <memory.h>
#include <string>
-
-#include "include/base/cef_string16.h"
#include "include/internal/cef_string_types.h"
+#ifdef BUILDING_CEF_SHARED
+#include "base/strings/string16.h"
+#endif
+
+
///
// Traits implementation for wide character strings.
///
return cef_string_wide_set(str.c_str(), str.length(), s, true) ?
true : false;
}
+#if defined(BUILDING_CEF_SHARED)
#if defined(WCHAR_T_IS_UTF32)
static inline base::string16 to_string16(const struct_type *s) {
cef_string_utf16_t cstr;
true : false;
}
#endif // WCHAR_T_IS_UTF32
+#endif // BUILDING_CEF_SHARED
};
///
static inline bool from_wstring(const std::wstring& str, struct_type* s) {
return cef_string_wide_to_utf8(str.c_str(), str.length(), s) ? true : false;
}
+#if defined(BUILDING_CEF_SHARED)
static inline base::string16 to_string16(const struct_type* s) {
cef_string_utf16_t cstr;
memset(&cstr, 0, sizeof(cstr));
return cef_string_utf16_to_utf8(str.c_str(), str.length(), s) ?
true : false;
}
+#endif // BUILDING_CEF_SHARED
};
///
true : false;
}
#endif // WCHAR_T_IS_UTF32
+#if defined(BUILDING_CEF_SHARED)
static inline base::string16 to_string16(const struct_type* s) {
return base::string16(s->str, s->length);
}
return cef_string_utf16_set(str.c_str(), str.length(), s, true) ?
true : false;
}
+#endif // BUILDING_CEF_SHARED
};
///
FromWString(std::wstring(src));
}
-#if defined(WCHAR_T_IS_UTF32)
+#if (defined(BUILDING_CEF_SHARED) && defined(WCHAR_T_IS_UTF32))
///
// Create a new string from an existing string16. Data will be always
// copied. Translation will occur if necessary based on the underlying string
if (src)
FromString16(base::string16(src));
}
-#endif // WCHAR_T_IS_UTF32
+#endif // BUILDING_CEF_SHARED && WCHAR_T_IS_UTF32
///
// Create a new string from an existing character array. If |copy| is true
AllocIfNeeded();
return traits::from_wstring(str, string_);
}
-
+#if defined(BUILDING_CEF_SHARED)
///
// Return this string's data as a string16. Translation will occur if
// necessary based on the underlying string type.
AllocIfNeeded();
return traits::from_string16(str, string_);
}
+#endif // BUILDING_CEF_SHARED
///
// Comparison operator overloads.
FromWString(std::wstring(str));
return *this;
}
-#if defined(WCHAR_T_IS_UTF32)
+#if (defined(BUILDING_CEF_SHARED) && defined(WCHAR_T_IS_UTF32))
operator base::string16() const {
return ToString16();
}
FromString16(base::string16(str));
return *this;
}
-#endif // WCHAR_T_IS_UTF32
+#endif // BUILDING_CEF_SHARED && WCHAR_T_IS_UTF32
private:
// Allocate the string structure if it doesn't already exist.
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef CEF_INCLUDE_INTERNAL_CEF_TRACE_EVENT_INTERNAL_H_
-#define CEF_INCLUDE_INTERNAL_CEF_TRACE_EVENT_INTERNAL_H_
-#pragma once
-
-#include "include/internal/cef_export.h"
-#include "include/internal/cef_types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// See include/base/cef_trace_event.h for macros and intended usage.
-
-// Functions for tracing counters and functions; called from macros.
-// - |category| string must have application lifetime (static or literal). They
-// may not include "(quotes) chars.
-// - |argX_name|, |argX_val|, |valueX_name|, |valeX_val| are optional parameters
-// and represent pairs of name and values of arguments
-// - |copy| is used to avoid memory scoping issues with the |name| and
-// |arg_name| parameters by copying them
-// - |id| is used to disambiguate counters with the same name, or match async
-// trace events
-
-CEF_EXPORT void cef_trace_event_instant(const char* category,
- const char* name,
- const char* arg1_name,
- uint64 arg1_val,
- const char* arg2_name,
- uint64 arg2_val,
- int copy);
-CEF_EXPORT void cef_trace_event_begin(const char* category,
- const char* name,
- const char* arg1_name,
- uint64 arg1_val,
- const char* arg2_name,
- uint64 arg2_val,
- int copy);
-CEF_EXPORT void cef_trace_event_end(const char* category,
- const char* name,
- const char* arg1_name,
- uint64 arg1_val,
- const char* arg2_name,
- uint64 arg2_val,
- int copy);
-CEF_EXPORT void cef_trace_counter(const char* category,
- const char* name,
- const char* value1_name,
- uint64 value1_val,
- const char* value2_name,
- uint64 value2_val,
- int copy);
-CEF_EXPORT void cef_trace_counter_id(const char* category,
- const char* name,
- uint64 id,
- const char* value1_name,
- uint64 value1_val,
- const char* value2_name,
- uint64 value2_val,
- int copy);
-CEF_EXPORT void cef_trace_event_async_begin(const char* category,
- const char* name,
- uint64 id,
- const char* arg1_name,
- uint64 arg1_val,
- const char* arg2_name,
- uint64 arg2_val,
- int copy);
-CEF_EXPORT void cef_trace_event_async_step_into(const char* category,
- const char* name,
- uint64 id,
- uint64 step,
- const char* arg1_name,
- uint64 arg1_val,
- int copy);
-CEF_EXPORT void cef_trace_event_async_step_past(const char* category,
- const char* name,
- uint64 id,
- uint64 step,
- const char* arg1_name,
- uint64 arg1_val,
- int copy);
-CEF_EXPORT void cef_trace_event_async_end(const char* category,
- const char* name,
- uint64 id,
- const char* arg1_name,
- uint64 arg1_val,
- const char* arg2_name,
- uint64 arg2_val,
- int copy);
-
-#ifdef __cplusplus
-}
-#endif // __cplusplus
-
-#endif // CEF_INCLUDE_INTERNAL_CEF_TRACE_EVENT_INTERNAL_H_
-// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011
-// Google Inc. All rights reserved.
+// Copyright (c) 2006-2011 Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The contents of this file are identical to base/tuple.h
// A Tuple is a generic templatized container, similar in concept to std::pair.
// There are classes Tuple0 to Tuple6, cooresponding to the number of elements
// DispatchToMethod(&foo, &Foo::SomeMeth, MakeTuple(1, 2, 3));
// // foo->SomeMeth(1, 2, 3);
-#ifndef CEF_INCLUDE_BASE_CEF_TUPLE_H_
-#define CEF_INCLUDE_BASE_CEF_TUPLE_H_
+#ifndef CEF_INCLUDE_INTERNAL_CEF_TUPLE_H_
+#define CEF_INCLUDE_INTERNAL_CEF_TUPLE_H_
#pragma once
-#if defined(BASE_TUPLE_H__)
-// The Chromium header has already been included.
-// This can happen in cases where Chromium code is used directly by the
-// client application. When using Chromium code directly always include
-// the Chromium header first to avoid type conflicts.
-
-// For legacy compatibility, we name the first 8 tuple elements "a", "b", ...
-// TODO(cef): Remove this code when cef_runnable.h is deleted.
-
-#define DEFINE_TUPLE_LEAF(N, x) \
- template <typename T> \
- struct TupleLeaf<N, T> { \
- TupleLeaf() {} \
- explicit TupleLeaf(typename TupleTraits<T>::ParamType x) : x(x) {} \
- \
- T& get() { return x; } \
- const T& get() const { return x; } \
- \
- T x; \
- }
-
-DEFINE_TUPLE_LEAF(0, a);
-DEFINE_TUPLE_LEAF(1, b);
-DEFINE_TUPLE_LEAF(2, c);
-DEFINE_TUPLE_LEAF(3, d);
-DEFINE_TUPLE_LEAF(4, e);
-DEFINE_TUPLE_LEAF(5, f);
-DEFINE_TUPLE_LEAF(6, g);
-DEFINE_TUPLE_LEAF(7, h);
-
-#undef DEFINE_TUPLE_LEAF
-
-// Deprecated compat aliases
-// TODO(cef): Remove this code when cef_runnable.h is deleted.
-
-using Tuple0 = Tuple<>;
-template <typename A>
-using Tuple1 = Tuple<A>;
-template <typename A, typename B>
-using Tuple2 = Tuple<A, B>;
-template <typename A, typename B, typename C>
-using Tuple3 = Tuple<A, B, C>;
-template <typename A, typename B, typename C, typename D>
-using Tuple4 = Tuple<A, B, C, D>;
-template <typename A, typename B, typename C, typename D, typename E>
-using Tuple5 = Tuple<A, B, C, D, E>;
-template <typename A,
- typename B,
- typename C,
- typename D,
- typename E,
- typename F>
-using Tuple6 = Tuple<A, B, C, D, E, F>;
-template <typename A,
- typename B,
- typename C,
- typename D,
- typename E,
- typename F,
- typename G>
-using Tuple7 = Tuple<A, B, C, D, E, F, G>;
-template <typename A,
- typename B,
- typename C,
- typename D,
- typename E,
- typename F,
- typename G,
- typename H>
-using Tuple8 = Tuple<A, B, C, D, E, F, G, H>;
-
-#elif defined(BUILDING_CEF_SHARED)
-// When building CEF include the Chromium header directly.
-#include "base/tuple.h"
-#else // !BUILDING_CEF_SHARED
-// The following is substantially similar to the Chromium implementation.
-// If the Chromium implementation diverges the below implementation should be
-// updated to match.
-
-#include "include/base/cef_bind_helpers.h"
+// If base/tuple.h is included first then exclude this file. This is to
+// facilitate the use of both base/bind.h and cef_runnable.h in unit tests.
+#ifndef BASE_TUPLE_H__
+#if defined(OS_CHROMEOS)
+// To troubleshoot crosbug.com/7327.
+#include "base/logging.h"
+#endif
// Traits ----------------------------------------------------------------------
//
// A simple traits class for tuple arguments.
Tuple3(typename TupleTraits<A>::ParamType a,
typename TupleTraits<B>::ParamType b,
typename TupleTraits<C>::ParamType c)
- : a(a), b(b), c(c){
+ : a(a), b(b), c(c) {
}
A a;
template <class ObjT, class Method, class A>
inline void DispatchToMethod(ObjT* obj, Method method, const A& arg) {
- (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg));
+ (obj->*method)(arg);
}
template <class ObjT, class Method, class A>
inline void DispatchToMethod(ObjT* obj, Method method, const Tuple1<A>& arg) {
- (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a));
+#if defined(OS_CHROMEOS)
+ // To troubleshoot crosbug.com/7327.
+ CHECK(obj);
+ CHECK(&arg);
+ CHECK(method);
+#endif
+ (obj->*method)(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::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
- base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b));
+ (obj->*method)(arg.a, 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::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
- base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
- base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c));
+ (obj->*method)(arg.a, arg.b, 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::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));
+ (obj->*method)(arg.a, arg.b, arg.c, 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::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));
+ (obj->*method)(arg.a, arg.b, arg.c, arg.d, 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::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));
+ (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e, 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::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::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));
+ (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f, arg.g);
}
// Static Dispatchers with no out params.
template <class Function, class A>
inline void DispatchToFunction(Function function, const Tuple1<A>& arg) {
- (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a));
+ (*function)(arg.a);
}
template<class Function, class A, class B>
inline void DispatchToFunction(Function function, const Tuple2<A, B>& arg) {
- (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
- base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b));
+ (*function)(arg.a, arg.b);
}
template<class Function, class A, class B, class C>
inline void DispatchToFunction(Function function, const Tuple3<A, B, C>& arg) {
- (*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));
+ (*function)(arg.a, arg.b, 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::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));
+ (*function)(arg.a, arg.b, arg.c, 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::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));
+ (*function)(arg.a, arg.b, arg.c, arg.d, 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::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));
+ (*function)(arg.a, arg.b, arg.c, arg.d, arg.e, 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::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));
+ (*function)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f, 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::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));
+ (*function)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f, arg.g, arg.h);
}
// Dispatchers with 0 out param (as a Tuple0).
template <class ObjT, class Method, class A>
inline void DispatchToMethod(ObjT* obj, Method method, const A& arg, Tuple0*) {
- (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg));
+ (obj->*method)(arg);
}
template <class ObjT, class Method, class A>
inline void DispatchToMethod(ObjT* obj,
Method method,
const Tuple1<A>& arg, Tuple0*) {
- (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a));
+ (obj->*method)(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::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
- base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b));
+ (obj->*method)(arg.a, 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::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
- base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
- base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c));
+ (obj->*method)(arg.a, arg.b, 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::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));
+ (obj->*method)(arg.a, arg.b, arg.c, 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::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));
+ (obj->*method)(arg.a, arg.b, arg.c, arg.d, 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::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));
+ (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f);
}
// Dispatchers with 1 out param.
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple1<InA>& in,
Tuple1<OutA>* out) {
- (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a), &out->a);
+ (obj->*method)(in.a, &out->a);
}
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::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
- base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
- &out->a);
+ (obj->*method)(in.a, in.b, &out->a);
}
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::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);
+ (obj->*method)(in.a, in.b, in.c, &out->a);
}
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::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);
+ (obj->*method)(in.a, in.b, in.c, in.d, &out->a);
}
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::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);
+ (obj->*method)(in.a, in.b, in.c, in.d, in.e, &out->a);
}
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::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);
+ (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, &out->a);
}
// Dispatchers with 2 out params.
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple1<InA>& in,
Tuple2<OutA, OutB>* out) {
- (obj->*method)(
- base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a), &out->a, &out->b);
+ (obj->*method)(in.a, &out->a, &out->b);
}
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::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
- base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
- &out->a,
- &out->b);
+ (obj->*method)(in.a, in.b, &out->a, &out->b);
}
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::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);
+ (obj->*method)(in.a, in.b, in.c, &out->a, &out->b);
}
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::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);
+ (obj->*method)(in.a, in.b, in.c, in.d, &out->a, &out->b);
}
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::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);
+ (obj->*method)(in.a, in.b, in.c, in.d, in.e, &out->a, &out->b);
}
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::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);
+ (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, &out->a, &out->b);
}
// Dispatchers with 3 out params.
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple1<InA>& in,
Tuple3<OutA, OutB, OutC>* out) {
- (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
- &out->a,
- &out->b,
- &out->c);
+ (obj->*method)(in.a, &out->a, &out->b, &out->c);
}
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::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
- base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
- &out->a,
- &out->b,
- &out->c);
+ (obj->*method)(in.a, in.b, &out->a, &out->b, &out->c);
}
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::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);
+ (obj->*method)(in.a, in.b, in.c, &out->a, &out->b, &out->c);
}
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::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);
+ (obj->*method)(in.a, in.b, in.c, in.d, &out->a, &out->b, &out->c);
}
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::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);
+ (obj->*method)(in.a, in.b, in.c, in.d, in.e, &out->a, &out->b, &out->c);
}
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::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);
+ (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, &out->a, &out->b, &out->c);
}
// Dispatchers with 4 out params.
inline void DispatchToMethod(ObjT* obj, Method method,
const InA& in,
Tuple4<OutA, OutB, OutC, OutD>* out) {
- (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in),
- &out->a,
- &out->b,
- &out->c,
- &out->d);
+ (obj->*method)(in, &out->a, &out->b, &out->c, &out->d);
}
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::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
- &out->a,
- &out->b,
- &out->c,
- &out->d);
+ (obj->*method)(in.a, &out->a, &out->b, &out->c, &out->d);
}
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::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
- base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
- &out->a,
- &out->b,
- &out->c,
- &out->d);
+ (obj->*method)(in.a, in.b, &out->a, &out->b, &out->c, &out->d);
}
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::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,
- &out->d);
+ (obj->*method)(in.a, in.b, in.c, &out->a, &out->b, &out->c, &out->d);
}
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::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,
- &out->d);
+ (obj->*method)(in.a, in.b, in.c, in.d, &out->a, &out->b, &out->c, &out->d);
}
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::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,
- &out->d);
+ (obj->*method)(in.a, in.b, in.c, in.d, in.e,
+ &out->a, &out->b, &out->c, &out->d);
}
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::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,
- &out->d);
+ (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f,
+ &out->a, &out->b, &out->c, &out->d);
}
// Dispatchers with 5 out params.
inline void DispatchToMethod(ObjT* obj, Method method,
const InA& in,
Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
- (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in),
- &out->a,
- &out->b,
- &out->c,
- &out->d,
- &out->e);
+ (obj->*method)(in, &out->a, &out->b, &out->c, &out->d, &out->e);
}
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::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
- &out->a,
- &out->b,
- &out->c,
- &out->d,
- &out->e);
+ (obj->*method)(in.a, &out->a, &out->b, &out->c, &out->d, &out->e);
}
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::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
- base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
- &out->a,
- &out->b,
- &out->c,
- &out->d,
- &out->e);
+ (obj->*method)(in.a, in.b, &out->a, &out->b, &out->c, &out->d, &out->e);
}
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::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,
- &out->d,
- &out->e);
+ (obj->*method)(in.a, in.b, in.c, &out->a, &out->b, &out->c, &out->d, &out->e);
}
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::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,
- &out->d,
+ (obj->*method)(in.a, in.b, in.c, in.d, &out->a, &out->b, &out->c, &out->d,
&out->e);
}
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::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,
- &out->d,
- &out->e);
+ (obj->*method)(in.a, in.b, in.c, in.d, in.e,
+ &out->a, &out->b, &out->c, &out->d, &out->e);
}
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::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,
- &out->d,
- &out->e);
+ (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f,
+ &out->a, &out->b, &out->c, &out->d, &out->e);
}
-#endif // !BUILDING_CEF_SHARED
+#endif // BASE_TUPLE_H__
-#endif // CEF_INCLUDE_BASE_CEF_TUPLE_H_
+#endif // CEF_INCLUDE_INTERNAL_CEF_TUPLE_H_
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
#pragma once
-#include "include/base/cef_build.h"
+#include "include/internal/cef_build.h"
#include "include/internal/cef_string.h"
#include "include/internal/cef_string_list.h"
#include "include/internal/cef_time.h"
///
LOGSEVERITY_ERROR,
+ ///
+ // ERROR_REPORT logging.
+ ///
+ LOGSEVERITY_ERROR_REPORT,
+
///
// Completely disable logging.
///
///
// Set to true (1) to have the browser process message loop run in a separate
// thread. If false (0) than the CefDoMessageLoopWork() function must be
- // called from your application message loop. This option is only supported on
- // Windows.
+ // called from your application message loop.
///
int multi_threaded_message_loop;
- ///
- // Set to true (1) to enable windowless (off-screen) rendering support. Do not
- // enable this value if the application does not use windowless rendering as
- // it may reduce rendering performance on some systems.
- ///
- int windowless_rendering_enabled;
-
///
// Set to true (1) to disable configuration of browser process features using
// standard CEF and Chromium command-line arguments. Configuration can still
int command_line_args_disabled;
///
- // The location where cache data will be stored on disk. If empty then
- // browsers will be created in "incognito mode" where in-memory caches are
- // used for storage and no data is persisted to disk. HTML5 databases such as
- // localStorage will only persist across sessions if a cache path is
- // specified. Can be overridden for individual CefRequestContext instances via
- // the CefRequestContextSettings.cache_path value.
+ // The location where cache data will be stored on disk. If empty an in-memory
+ // cache will be used for some features and a temporary disk cache for others.
+ // HTML5 databases such as localStorage will only persist across sessions if a
+ // cache path is specified.
///
cef_string_t cache_path;
- ///
- // The location where user data such as spell checking dictionary files will
- // be stored on disk. If empty then the default platform-specific user data
- // directory will be used ("~/.cef_user_data" directory on Linux,
- // "~/Library/Application Support/CEF/User Data" directory on Mac OS X,
- // "Local Settings\Application Data\CEF\User Data" directory under the user
- // profile directory on Windows).
- ///
- cef_string_t user_data_path;
-
///
// To persist session cookies (cookies without an expiry date or validity
// interval) by default when using the global cookie manager set this value to
// true. Session cookies are generally intended to be transient and most Web
- // browsers do not persist them. A |cache_path| value must also be specified
- // to enable this feature. Also configurable using the
- // "persist-session-cookies" command-line switch. Can be overridden for
- // individual CefRequestContext instances via the
- // CefRequestContextSettings.persist_session_cookies value.
+ // browsers do not persist them. A |cache_path| value must also be specified to
+ // enable this feature. Also configurable using the "persist-session-cookies"
+ // command-line switch.
///
int persist_session_cookies;
///
cef_log_severity_t log_severity;
+ ///
+ // Enable DCHECK in release mode to ease debugging. Also configurable using the
+ // "enable-release-dcheck" command-line switch.
+ ///
+ int release_dcheck_enabled;
+
///
// Custom flags that will be used when initializing the V8 JavaScript engine.
// The consequences of using custom flags may not be well tested. Also
///
// The number of stack trace frames to capture for uncaught exceptions.
- // Specify a positive value to enable the CefRenderProcessHandler::
+ // Specify a positive value to enable the CefV8ContextHandler::
// OnUncaughtException() callback. Specify 0 (default value) and
// OnUncaughtException() will not be called. Also configurable using the
// "uncaught-exception-stack-size" command-line switch.
// Enabling this setting can lead to potential security vulnerabilities like
// "man in the middle" attacks. Applications that load content from the
// internet should not enable this setting. Also configurable using the
- // "ignore-certificate-errors" command-line switch. Can be overridden for
- // individual CefRequestContext instances via the
- // CefRequestContextSettings.ignore_certificate_errors value.
+ // "ignore-certificate-errors" command-line switch.
///
int ignore_certificate_errors;
// of the background color but will be otherwise ignored.
///
cef_color_t background_color;
-
- ///
- // Comma delimited ordered list of language codes without any whitespace that
- // will be used in the "Accept-Language" HTTP header. May be overridden on a
- // per-browser basis using the CefBrowserSettings.accept_language_list value.
- // If both values are empty then "en-US,en" will be used. Can be overridden
- // for individual CefRequestContext instances via the
- // CefRequestContextSettings.accept_language_list value.
- ///
- cef_string_t accept_language_list;
} cef_settings_t;
-///
-// Request context initialization settings. Specify NULL or 0 to get the
-// recommended default values.
-///
-typedef struct _cef_request_context_settings_t {
- ///
- // Size of this structure.
- ///
- size_t size;
-
- ///
- // The location where cache data will be stored on disk. If empty then
- // browsers will be created in "incognito mode" where in-memory caches are
- // used for storage and no data is persisted to disk. HTML5 databases such as
- // localStorage will only persist across sessions if a cache path is
- // specified. To share the global browser cache and related configuration set
- // this value to match the CefSettings.cache_path value.
- ///
- cef_string_t cache_path;
-
- ///
- // To persist session cookies (cookies without an expiry date or validity
- // interval) by default when using the global cookie manager set this value to
- // true. Session cookies are generally intended to be transient and most Web
- // browsers do not persist them. Can be set globally using the
- // CefSettings.persist_session_cookies value. This value will be ignored if
- // |cache_path| is empty or if it matches the CefSettings.cache_path value.
- ///
- int persist_session_cookies;
-
- ///
- // Set to true (1) to ignore errors related to invalid SSL certificates.
- // Enabling this setting can lead to potential security vulnerabilities like
- // "man in the middle" attacks. Applications that load content from the
- // internet should not enable this setting. Can be set globally using the
- // CefSettings.ignore_certificate_errors value. This value will be ignored if
- // |cache_path| matches the CefSettings.cache_path value.
- ///
- int ignore_certificate_errors;
-
- ///
- // Comma delimited ordered list of language codes without any whitespace that
- // will be used in the "Accept-Language" HTTP header. Can be set globally
- // using the CefSettings.accept_language_list value or overridden on a per-
- // browser basis using the CefBrowserSettings.accept_language_list value. If
- // all values are empty then "en-US,en" will be used. This value will be
- // ignored if |cache_path| matches the CefSettings.cache_path value.
- ///
- cef_string_t accept_language_list;
-} cef_request_context_settings_t;
-
///
// Browser initialization settings. Specify NULL or 0 to get the recommended
// default values. The consequences of using custom values may not be well
///
size_t size;
- ///
- // The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint
- // will be called for a windowless browser. The actual fps may be lower if
- // the browser cannot generate frames at the requested rate. The minimum
- // value is 1 and the maximum value is 60 (default 30).
- ///
- int windowless_frame_rate;
-
// The below values map to WebPreferences settings.
///
///
// Controls whether JavaScript can be used to close windows that were not
// opened via JavaScript. JavaScript can still be used to close windows that
- // were opened via JavaScript or that have no back/forward history. Also
- // configurable using the "disable-javascript-close-windows" command-line
- // switch.
+ // were opened via JavaScript. Also configurable using the
+ // "disable-javascript-close-windows" command-line switch.
///
cef_state_t javascript_close_windows;
///
cef_state_t webgl;
+ ///
+ // Controls whether content that depends on accelerated compositing can be
+ // used. Note that accelerated compositing requires hardware support and may
+ // not work on all systems even when enabled. Also configurable using the
+ // "disable-accelerated-compositing" command-line switch.
+ ///
+ cef_state_t accelerated_compositing;
+
///
// Opaque background color used for the browser before a document is loaded
// and when no document color is specified. By default the background color
// 0 to enable use of the background color but will be otherwise ignored.
///
cef_color_t background_color;
-
- ///
- // Comma delimited ordered list of language codes without any whitespace that
- // will be used in the "Accept-Language" HTTP header. May be set globally
- // using the CefBrowserSettings.accept_language_list value. If both values are
- // empty then "en-US,en" will be used.
- ///
- cef_string_t accept_language_list;
} cef_browser_settings_t;
-///
-// Return value types.
-///
-typedef enum {
- ///
- // Cancel immediately.
- ///
- RV_CANCEL = 0,
-
- ///
- // Continue immediately.
- ///
- RV_CONTINUE,
-
- ///
- // Continue asynchronously (usually via a callback).
- ///
- RV_CONTINUE_ASYNC,
-} cef_return_value_t;
-
///
// URL component parts.
///
// module).
///
PK_FILE_MODULE,
-
- ///
- // "Local Settings\Application Data" directory under the user profile
- // directory on Windows.
- ///
- PK_LOCAL_APP_DATA,
-
- ///
- // "Application Data" directory under the user profile directory on Windows
- // and "~/Library/Application Support" directory on Mac OS X.
- ///
- PK_USER_DATA,
} cef_path_key_t;
///
ERR_INSECURE_RESPONSE = -501,
} cef_errorcode_t;
-///
-// The manner in which a link click should be opened.
-///
-typedef enum {
- WOD_UNKNOWN,
- WOD_SUPPRESS_OPEN,
- WOD_CURRENT_TAB,
- WOD_SINGLETON_TAB,
- WOD_NEW_FOREGROUND_TAB,
- WOD_NEW_BACKGROUND_TAB,
- WOD_NEW_POPUP,
- WOD_NEW_WINDOW,
- WOD_SAVE_TO_DISK,
- WOD_OFF_THE_RECORD,
- WOD_IGNORE_ACTION
-} cef_window_open_disposition_t;
-
///
// "Verb" of a drag-and-drop operation as negotiated between the source and
// destination. These constants match their equivalents in WebCore's
// XMLHttpRequest.
///
RT_XHR,
-
- ///
- // A request for a <ping>
- ///
- RT_PING,
-
- ///
- // Main resource of a service worker.
- ///
- RT_SERVICE_WORKER,
} cef_resource_type_t;
///
UR_FLAG_SKIP_CACHE = 1 << 0,
///
- // If set user name, password, and cookies may be sent with the request, and
- // cookies may be saved from the response.
+ // If set user name, password, and cookies may be sent with the request.
///
UR_FLAG_ALLOW_CACHED_CREDENTIALS = 1 << 1,
+ ///
+ // If set cookies may be sent with the request and saved from the response.
+ // UR_FLAG_ALLOW_CACHED_CREDENTIALS must also be set.
+ ///
+ UR_FLAG_ALLOW_COOKIES = 1 << 2,
+
///
// If set upload progress events will be generated when a request has a body.
///
UR_FLAG_REPORT_UPLOAD_PROGRESS = 1 << 3,
+ ///
+ // If set load timing info will be collected for the request.
+ ///
+ UR_FLAG_REPORT_LOAD_TIMING = 1 << 4,
+
///
// If set the headers sent and received for the request will be recorded.
///
UR_FAILED,
} cef_urlrequest_status_t;
-///
-// Structure representing a point.
-///
-typedef struct _cef_point_t {
- int x;
- int y;
-} cef_point_t;
-
///
// Structure representing a rectangle.
///
int height;
} cef_rect_t;
-///
-// Structure representing a size.
-///
-typedef struct _cef_size_t {
- int width;
- int height;
-} cef_size_t;
-
///
// Existing process IDs.
///
MENU_ID_PRINT = 131,
MENU_ID_VIEW_SOURCE = 132,
- // Spell checking word correction suggestions.
- MENU_ID_SPELLCHECK_SUGGESTION_0 = 200,
- MENU_ID_SPELLCHECK_SUGGESTION_1 = 201,
- MENU_ID_SPELLCHECK_SUGGESTION_2 = 202,
- MENU_ID_SPELLCHECK_SUGGESTION_3 = 203,
- MENU_ID_SPELLCHECK_SUGGESTION_4 = 204,
- MENU_ID_SPELLCHECK_SUGGESTION_LAST = 204,
- MENU_ID_NO_SPELLING_SUGGESTIONS = 205,
- MENU_ID_ADD_TO_DICTIONARY = 206,
-
// All user-defined menu IDs should come between MENU_ID_USER_FIRST and
// MENU_ID_USER_LAST to avoid overlapping the Chromium and CEF ID ranges
// defined in the tools/gritsettings/resource_ids file.
// Key event types.
///
typedef enum {
- ///
- // Notification that a key transitioned from "up" to "down".
- ///
KEYEVENT_RAWKEYDOWN = 0,
-
- ///
- // Notification that a key was pressed. This does not necessarily correspond
- // to a character depending on the key and language. Use KEYEVENT_CHAR for
- // character input.
- ///
KEYEVENT_KEYDOWN,
-
- ///
- // Notification that a key was released.
- ///
KEYEVENT_KEYUP,
-
- ///
- // Notification that a character was typed. Use this for text input. Key
- // down events may generate 0, 1, or more than one character event depending
- // on the key, locale, and operating system.
- ///
KEYEVENT_CHAR
} cef_key_event_type_t;
DOM_EVENT_CATEGORY_POPSTATE = 0x2000,
DOM_EVENT_CATEGORY_PROGRESS = 0x4000,
DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = 0x8000,
+ DOM_EVENT_CATEGORY_BEFORE_LOAD = 0x10000,
} cef_dom_event_category_t;
///
DOM_NODE_TYPE_ATTRIBUTE,
DOM_NODE_TYPE_TEXT,
DOM_NODE_TYPE_CDATA_SECTION,
+ DOM_NODE_TYPE_ENTITY,
DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS,
DOM_NODE_TYPE_COMMENT,
DOM_NODE_TYPE_DOCUMENT,
DOM_NODE_TYPE_DOCUMENT_TYPE,
DOM_NODE_TYPE_DOCUMENT_FRAGMENT,
+ DOM_NODE_TYPE_NOTATION,
+ DOM_NODE_TYPE_XPATH_NAMESPACE,
} cef_dom_node_type_t;
///
///
FILE_DIALOG_OPEN_MULTIPLE,
- ///
- // Like Open, but selects a folder to open.
- ///
- FILE_DIALOG_OPEN_FOLDER,
-
///
// Allows picking a nonexistent file, and prompts to overwrite if the file
// already exists.
///
FILE_DIALOG_SAVE,
-
- ///
- // General mask defining the bits used for the type values.
- ///
- FILE_DIALOG_TYPE_MASK = 0xFF,
-
- // Qualifiers.
- // Any of the type values above can be augmented by one or more qualifiers.
- // These qualifiers further define the dialog behavior.
-
- ///
- // Prompt to overwrite if the user selects an existing file with the Save
- // dialog.
- ///
- FILE_DIALOG_OVERWRITEPROMPT_FLAG = 0x01000000,
-
- ///
- // Do not display read-only files.
- ///
- FILE_DIALOG_HIDEREADONLY_FLAG = 0x02000000,
} cef_file_dialog_mode_t;
///
double speed;
///
- // Time of position measurement in milliseconds since Epoch in UTC time. This
+ // Time of position measurement in miliseconds since Epoch in UTC time. This
// is taken from the host computer's system clock.
///
cef_time_t timestamp;
cef_string_t error_message;
} cef_geoposition_t;
-///
-// Print job color mode values.
-///
-typedef enum {
- COLOR_MODEL_UNKNOWN,
- COLOR_MODEL_GRAY,
- COLOR_MODEL_COLOR,
- COLOR_MODEL_CMYK,
- COLOR_MODEL_CMY,
- COLOR_MODEL_KCMY,
- COLOR_MODEL_CMY_K, // CMY_K represents CMY+K.
- COLOR_MODEL_BLACK,
- COLOR_MODEL_GRAYSCALE,
- COLOR_MODEL_RGB,
- COLOR_MODEL_RGB16,
- COLOR_MODEL_RGBA,
- COLOR_MODEL_COLORMODE_COLOR, // Used in samsung printer ppds.
- COLOR_MODEL_COLORMODE_MONOCHROME, // Used in samsung printer ppds.
- COLOR_MODEL_HP_COLOR_COLOR, // Used in HP color printer ppds.
- COLOR_MODEL_HP_COLOR_BLACK, // Used in HP color printer ppds.
- COLOR_MODEL_PRINTOUTMODE_NORMAL, // Used in foomatic ppds.
- COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY, // Used in foomatic ppds.
- COLOR_MODEL_PROCESSCOLORMODEL_CMYK, // Used in canon printer ppds.
- COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE, // Used in canon printer ppds.
- COLOR_MODEL_PROCESSCOLORMODEL_RGB, // Used in canon printer ppds
-} cef_color_model_t;
-
-///
-// Print job duplex mode values.
-///
-typedef enum {
- DUPLEX_MODE_UNKNOWN = -1,
- DUPLEX_MODE_SIMPLEX,
- DUPLEX_MODE_LONG_EDGE,
- DUPLEX_MODE_SHORT_EDGE,
-} cef_duplex_mode_t;
-
-///
-// Structure representing a print job page range.
-///
-typedef struct _cef_page_range_t {
- int from;
- int to;
-} cef_page_range_t;
-
-///
-// Cursor type values.
-///
-typedef enum {
- CT_POINTER = 0,
- CT_CROSS,
- CT_HAND,
- CT_IBEAM,
- CT_WAIT,
- CT_HELP,
- CT_EASTRESIZE,
- CT_NORTHRESIZE,
- CT_NORTHEASTRESIZE,
- CT_NORTHWESTRESIZE,
- CT_SOUTHRESIZE,
- CT_SOUTHEASTRESIZE,
- CT_SOUTHWESTRESIZE,
- CT_WESTRESIZE,
- CT_NORTHSOUTHRESIZE,
- CT_EASTWESTRESIZE,
- CT_NORTHEASTSOUTHWESTRESIZE,
- CT_NORTHWESTSOUTHEASTRESIZE,
- CT_COLUMNRESIZE,
- CT_ROWRESIZE,
- CT_MIDDLEPANNING,
- CT_EASTPANNING,
- CT_NORTHPANNING,
- CT_NORTHEASTPANNING,
- CT_NORTHWESTPANNING,
- CT_SOUTHPANNING,
- CT_SOUTHEASTPANNING,
- CT_SOUTHWESTPANNING,
- CT_WESTPANNING,
- CT_MOVE,
- CT_VERTICALTEXT,
- CT_CELL,
- CT_CONTEXTMENU,
- CT_ALIAS,
- CT_PROGRESS,
- CT_NODROP,
- CT_COPY,
- CT_NONE,
- CT_NOTALLOWED,
- CT_ZOOMIN,
- CT_ZOOMOUT,
- CT_GRAB,
- CT_GRABBING,
- CT_CUSTOM,
-} cef_cursor_type_t;
-
-///
-// Structure representing cursor information. |buffer| will be
-// |size.width|*|size.height|*4 bytes in size and represents a BGRA image with
-// an upper-left origin.
-///
-typedef struct _cef_cursor_info_t {
- cef_point_t hotspot;
- float image_scale_factor;
- void* buffer;
- cef_size_t size;
-} cef_cursor_info_t;
-
-///
-// URI unescape rules passed to CefURIDecode().
-///
-typedef enum {
- ///
- // Don't unescape anything at all.
- ///
- UU_NONE = 0,
-
- ///
- // Don't unescape anything special, but all normal unescaping will happen.
- // This is a placeholder and can't be combined with other flags (since it's
- // just the absence of them). All other unescape rules imply "normal" in
- // addition to their special meaning. Things like escaped letters, digits,
- // and most symbols will get unescaped with this mode.
- ///
- UU_NORMAL = 1,
-
- ///
- // Convert %20 to spaces. In some places where we're showing URLs, we may
- // want this. In places where the URL may be copied and pasted out, then
- // you wouldn't want this since it might not be interpreted in one piece
- // by other applications.
- ///
- UU_SPACES = 2,
-
- ///
- // Unescapes various characters that will change the meaning of URLs,
- // including '%', '+', '&', '/', '#'. If we unescaped these characters, the
- // resulting URL won't be the same as the source one. This flag is used when
- // generating final output like filenames for URLs where we won't be
- // interpreting as a URL and want to do as much unescaping as possible.
- ///
- UU_URL_SPECIAL_CHARS = 4,
-
- ///
- // Unescapes control characters such as %01. This INCLUDES NULLs. This is
- // used for rare cases such as data: URL decoding where the result is binary
- // data. This flag also unescapes BiDi control characters.
- //
- // DO NOT use CONTROL_CHARS if the URL is going to be displayed in the UI
- // for security reasons.
- ///
- UU_CONTROL_CHARS = 8,
-
- ///
- // URL queries use "+" for space. This flag controls that replacement.
- ///
- UU_REPLACE_PLUS_WITH_SPACE = 16,
-} cef_uri_unescape_rule_t;
-
#ifdef __cplusplus
}
#endif
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef CEF_INCLUDE_INTERNAL_CEF_THREAD_INTERNAL_H_
-#define CEF_INCLUDE_INTERNAL_CEF_THREAD_INTERNAL_H_
+
+#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_LINUX_H_
+#define CEF_INCLUDE_INTERNAL_CEF_TYPES_LINUX_H_
#pragma once
-#if defined(OS_WIN)
-#include <windows.h>
-#elif defined(OS_POSIX)
-#include <pthread.h>
-#include <unistd.h>
-#endif
+#include "include/internal/cef_build.h"
-#include "include/internal/cef_export.h"
+#if defined(OS_LINUX)
+//#include <gtk/gtk.h>
+#include "include/internal/cef_string.h"
#ifdef __cplusplus
extern "C" {
#endif
-#if defined(OS_WIN)
-typedef DWORD cef_platform_thread_id_t;
-#elif defined(OS_POSIX)
-typedef pid_t cef_platform_thread_id_t;
-#endif
+// Handle types.
+#define cef_cursor_handle_t void*
+#define cef_event_handle_t void*
+#define cef_window_handle_t void*
+//#define cef_cursor_handle_t GdkCursor*
+//#define cef_event_handle_t GdkEvent*
+//#define cef_window_handle_t GtkWidget*
+#define cef_text_input_context_t void*
///
-// Returns the current platform thread ID.
+// Structure representing CefExecuteProcess arguments.
///
-CEF_EXPORT cef_platform_thread_id_t cef_get_current_platform_thread_id();
-
-#if defined(OS_WIN)
-typedef DWORD cef_platform_thread_handle_t;
-#elif defined(OS_POSIX)
-typedef pthread_t cef_platform_thread_handle_t;
-#endif
+typedef struct _cef_main_args_t {
+ int argc;
+ char** argv;
+} cef_main_args_t;
///
-// Returns the current platform thread handle.
+// Class representing window information.
///
-CEF_EXPORT cef_platform_thread_handle_t
- cef_get_current_platform_thread_handle();
+typedef struct _cef_window_info_t {
+ // Pointer for the parent GtkBox widget.
+ cef_window_handle_t parent_widget;
+
+ // If window rendering is disabled no browser window will be created. Set
+ // |parent_widget| to the window that will act as the parent for popup menus,
+ // dialog boxes, etc.
+ int window_rendering_disabled;
+
+ // Set to true to enable transparent painting.
+ int transparent_painting;
+
+ // Pointer for the new browser widget.
+ cef_window_handle_t widget;
+} cef_window_info_t;
#ifdef __cplusplus
}
-#endif // __cplusplus
+#endif
+
+#endif // OS_LINUX
-#endif // CEF_INCLUDE_INTERNAL_CEF_THREAD_INTERNAL_H_
+#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_LINUX_H_
+++ /dev/null
-// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_
-#define CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_
-#pragma once
-
-#include "include/base/cef_build.h"
-
-#if defined(OS_WIN)
-#include <windows.h>
-#include "include/internal/cef_string.h"
-
-// Handle types.
-#define cef_cursor_handle_t HCURSOR
-#define cef_event_handle_t MSG*
-#define cef_window_handle_t HWND
-#define cef_text_input_context_t void*
-
-#define kNullCursorHandle NULL
-#define kNullEventHandle NULL
-#define kNullWindowHandle NULL
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-///
-// Structure representing CefExecuteProcess arguments.
-///
-typedef struct _cef_main_args_t {
- HINSTANCE instance;
-} cef_main_args_t;
-
-///
-// Structure representing window information.
-///
-typedef struct _cef_window_info_t {
- // Standard parameters required by CreateWindowEx()
- DWORD ex_style;
- cef_string_t window_name;
- DWORD style;
- int x;
- int y;
- int width;
- int height;
- cef_window_handle_t parent_window;
- HMENU menu;
-
- ///
- // Set to true (1) to create the browser using windowless (off-screen)
- // rendering. No window will be created for the browser and all rendering will
- // occur via the CefRenderHandler interface. The |parent_window| value will be
- // used to identify monitor info and to act as the parent window for dialogs,
- // context menus, etc. If |parent_window| is not provided then the main screen
- // monitor will be used and some functionality that requires a parent window
- // may not function correctly. In order to create windowless browsers the
- // CefSettings.windowless_rendering_enabled value must be set to true.
- ///
- int windowless_rendering_enabled;
-
- ///
- // Set to true (1) to enable transparent painting in combination with
- // windowless rendering. When this value is true a transparent background
- // color will be used (RGBA=0x00000000). When this value is false the
- // background will be white and opaque.
- ///
- int transparent_painting_enabled;
-
- ///
- // Handle for the new browser window. Only used with windowed rendering.
- ///
- cef_window_handle_t window;
-} cef_window_info_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // OS_WIN
-
-#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_
};
-struct CefPointTraits {
- typedef cef_point_t struct_type;
-
- static inline void init(struct_type* s) {}
- static inline void clear(struct_type* s) {}
-
- static inline void set(const struct_type* src, struct_type* target,
- bool copy) {
- *target = *src;
- }
-};
-
-///
-// Class representing a point.
-///
-class CefPoint : public CefStructBase<CefPointTraits> {
- public:
- typedef CefStructBase<CefPointTraits> parent;
-
- CefPoint() : parent() {}
- CefPoint(const cef_point_t& r) : parent(r) {} // NOLINT(runtime/explicit)
- CefPoint(const CefPoint& r) : parent(r) {} // NOLINT(runtime/explicit)
- CefPoint(int x, int y) : parent() {
- Set(x, y);
- }
-
- bool IsEmpty() const { return x <= 0 && y <= 0; }
- void Set(int x, int y) {
- this->x = x, this->y = y;
- }
-};
-
-inline bool operator==(const CefPoint& a, const CefPoint& b) {
- return a.x == b.x && a.y == b.y;
-}
-
-inline bool operator!=(const CefPoint& a, const CefPoint& b) {
- return !(a == b);
-}
-
-
struct CefRectTraits {
typedef cef_rect_t struct_type;
return !(a == b);
}
-
-struct CefSizeTraits {
- typedef cef_size_t struct_type;
-
- static inline void init(struct_type* s) {}
- static inline void clear(struct_type* s) {}
-
- static inline void set(const struct_type* src, struct_type* target,
- bool copy) {
- *target = *src;
- }
-};
-
-///
-// Class representing a size.
-///
-class CefSize : public CefStructBase<CefSizeTraits> {
- public:
- typedef CefStructBase<CefSizeTraits> parent;
-
- CefSize() : parent() {}
- CefSize(const cef_size_t& r) : parent(r) {} // NOLINT(runtime/explicit)
- CefSize(const CefSize& r) : parent(r) {} // NOLINT(runtime/explicit)
- CefSize(int width, int height) : parent() {
- Set(width, height);
- }
-
- bool IsEmpty() const { return width <= 0 || height <= 0; }
- void Set(int width, int height) {
- this->width = width, this->height = height;
- }
-};
-
-inline bool operator==(const CefSize& a, const CefSize& b) {
- return a.width == b.width && a.height == b.height;
-}
-
-inline bool operator!=(const CefSize& a, const CefSize& b) {
- return !(a == b);
-}
-
-
struct CefScreenInfoTraits {
typedef cef_screen_info_t struct_type;
};
///
-// Class representing the virtual screen information for use when window
-// rendering is disabled.
+// Class representing the virtual screen information for use when window rendering
+// is disabled.
///
class CefScreenInfo : public CefStructBase<CefScreenInfoTraits> {
public:
}
};
-
struct CefKeyEventTraits {
typedef cef_key_event_t struct_type;
///
typedef CefStructBase<CefKeyEventTraits> CefKeyEvent;
-
struct CefMouseEventTraits {
typedef cef_mouse_event_t struct_type;
///
typedef CefStructBase<CefMouseEventTraits> CefMouseEvent;
-
struct CefPopupFeaturesTraits {
typedef cef_popup_features_t struct_type;
static inline void clear(struct_type* s) {
cef_string_clear(&s->browser_subprocess_path);
cef_string_clear(&s->cache_path);
- cef_string_clear(&s->user_data_path);
cef_string_clear(&s->user_agent);
cef_string_clear(&s->product_version);
cef_string_clear(&s->locale);
cef_string_clear(&s->javascript_flags);
cef_string_clear(&s->resources_dir_path);
cef_string_clear(&s->locales_dir_path);
- cef_string_clear(&s->accept_language_list);
}
static inline void set(const struct_type* src, struct_type* target,
src->browser_subprocess_path.length,
&target->browser_subprocess_path, copy);
target->multi_threaded_message_loop = src->multi_threaded_message_loop;
- target->windowless_rendering_enabled = src->windowless_rendering_enabled;
target->command_line_args_disabled = src->command_line_args_disabled;
cef_string_set(src->cache_path.str, src->cache_path.length,
&target->cache_path, copy);
- cef_string_set(src->user_data_path.str, src->user_data_path.length,
- &target->user_data_path, copy);
target->persist_session_cookies = src->persist_session_cookies;
cef_string_set(src->user_agent.str, src->user_agent.length,
cef_string_set(src->log_file.str, src->log_file.length, &target->log_file,
copy);
target->log_severity = src->log_severity;
+ target->release_dcheck_enabled = src->release_dcheck_enabled;
cef_string_set(src->javascript_flags.str, src->javascript_flags.length,
&target->javascript_flags, copy);
target->context_safety_implementation = src->context_safety_implementation;
target->ignore_certificate_errors = src->ignore_certificate_errors;
target->background_color = src->background_color;
-
- cef_string_set(src->accept_language_list.str,
- src->accept_language_list.length, &target->accept_language_list, copy);
}
};
typedef CefStructBase<CefSettingsTraits> CefSettings;
-struct CefRequestContextSettingsTraits {
- typedef cef_request_context_settings_t struct_type;
-
- static inline void init(struct_type* s) {
- s->size = sizeof(struct_type);
- }
-
- static inline void clear(struct_type* s) {
- cef_string_clear(&s->cache_path);
- cef_string_clear(&s->accept_language_list);
- }
-
- static inline void set(const struct_type* src, struct_type* target,
- bool copy) {
- cef_string_set(src->cache_path.str, src->cache_path.length,
- &target->cache_path, copy);
- target->persist_session_cookies = src->persist_session_cookies;
- target->ignore_certificate_errors = src->ignore_certificate_errors;
- cef_string_set(src->accept_language_list.str,
- src->accept_language_list.length, &target->accept_language_list, copy);
- }
-};
-
-///
-// Class representing request context initialization settings.
-///
-typedef CefStructBase<CefRequestContextSettingsTraits>
- CefRequestContextSettings;
-
-
struct CefBrowserSettingsTraits {
typedef cef_browser_settings_t struct_type;
cef_string_clear(&s->cursive_font_family);
cef_string_clear(&s->fantasy_font_family);
cef_string_clear(&s->default_encoding);
- cef_string_clear(&s->accept_language_list);
}
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
- target->windowless_frame_rate = src->windowless_frame_rate;
-
cef_string_set(src->standard_font_family.str,
src->standard_font_family.length, &target->standard_font_family, copy);
cef_string_set(src->fixed_font_family.str, src->fixed_font_family.length,
target->databases= src->databases;
target->application_cache = src->application_cache;
target->webgl = src->webgl;
+ target->accelerated_compositing = src->accelerated_compositing;
target->background_color = src->background_color;
-
- cef_string_set(src->accept_language_list.str,
- src->accept_language_list.length, &target->accept_language_list, copy);
}
};
///
typedef CefStructBase<CefGeopositionTraits> CefGeoposition;
-
-struct CefPageRangeTraits {
- typedef cef_page_range_t struct_type;
-
- static inline void init(struct_type* s) {}
- static inline void clear(struct_type* s) {}
-
- static inline void set(const struct_type* src, struct_type* target,
- bool copy) {
- *target = *src;
- }
-};
-
-///
-// Class representing a print job page range.
-///
-class CefPageRange : public CefStructBase<CefPageRangeTraits> {
- public:
- typedef CefStructBase<CefPageRangeTraits> parent;
-
- CefPageRange() : parent() {}
- CefPageRange(const cef_page_range_t& r) // NOLINT(runtime/explicit)
- : parent(r) {}
- CefPageRange(const CefPageRange& r) // NOLINT(runtime/explicit)
- : parent(r) {}
- CefPageRange(int from, int to) : parent() {
- Set(from, to);
- }
-
- void Set(int from, int to) {
- this->from = from, this->to = to;
- }
-};
-
-inline bool operator==(const CefPageRange& a, const CefPageRange& b) {
- return a.from == b.from && a.to == b.to;
-}
-
-inline bool operator!=(const CefPageRange& a, const CefPageRange& b) {
- return !(a == b);
-}
-
-
-struct CefCursorInfoTraits {
- typedef cef_cursor_info_t struct_type;
-
- static inline void init(struct_type* s) {}
-
- static inline void clear(struct_type* s) {}
-
- static inline void set(const struct_type* src, struct_type* target,
- bool copy) {
- target->hotspot = src->hotspot;
- target->image_scale_factor = src->image_scale_factor;
- target->buffer = src->buffer;
- target->size = src->size;
- }
-};
-
-///
-// Class representing cursor information.
-///
-typedef CefStructBase<CefCursorInfoTraits> CefCursorInfo;
-
#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_
#define CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_
#pragma once
-#include "include/base/cef_lock.h"
-#include "include/base/cef_macros.h"
#include "include/cef_base.h"
#include "include/cef_stream.h"
int64 offset_;
CefRefPtr<CefBase> source_;
- base::Lock lock_;
-
IMPLEMENT_REFCOUNTING(CefByteReadHandler);
- DISALLOW_COPY_AND_ASSIGN(CefByteReadHandler);
+ IMPLEMENT_LOCKING(CefByteReadHandler);
};
#endif // CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// ---------------------------------------------------------------------------
-//
-// The contents of this file are only available to applications that link
-// against the libcef_dll_wrapper target.
-//
-
-#ifndef CEF_INCLUDE_WRAPPER_CEF_CLOSURE_TASK_H_
-#define CEF_INCLUDE_WRAPPER_CEF_CLOSURE_TASK_H_
-#pragma once
-
-#include "include/base/cef_callback_forward.h"
-#include "include/base/cef_macros.h"
-#include "include/cef_task.h"
-
-///
-// Helpers for asynchronously executing a base::Closure (bound function or
-// method) on a CEF thread. Creation of base::Closures can be facilitated using
-// base::Bind. See include/base/cef_callback.h for complete usage instructions.
-//
-// TO use these helpers you should include this header and the header that
-// defines base::Bind.
-//
-// #include "include/base/cef_bind.h"
-// #include "include/wrapper/cef_closure_task.h"
-//
-// Example of executing a bound function:
-//
-// // Define a function.
-// void MyFunc(int arg) { /* do something with |arg| on the UI thread */ }
-//
-// // Post a task that will execute MyFunc on the UI thread and pass an |arg|
-// // value of 5.
-// CefPostTask(TID_UI, base::Bind(&MyFunc, 5));
-//
-// Example of executing a bound method:
-//
-// // Define a class.
-// class MyClass : public CefBase {
-// public:
-// MyClass() {}
-// void MyMethod(int arg) { /* do something with |arg| on the UI thread */ }
-// private:
-// IMPLEMENT_REFCOUNTING(MyClass);
-// };
-//
-// // Create an instance of MyClass.
-// CefRefPtr<MyClass> instance = new MyClass();
-//
-// // Post a task that will execute MyClass::MyMethod on the UI thread and pass
-// // an |arg| value of 5. |instance| will be kept alive until after the task
-// // completes.
-// CefPostTask(TID_UI, base::Bind(&MyClass::MyMethod, instance, 5));
-///
-
-///
-// Create a CefTask that wraps a base::Closure. Can be used in combination with
-// CefTaskRunner.
-///
-CefRefPtr<CefTask> CefCreateClosureTask(const base::Closure& closure);
-
-///
-// Post a Closure for execution on the specified thread.
-///
-bool CefPostTask(CefThreadId threadId, const base::Closure& closure);
-
-///
-// Post a Closure for delayed execution on the specified thread.
-///
-bool CefPostDelayedTask(CefThreadId threadId, const base::Closure& closure,
- int64 delay_ms);
-
-#endif // CEF_INCLUDE_WRAPPER_CEF_CLOSURE_TASK_H_
+++ /dev/null
-// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the name Chromium Embedded
-// Framework nor the names of its contributors may be used to endorse
-// or promote products derived from this software without specific prior
-// written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// ---------------------------------------------------------------------------
-//
-// The contents of this file are only available to applications that link
-// against the libcef_dll_wrapper target.
-//
-
-#ifndef CEF_INCLUDE_WRAPPER_CEF_HELPERS_H_
-#define CEF_INCLUDE_WRAPPER_CEF_HELPERS_H_
-#pragma once
-
-#include <cstring>
-#include <string>
-#include <vector>
-
-#include "include/base/cef_bind.h"
-#include "include/base/cef_logging.h"
-#include "include/base/cef_macros.h"
-#include "include/cef_task.h"
-
-#define CEF_REQUIRE_UI_THREAD() DCHECK(CefCurrentlyOn(TID_UI));
-#define CEF_REQUIRE_IO_THREAD() DCHECK(CefCurrentlyOn(TID_IO));
-#define CEF_REQUIRE_FILE_THREAD() DCHECK(CefCurrentlyOn(TID_FILE));
-#define CEF_REQUIRE_RENDERER_THREAD() DCHECK(CefCurrentlyOn(TID_RENDERER));
-
-
-// Use this struct in conjuction with refcounted types to ensure that an
-// object is deleted on the specified thread. For example:
-//
-// class Foo : public base::RefCountedThreadSafe<Foo, CefDeleteOnUIThread> {
-// public:
-// Foo();
-// void DoSomething();
-//
-// private:
-// // Allow deletion via scoped_refptr only.
-// friend struct CefDeleteOnThread<TID_UI>;
-// friend class base::RefCountedThreadSafe<Foo, CefDeleteOnUIThread>;
-//
-// virtual ~Foo() {}
-// };
-//
-// base::scoped_refptr<Foo> foo = new Foo();
-// foo->DoSomething();
-// foo = NULL; // Deletion of |foo| will occur on the UI thread.
-//
-template<CefThreadId thread>
-struct CefDeleteOnThread {
- template<typename T>
- static void Destruct(const T* x) {
- if (CefCurrentlyOn(thread)) {
- delete x;
- } else {
- CefPostTask(thread,
- base::Bind(&CefDeleteOnThread<thread>::Destruct<T>, x));
- }
- }
-};
-
-struct CefDeleteOnUIThread : public CefDeleteOnThread<TID_UI> { };
-struct CefDeleteOnIOThread : public CefDeleteOnThread<TID_IO> { };
-struct CefDeleteOnFileThread : public CefDeleteOnThread<TID_FILE> { };
-struct CefDeleteOnRendererThread : public CefDeleteOnThread<TID_RENDERER> { };
-
-
-///
-// Helper class to manage a scoped copy of |argv|.
-///
-class CefScopedArgArray {
- public:
- CefScopedArgArray(int argc, char* argv[]) {
- // argv should have (argc + 1) elements, the last one always being NULL.
- array_ = new char*[argc + 1];
- for (int i = 0; i < argc; ++i) {
- values_.push_back(argv[i]);
- array_[i] = const_cast<char*>(values_[i].c_str());
- }
- array_[argc] = NULL;
- }
- ~CefScopedArgArray() {
- delete [] array_;
- }
-
- char** array() const { return array_; }
-
- private:
- char** array_;
-
- // Keep values in a vector separate from |array_| because various users may
- // modify |array_| and we still want to clean up memory properly.
- std::vector<std::string> values_;
-
- DISALLOW_COPY_AND_ASSIGN(CefScopedArgArray);
-};
-
-#endif // CEF_INCLUDE_WRAPPER_CEF_HELPERS_H_
#define CEF_INCLUDE_WRAPPER_CEF_MESSAGE_ROUTER_H_
#pragma once
-#include "include/base/cef_ref_counted.h"
#include "include/cef_base.h"
#include "include/cef_browser.h"
#include "include/cef_process_message.h"
// Implements the browser side of query routing. The methods of this class may
// be called on any browser process thread unless otherwise indicated.
///
-class CefMessageRouterBrowserSide :
- public base::RefCountedThreadSafe<CefMessageRouterBrowserSide> {
+class CefMessageRouterBrowserSide : public CefBase {
public:
///
// Callback associated with a single pending asynchronous query. Execute the
CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) =0;
-
- protected:
- // Protect against accidental deletion of this object.
- friend class base::RefCountedThreadSafe<CefMessageRouterBrowserSide>;
- virtual ~CefMessageRouterBrowserSide() {}
};
///
// Implements the renderer side of query routing. The methods of this class must
// be called on the render process main thread.
///
-class CefMessageRouterRendererSide :
- public base::RefCountedThreadSafe<CefMessageRouterRendererSide> {
+class CefMessageRouterRendererSide : public CefBase {
public:
+ virtual ~CefMessageRouterRendererSide() {}
+
///
// Create a new router with the specified configuration.
///
CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) =0;
-
- protected:
- // Protect against accidental deletion of this object.
- friend class base::RefCountedThreadSafe<CefMessageRouterRendererSide>;
- virtual ~CefMessageRouterRendererSide() {}
};
#endif // CEF_INCLUDE_WRAPPER_CEF_MESSAGE_ROUTER_H_
#define CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_
#pragma once
-#include "include/base/cef_macros.h"
-#include "include/base/cef_scoped_ptr.h"
#include "include/cef_base.h"
#include "include/cef_resource_handler.h"
#include "include/cef_response.h"
bool read_on_file_thread_;
class Buffer;
- scoped_ptr<Buffer> buffer_;
+ Buffer* buffer_;
#ifndef NDEBUG
// Used in debug builds to verify that |buffer_| isn't being accessed on
// multiple threads at the same time.
#endif
IMPLEMENT_REFCOUNTING(CefStreamResourceHandler);
- DISALLOW_COPY_AND_ASSIGN(CefStreamResourceHandler);
};
#endif // CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_
#define CEF_INCLUDE_WRAPPER_CEF_XML_OBJECT_H_
#pragma once
-#include <map>
-#include <vector>
-
-#include "include/base/cef_lock.h"
-#include "include/base/cef_macros.h"
-#include "include/base/cef_ref_counted.h"
#include "include/cef_base.h"
#include "include/cef_xml_reader.h"
+#include <map>
+#include <vector>
class CefStreamReader;
// (c) Element nodes are represented by their outer XML string.
// </pre>
///
-class CefXmlObject : public base::RefCountedThreadSafe<CefXmlObject> {
+class CefXmlObject : public CefBase {
public:
typedef std::vector<CefRefPtr<CefXmlObject> > ObjectVector;
typedef std::map<CefString, CefString > AttributeMap;
// at least one character long.
///
explicit CefXmlObject(const CefString& name);
+ virtual ~CefXmlObject();
///
// Load the contents of the specified XML stream into this object. The
size_t FindChildren(const CefString& name, ObjectVector& children);
private:
- // Protect against accidental deletion of this object.
- friend class base::RefCountedThreadSafe<CefXmlObject>;
- ~CefXmlObject();
-
void SetParent(CefXmlObject* parent);
CefString name_;
AttributeMap attributes_;
ObjectVector children_;
- base::Lock lock_;
-
- DISALLOW_COPY_AND_ASSIGN(CefXmlObject);
+ IMPLEMENT_REFCOUNTING(CefXmlObject);
+ IMPLEMENT_LOCKING(CefXmlObject);
};
#endif // CEF_INCLUDE_WRAPPER_CEF_XML_OBJECT_H_
#define CEF_INCLUDE_WRAPPER_CEF_ZIP_ARCHIVE_H_
#pragma once
-#include <map>
-
-#include "include/base/cef_lock.h"
-#include "include/base/cef_macros.h"
-#include "include/base/cef_ref_counted.h"
#include "include/cef_base.h"
+#include <map>
class CefStreamReader;
// not be used with large archive files because all data will be resident in
// memory at the same time. This implementation supports a restricted set of zip
// archive features:
-// (1) All file names are stored and compared in lower case.
-// (2) File ordering from the original zip archive is not maintained. This
+// (1) Password-protected files are not supported.
+// (2) All file names are stored and compared in lower case.
+// (3) File ordering from the original zip archive is not maintained. This
// means that files from the same folder may not be located together in the
// file content map.
///
-class CefZipArchive : public base::RefCountedThreadSafe<CefZipArchive> {
+class CefZipArchive : public CefBase {
public:
///
// Class representing a file in the archive. Accessing the file data from
///
// Returns the read-only data contained in the file.
///
- virtual const unsigned char* GetData() const =0;
+ virtual const unsigned char* GetData() =0;
///
// Returns the size of the data in the file.
///
- virtual size_t GetDataSize() const =0;
+ virtual size_t GetDataSize() =0;
///
// Returns a CefStreamReader object for streaming the contents of the file.
///
- virtual CefRefPtr<CefStreamReader> GetStreamReader() const =0;
+ virtual CefRefPtr<CefStreamReader> GetStreamReader() =0;
};
-
typedef std::map<CefString, CefRefPtr<File> > FileMap;
///
// Create a new object.
///
CefZipArchive();
+ virtual ~CefZipArchive();
///
// Load the contents of the specified zip archive stream into this object.
///
// Returns the number of files in the archive.
///
- size_t GetFileCount() const;
+ size_t GetFileCount();
///
// Returns true if the specified file exists and has contents.
///
- bool HasFile(const CefString& fileName) const;
+ bool HasFile(const CefString& fileName);
///
// Returns the specified file.
///
- CefRefPtr<File> GetFile(const CefString& fileName) const;
+ CefRefPtr<File> GetFile(const CefString& fileName);
///
// Removes the specified file.
///
// Returns the map of all files.
///
- size_t GetFiles(FileMap& map) const;
+ size_t GetFiles(FileMap& map);
private:
- // Protect against accidental deletion of this object.
- friend class base::RefCountedThreadSafe<CefZipArchive>;
- ~CefZipArchive();
-
FileMap contents_;
- mutable base::Lock lock_;
-
- DISALLOW_COPY_AND_ASSIGN(CefZipArchive);
+ IMPLEMENT_REFCOUNTING(CefZipArchive);
+ IMPLEMENT_LOCKING(CefZipArchive);
};
#endif // CEF_INCLUDE_WRAPPER_CEF_ZIP_ARCHIVE_H_
--- /dev/null
+../../bin/linux/libcef.so
\ No newline at end of file
--- /dev/null
+../../bin/linux/libudev.so.0
\ No newline at end of file
add_subdirectory(decklink)
add_subdirectory(screen)
add_subdirectory(image)
+add_subdirectory(html)
if (MSVC)
add_subdirectory(flash)
add_subdirectory(psd)
- add_subdirectory(html)
endif ()
add_subdirectory(reroute)
libcef.lib
libcef_dll_wrapper.lib
)
+else()
+ target_link_libraries(html
+ common
+ core
+
+ cef
+ cef_dll_wrapper
+ )
endif()
casparcg_add_include_statement("modules/html/html.h")
casparcg_add_runtime_dependency("${CEF_RESOURCES_PATH}/locales")
casparcg_add_runtime_dependency("${CEF_RESOURCES_PATH}/cef.pak")
-casparcg_add_runtime_dependency("${CEF_RESOURCES_PATH}/cef_100_percent.pak")
-casparcg_add_runtime_dependency("${CEF_RESOURCES_PATH}/cef_200_percent.pak")
casparcg_add_runtime_dependency("${CEF_RESOURCES_PATH}/devtools_resources.pak")
-casparcg_add_runtime_dependency("${CEF_RESOURCES_PATH}/icudtl.dat")
if(MSVC)
casparcg_add_runtime_dependency("${CEF_BIN_PATH}/libcef.dll")
casparcg_add_runtime_dependency("${CEF_BIN_PATH}/libGLESv2.dll")
casparcg_add_runtime_dependency("${CEF_BIN_PATH}/natives_blob.bin")
casparcg_add_runtime_dependency("${CEF_BIN_PATH}/snapshot_blob.bin")
+else()
+ casparcg_add_runtime_dependency("${CEF_BIN_PATH}/libcef.so")
+ casparcg_add_runtime_dependency("${CEF_BIN_PATH}/libffmpegsumo.so")
endif()
class animation_handler : public CefV8Handler
{
private:
- std::vector<CefRefPtr<CefV8Value>> callbacks_;
- boost::timer since_start_timer_;
+ std::vector<CefRefPtr<CefV8Value>> callbacks_;
+ boost::timer since_start_timer_;
public:
- CefRefPtr<CefBrowser> browser;
- std::function<CefRefPtr<CefV8Context>()> get_context;
+ CefRefPtr<CefBrowser> browser;
+ std::function<CefRefPtr<CefV8Context>()> get_context;
bool Execute(
const CefString& name,
callback_args.push_back(CefV8Value::CreateDouble(
since_start_timer_.elapsed() * 1000.0));
- BOOST_FOREACH(auto callback, callbacks)
+ for (auto callback : callbacks)
{
callback->ExecuteFunctionWithContext(
context, callback, callback_args);
CefRefPtr<CefV8Context> get_context(
const CefRefPtr<animation_handler>& handler)
{
- BOOST_FOREACH(auto& ctx, contexts_per_handlers_)
+ for (auto& ctx : contexts_per_handlers_)
{
if (ctx.first == handler)
return ctx.second;
{
if (message->GetName().ToString() == TICK_MESSAGE_NAME)
{
- BOOST_FOREACH(auto& handler, contexts_per_handlers_)
+ for (auto& handler : contexts_per_handlers_)
{
handler.first->tick();
}
bool intercept_command_line(int argc, char** argv)
{
- CefMainArgs main_args;
+ CefMainArgs main_args(argc, argv);
if (CefExecuteProcess(main_args, CefRefPtr<CefApp>(new renderer_application), nullptr) >= 0)
return true;
g_cef_executor->invoke([&]
{
CefSettings settings;
- settings.windowless_rendering_enabled = true;
+ settings.no_sandbox = true;
+ //settings.windowless_rendering_enabled = true;
CefInitialize(main_args, settings, nullptr, nullptr);
});
g_cef_executor->begin_invoke([&]
* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
*
* Author: Helge Norberg, helge.norberg@svt.se
+* Author: Robert Nagy, ronag89@gmail.com
*/
#include "html_cg_proxy.h"
#include <future>
+#include <boost/algorithm/string/predicate.hpp>
+#include <boost/algorithm/string/trim.hpp>
+#include <boost/algorithm/string/replace.hpp>
+#include <boost/format.hpp>
+
namespace caspar { namespace html {
struct html_cg_proxy::impl
void html_cg_proxy::update(int layer, const std::wstring& data)
{
-
+ impl_->producer->call({ (boost::wformat(L"update(\"%1%\")") % boost::algorithm::replace_all_copy(boost::algorithm::trim_copy_if(data, boost::is_any_of(" \"")), "\"", "\\\"")).str() });
}
std::wstring html_cg_proxy::invoke(int layer, const std::wstring& label)
{
- return L"";
+ auto function_call = boost::algorithm::trim_copy_if(label, boost::is_any_of(" \""));
+
+ // Append empty () if no parameter list has been given
+ auto javascript = boost::ends_with(function_call, ")") ? function_call : function_call + L"()";
+ return impl_->producer->call({ javascript }).get();
}
std::wstring html_cg_proxy::description(int layer)
#include <common/os/filesystem.h>
#include <boost/algorithm/string/predicate.hpp>
-#include <boost/algorithm/string/trim.hpp>
-#include <boost/algorithm/string/replace.hpp>
#include <boost/filesystem.hpp>
-#include <boost/format.hpp>
#include <boost/timer.hpp>
#include <boost/log/trivial.hpp>
#include <boost/property_tree/ptree.hpp>
CefWindowInfo window_info;
- //window_info.SetTransparentPainting(TRUE);
- window_info.SetAsWindowless(nullptr, true);
+ window_info.SetTransparentPainting(true);
+ window_info.SetAsOffScreen(nullptr);
//window_info.SetAsWindowless(nullptr, true);
CefBrowserSettings browser_settings;
return core::draw_frame::empty();
}
- /*core::draw_frame last_frame() override
- {
- return client_
- ? client_->last_frame()
- : core::draw_frame::empty();
- }*/
-
std::future<std::wstring> call(const std::vector<std::wstring>& params) override
{
if (!client_)
const core::video_format_desc& format_desc,
const std::vector<std::wstring>& params)
{
- const auto filename = env::template_folder() + L"/" + params.at(0) + L".html";
+ const auto filename = env::template_folder() + params.at(0) + L".html";
const auto found_filename = find_case_insensitive(filename);
if (!found_filename && !boost::iequals(params.at(0), L"[HTML]"))
return core::frame_producer::empty();
const auto url = found_filename
- ? *found_filename
+ ? L"file://" + *found_filename
: params.at(1);
if (!boost::algorithm::contains(url, ".") || boost::algorithm::ends_with(url, "_A") || boost::algorithm::ends_with(url, "_ALPHA"))
set(OUTPUT_FOLDER "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
foreach(FILE_TO_COPY ${CASPARCG_RUNTIME_DEPENDENCIES})
- if(IS_DIRECTORY "${FILE_TO_COPY}")
+ if(IS_DIRECTORY ${FILE_TO_COPY})
add_custom_command(TARGET casparcg_copy_dependencies POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory \"${FILE_TO_COPY}\" \"${OUTPUT_FOLDER}/\")
add_custom_command(TARGET casparcg_copy_dependencies POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory \"${FILE_TO_COPY}\" \"${CMAKE_CURRENT_BINARY_DIR}/\")
else()