Update to Chromium revision ff259bab (#488528)

This commit is contained in:
Marshall Greenblatt
2017-07-26 19:19:27 -04:00
parent 6da2bbf229
commit f229796a39
416 changed files with 2724 additions and 2213 deletions

View File

@@ -39,14 +39,49 @@
#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(USING_CHROMIUM_INCLUDES)
#if defined(USING_CHROMIUM_INCLUDES)
// When building CEF include the Chromium header directly.
#include "base/atomic_ref_count.h"
// Used when declaring a base::AtomicRefCount value. This is an object type with
// Chromium headers.
#define ATOMIC_DECLARATION (0)
// Maintaining compatibility with AtompicRefCount* functions that were removed
// from Chromium in http://crrev.com/ee96d561.
namespace base {
// Increment a reference count by 1.
inline void AtomicRefCountInc(volatile AtomicRefCount* ptr) {
const_cast<AtomicRefCount*>(ptr)->Increment();
}
// 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 const_cast<AtomicRefCount*>(ptr)->Decrement();
}
// 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) {
return const_cast<AtomicRefCount*>(ptr)->IsOne();
}
// 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) {
return const_cast<AtomicRefCount*>(ptr)->IsZero();
}
} // namespace base
#else // !USING_CHROMIUM_INCLUDES
// The following is substantially similar to the Chromium implementation.
// If the Chromium implementation diverges the below implementation should be
@@ -58,6 +93,10 @@
#define ANNOTATE_HAPPENS_BEFORE(obj) /* empty */
#define ANNOTATE_HAPPENS_AFTER(obj) /* empty */
// Used when declaring a base::AtomicRefCount value. This is an integer/ptr type
// with CEF headers.
#define ATOMIC_DECLARATION = 0
namespace base {
typedef subtle::Atomic32 AtomicRefCount;

View File

@@ -1916,12 +1916,7 @@ typedef struct _cef_popup_features_t {
int menuBarVisible;
int statusBarVisible;
int toolBarVisible;
int locationBarVisible;
int scrollbarsVisible;
int resizable;
int fullscreen;
int dialog;
} cef_popup_features_t;
///
@@ -2463,42 +2458,61 @@ typedef enum {
// Policy for how the Referrer HTTP header value will be sent during navigation.
// If the `--no-referrers` command-line flag is specified then the policy value
// will be ignored and the Referrer value will never be sent.
// Must be kept synchronized with net::URLRequest::ReferrerPolicy from Chromium.
///
typedef enum {
///
// Always send the complete Referrer value.
// Clear the referrer header if the header value is HTTPS but the request
// destination is HTTP. This is the default behavior.
///
REFERRER_POLICY_ALWAYS,
REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE,
REFERRER_POLICY_DEFAULT =
REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE,
///
// Use the default policy. This is REFERRER_POLICY_ORIGIN_WHEN_CROSS_ORIGIN
// when the `--reduced-referrer-granularity` command-line flag is specified
// and REFERRER_POLICY_NO_REFERRER_WHEN_DOWNGRADE otherwise.
//
// A slight variant on CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE:
// If the request destination is HTTP, an HTTPS referrer will be cleared. If
// the request's destination is cross-origin with the referrer (but does not
// downgrade), the referrer's granularity will be stripped down to an origin
// rather than a full URL. Same-origin requests will send the full referrer.
///
REFERRER_POLICY_DEFAULT,
REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN,
///
// When navigating from HTTPS to HTTP do not send the Referrer value.
// Otherwise, send the complete Referrer value.
// Strip the referrer down to an origin when the origin of the referrer is
// different from the destination's origin.
///
REFERRER_POLICY_NO_REFERRER_WHEN_DOWNGRADE,
REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN,
///
// Never send the Referrer value.
// Never change the referrer.
///
REFERRER_POLICY_NEVER,
REFERRER_POLICY_NEVER_CLEAR_REFERRER,
///
// Only send the origin component of the Referrer value.
// Strip the referrer down to the origin regardless of the redirect location.
///
REFERRER_POLICY_ORIGIN,
///
// When navigating cross-origin only send the origin component of the Referrer
// value. Otherwise, send the complete Referrer value.
// Clear the referrer when the request's referrer is cross-origin with the
// request's destination.
///
REFERRER_POLICY_ORIGIN_WHEN_CROSS_ORIGIN,
REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN,
///
// Strip the referrer down to the origin, but clear it entirely if the
// referrer value is HTTPS and the destination is HTTP.
///
REFERRER_POLICY_ORIGIN_CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE,
///
// Always clear the referrer regardless of the request destination.
///
REFERRER_POLICY_NO_REFERRER,
// Always the last value in this enumeration.
REFERRER_POLICY_LAST_VALUE,
} cef_referrer_policy_t;
///

View File

@@ -488,9 +488,7 @@ struct CefPopupFeaturesTraits {
s->menuBarVisible = true;
s->statusBarVisible = true;
s->toolBarVisible = true;
s->locationBarVisible = true;
s->scrollbarsVisible = true;
s->resizable = true;
}
static inline void clear(struct_type* s) {}
@@ -509,11 +507,7 @@ struct CefPopupFeaturesTraits {
target->menuBarVisible = src->menuBarVisible;
target->statusBarVisible = src->statusBarVisible;
target->toolBarVisible = src->toolBarVisible;
target->locationBarVisible = src->locationBarVisible;
target->scrollbarsVisible = src->scrollbarsVisible;
target->resizable = src->resizable;
target->fullscreen = src->fullscreen;
target->dialog = src->dialog;
}
};