Commit 55e6683f authored by thakis's avatar thakis Committed by Commit bot

reflow comments in public/platform/

BUG=563793

Review-Url: https://codereview.chromium.org/2387113002
Cr-Commit-Position: refs/heads/master@{#422664}
parent d9cfae12
...@@ -328,7 +328,8 @@ class BLINK_PLATFORM_EXPORT Platform { ...@@ -328,7 +328,8 @@ class BLINK_PLATFORM_EXPORT Platform {
// Message Ports ------------------------------------------------------- // Message Ports -------------------------------------------------------
// Creates a Message Port Channel pair. This can be called on any thread. // Creates a Message Port Channel pair. This can be called on any thread.
// The returned objects should only be used on the thread they were created on. // The returned objects should only be used on the thread they were created
// on.
virtual void createMessageChannel(WebMessagePortChannel** channel1, virtual void createMessageChannel(WebMessagePortChannel** channel1,
WebMessagePortChannel** channel2) { WebMessagePortChannel** channel2) {
*channel1 = 0; *channel1 = 0;
...@@ -352,7 +353,8 @@ class BLINK_PLATFORM_EXPORT Platform { ...@@ -352,7 +353,8 @@ class BLINK_PLATFORM_EXPORT Platform {
const char* data, const char* data,
size_t dataSize) {} size_t dataSize) {}
// A suggestion to cache this metadata in association with this URL which resource is in CacheStorage. // A suggestion to cache this metadata in association with this URL which
// resource is in CacheStorage.
virtual void cacheMetadataInCacheStorage( virtual void cacheMetadataInCacheStorage(
const WebURL&, const WebURL&,
int64_t responseTime, int64_t responseTime,
...@@ -361,7 +363,8 @@ class BLINK_PLATFORM_EXPORT Platform { ...@@ -361,7 +363,8 @@ class BLINK_PLATFORM_EXPORT Platform {
const blink::WebSecurityOrigin& cacheStorageOrigin, const blink::WebSecurityOrigin& cacheStorageOrigin,
const WebString& cacheStorageCacheName) {} const WebString& cacheStorageCacheName) {}
// Returns the decoded data url if url had a supported mimetype and parsing was successful. // Returns the decoded data url if url had a supported mimetype and parsing
// was successful.
virtual WebData parseDataURL(const WebURL&, virtual WebData parseDataURL(const WebURL&,
WebString& mimetype, WebString& mimetype,
WebString& charset) { WebString& charset) {
...@@ -429,8 +432,9 @@ class BLINK_PLATFORM_EXPORT Platform { ...@@ -429,8 +432,9 @@ class BLINK_PLATFORM_EXPORT Platform {
// Returns a blob of data corresponding to the named resource. // Returns a blob of data corresponding to the named resource.
virtual WebData loadResource(const char* name) { return WebData(); } virtual WebData loadResource(const char* name) { return WebData(); }
// Decodes the in-memory audio file data and returns the linear PCM audio data in the destinationBus. // Decodes the in-memory audio file data and returns the linear PCM audio data
// A sample-rate conversion to sampleRate will occur if the file data is at a different sample-rate. // in the destinationBus. A sample-rate conversion to sampleRate will occur
// if the file data is at a different sample-rate.
// Returns true on success. // Returns true on success.
virtual bool loadAudioResource(WebAudioBus* destinationBus, virtual bool loadAudioResource(WebAudioBus* destinationBus,
const char* audioFileData, const char* audioFileData,
...@@ -455,7 +459,8 @@ class BLINK_PLATFORM_EXPORT Platform { ...@@ -455,7 +459,8 @@ class BLINK_PLATFORM_EXPORT Platform {
// Returns a value such as "en-US". // Returns a value such as "en-US".
virtual WebString defaultLocale() { return WebString(); } virtual WebString defaultLocale() { return WebString(); }
// Returns an interface to the main thread. Can be null if blink was initialized on a thread without a message loop. // Returns an interface to the main thread. Can be null if blink was
// initialized on a thread without a message loop.
WebThread* mainThread() const; WebThread* mainThread() const;
// Returns an interface to the compositor thread. This can be null if the // Returns an interface to the compositor thread. This can be null if the
...@@ -464,11 +469,14 @@ class BLINK_PLATFORM_EXPORT Platform { ...@@ -464,11 +469,14 @@ class BLINK_PLATFORM_EXPORT Platform {
// Testing ------------------------------------------------------------- // Testing -------------------------------------------------------------
// Gets a pointer to URLLoaderMockFactory for testing. Will not be available in production builds. // Gets a pointer to URLLoaderMockFactory for testing. Will not be available
// in production builds.
virtual WebURLLoaderMockFactory* getURLLoaderMockFactory() { return nullptr; } virtual WebURLLoaderMockFactory* getURLLoaderMockFactory() { return nullptr; }
// Record to a RAPPOR privacy-preserving metric, see: https://www.chromium.org/developers/design-documents/rappor. // Record to a RAPPOR privacy-preserving metric, see:
// recordRappor records a sample string, while recordRapporURL records the eTLD+1 of a url. // https://www.chromium.org/developers/design-documents/rappor.
// recordRappor records a sample string, while recordRapporURL records the
// eTLD+1 of a url.
virtual void recordRappor(const char* metric, const WebString& sample) {} virtual void recordRappor(const char* metric, const WebString& sample) {}
virtual void recordRapporURL(const char* metric, const blink::WebURL& url) {} virtual void recordRapporURL(const char* metric, const blink::WebURL& url) {}
...@@ -549,7 +557,8 @@ class BLINK_PLATFORM_EXPORT Platform { ...@@ -549,7 +557,8 @@ class BLINK_PLATFORM_EXPORT Platform {
// WebRTC ---------------------------------------------------------- // WebRTC ----------------------------------------------------------
// Creates a WebRTCPeerConnectionHandler for RTCPeerConnection. // Creates a WebRTCPeerConnectionHandler for RTCPeerConnection.
// May return null if WebRTC functionality is not avaliable or if it's out of resources. // May return null if WebRTC functionality is not avaliable or if it's out of
// resources.
virtual WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler( virtual WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler(
WebRTCPeerConnectionHandlerClient*) { WebRTCPeerConnectionHandlerClient*) {
return nullptr; return nullptr;
...@@ -561,12 +570,14 @@ class BLINK_PLATFORM_EXPORT Platform { ...@@ -561,12 +570,14 @@ class BLINK_PLATFORM_EXPORT Platform {
return nullptr; return nullptr;
} }
// May return null if WebRTC functionality is not available or out of resources. // May return null if WebRTC functionality is not available or out of
// resources.
virtual WebRTCCertificateGenerator* createRTCCertificateGenerator() { virtual WebRTCCertificateGenerator* createRTCCertificateGenerator() {
return nullptr; return nullptr;
} }
// May return null if WebRTC functionality is not available or out of resources. // May return null if WebRTC functionality is not available or out of
// resources.
virtual WebMediaStreamCenter* createMediaStreamCenter( virtual WebMediaStreamCenter* createMediaStreamCenter(
WebMediaStreamCenterClient*) { WebMediaStreamCenterClient*) {
return nullptr; return nullptr;
...@@ -622,7 +633,8 @@ class BLINK_PLATFORM_EXPORT Platform { ...@@ -622,7 +633,8 @@ class BLINK_PLATFORM_EXPORT Platform {
// This method converts from the supplied DOM code enum to the // This method converts from the supplied DOM code enum to the
// embedder's DOM code value for the key pressed. |domCode| values are // embedder's DOM code value for the key pressed. |domCode| values are
// based on the value defined in ui/events/keycodes/dom4/keycode_converter_data.h. // based on the value defined in
// ui/events/keycodes/dom4/keycode_converter_data.h.
// Returns null string, if DOM code value is not found. // Returns null string, if DOM code value is not found.
virtual WebString domCodeStringFromEnum(int domCode) { return WebString(); } virtual WebString domCodeStringFromEnum(int domCode) { return WebString(); }
...@@ -633,8 +645,8 @@ class BLINK_PLATFORM_EXPORT Platform { ...@@ -633,8 +645,8 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual int domEnumFromCodeString(const WebString& codeString) { return 0; } virtual int domEnumFromCodeString(const WebString& codeString) { return 0; }
// This method converts from the supplied DOM |key| enum to the // This method converts from the supplied DOM |key| enum to the
// corresponding DOM |key| string value for the key pressed. |domKey| values are // corresponding DOM |key| string value for the key pressed. |domKey| values
// based on the value defined in ui/events/keycodes/dom3/dom_key_data.h. // are based on the value defined in ui/events/keycodes/dom3/dom_key_data.h.
// Returns empty string, if DOM key value is not found. // Returns empty string, if DOM key value is not found.
virtual WebString domKeyStringFromEnum(int domKey) { return WebString(); } virtual WebString domKeyStringFromEnum(int domKey) { return WebString(); }
...@@ -667,7 +679,7 @@ class BLINK_PLATFORM_EXPORT Platform { ...@@ -667,7 +679,7 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual WebPushProvider* pushProvider() { return nullptr; } virtual WebPushProvider* pushProvider() { return nullptr; }
// Background Sync API------------------------------------------------------------ // Background Sync API-------------------------------------------------
virtual WebSyncProvider* backgroundSyncProvider() { return nullptr; } virtual WebSyncProvider* backgroundSyncProvider() { return nullptr; }
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
namespace blink { namespace blink {
// The ordering is important, as it's used to determine whether preflights are required, // The ordering is important, as it's used to determine whether preflights are
// as per https://mikewest.github.io/cors-rfc1918/#framework // required, as per https://mikewest.github.io/cors-rfc1918/#framework
enum WebAddressSpace { enum WebAddressSpace {
WebAddressSpaceLocal = 0, // loopback, link local WebAddressSpaceLocal = 0, // loopback, link local
WebAddressSpacePrivate, // Reserved by RFC1918 WebAddressSpacePrivate, // Reserved by RFC1918
......
...@@ -80,9 +80,10 @@ class WebApplicationCacheHost { ...@@ -80,9 +80,10 @@ class WebApplicationCacheHost {
const WebApplicationCacheHost* spawningHost) {} const WebApplicationCacheHost* spawningHost) {}
virtual void willStartSubResourceRequest(WebURLRequest&) {} virtual void willStartSubResourceRequest(WebURLRequest&) {}
// One or the other selectCache methods is called after having parsed the <html> tag. // One or the other selectCache methods is called after having parsed the
// The latter returns false if the current document has been identified as a "foreign" // <html> tag. The latter returns false if the current document has been
// entry, in which case the frame navigation will be restarted by webkit. // identified as a "foreign" entry, in which case the frame navigation will be
// restarted by webkit.
virtual void selectCacheWithoutManifest() {} virtual void selectCacheWithoutManifest() {}
virtual bool selectCacheWithManifest(const WebURL& manifestURL) { virtual bool selectCacheWithManifest(const WebURL& manifestURL) {
return true; return true;
......
...@@ -39,7 +39,8 @@ namespace blink { ...@@ -39,7 +39,8 @@ namespace blink {
// This interface is used by the embedder to call into webkit. // This interface is used by the embedder to call into webkit.
class WebApplicationCacheHostClient { class WebApplicationCacheHostClient {
public: public:
// Called when a different cache, including possibly no cache, is associated with the host. // Called when a different cache, including possibly no cache, is associated
// with the host.
virtual void didChangeCacheAssociation() = 0; virtual void didChangeCacheAssociation() = 0;
// Called to fire events in the scriptable interface. // Called to fire events in the scriptable interface.
......
...@@ -10,16 +10,16 @@ ...@@ -10,16 +10,16 @@
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef WebAudioBus_h #ifndef WebAudioBus_h
...@@ -47,11 +47,13 @@ class BLINK_PLATFORM_EXPORT WebAudioBus { ...@@ -47,11 +47,13 @@ class BLINK_PLATFORM_EXPORT WebAudioBus {
WebAudioBus() : m_private(0) {} WebAudioBus() : m_private(0) {}
~WebAudioBus() { reset(); } ~WebAudioBus() { reset(); }
// initialize() allocates memory of the given length for the given number of channels. // initialize() allocates memory of the given length for the given number of
// channels.
void initialize(unsigned numberOfChannels, size_t length, double sampleRate); void initialize(unsigned numberOfChannels, size_t length, double sampleRate);
// resizeSmaller() can only be called after initialize() with a new length <= the initialization length. // resizeSmaller() can only be called after initialize() with a new length <=
// The data stored in the bus will remain undisturbed. // the initialization length. The data stored in the bus will remain
// undisturbed.
void resizeSmaller(size_t newLength); void resizeSmaller(size_t newLength);
// reset() releases the memory allocated from initialize(). // reset() releases the memory allocated from initialize().
......
...@@ -10,16 +10,16 @@ ...@@ -10,16 +10,16 @@
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef WebAudioDestinationConsumer_h #ifndef WebAudioDestinationConsumer_h
...@@ -35,8 +35,9 @@ class WebAudioDestinationConsumer { ...@@ -35,8 +35,9 @@ class WebAudioDestinationConsumer {
virtual void setFormat(size_t numberOfChannels, float sampleRate) = 0; virtual void setFormat(size_t numberOfChannels, float sampleRate) = 0;
// The size of the vector is the number of audio channels, and numberOfFrames is the // The size of the vector is the number of audio channels, and numberOfFrames
// number of audio frames in the (possibly multi-channel) buffer in a planar format. // is the number of audio frames in the (possibly multi-channel) buffer in a
// planar format.
virtual void consumeAudio(const WebVector<const float*>&, virtual void consumeAudio(const WebVector<const float*>&,
size_t numberOfFrames) = 0; size_t numberOfFrames) = 0;
}; };
......
...@@ -10,16 +10,16 @@ ...@@ -10,16 +10,16 @@
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef WebAudioSourceProvider_h #ifndef WebAudioSourceProvider_h
...@@ -36,7 +36,8 @@ class WebAudioSourceProvider { ...@@ -36,7 +36,8 @@ class WebAudioSourceProvider {
public: public:
virtual ~WebAudioSourceProvider() {} virtual ~WebAudioSourceProvider() {}
// provideInput() gets called repeatedly to render time-slices of a continuous audio stream. // provideInput() gets called repeatedly to render time-slices of a continuous
// audio stream.
virtual void provideInput(const WebVector<float*>& audioData, virtual void provideInput(const WebVector<float*>& audioData,
size_t numberOfFrames) = 0; size_t numberOfFrames) = 0;
......
...@@ -10,16 +10,16 @@ ...@@ -10,16 +10,16 @@
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef WebAudioSourceProviderClient_h #ifndef WebAudioSourceProviderClient_h
......
...@@ -85,7 +85,8 @@ class WebBlobRegistry { ...@@ -85,7 +85,8 @@ class WebBlobRegistry {
// TODO(dmurph): Deprecate and migrate to createBuilder // TODO(dmurph): Deprecate and migrate to createBuilder
virtual void registerBlobData(const WebString& uuid, const WebBlobData&) {} virtual void registerBlobData(const WebString& uuid, const WebBlobData&) {}
// The blob is finalized (and sent to the browser) on calling build() on the Builder object. // The blob is finalized (and sent to the browser) on calling build() on the
// Builder object.
virtual std::unique_ptr<Builder> createBuilder( virtual std::unique_ptr<Builder> createBuilder(
const WebString& uuid, const WebString& uuid,
const WebString& contentType) = 0; const WebString& contentType) = 0;
......
...@@ -11,8 +11,10 @@ enum class WebCachePolicy { ...@@ -11,8 +11,10 @@ enum class WebCachePolicy {
UseProtocolCachePolicy, // normal load UseProtocolCachePolicy, // normal load
ValidatingCacheData, // reload ValidatingCacheData, // reload
BypassingCache, // end-to-end reload BypassingCache, // end-to-end reload
ReturnCacheDataElseLoad, // back/forward or encoding change - allow stale data ReturnCacheDataElseLoad, // back/forward or encoding change - allow stale
ReturnCacheDataDontLoad, // results of a post - allow stale data and only use cache // data
ReturnCacheDataDontLoad, // results of a post - allow stale data and only use
// cache
}; };
} // namespace blink } // namespace blink
......
...@@ -66,7 +66,8 @@ class WebCompositorSupport { ...@@ -66,7 +66,8 @@ class WebCompositorSupport {
virtual WebImageLayer* createImageLayer() { return nullptr; } virtual WebImageLayer* createImageLayer() { return nullptr; }
// The ownership of the WebScrollbarThemeGeometry pointer is passed to Chromium. // The ownership of the WebScrollbarThemeGeometry pointer is passed to
// Chromium.
virtual WebScrollbarLayer* createScrollbarLayer(WebScrollbar*, virtual WebScrollbarLayer* createScrollbarLayer(WebScrollbar*,
WebScrollbarThemePainter, WebScrollbarThemePainter,
WebScrollbarThemeGeometry*) { WebScrollbarThemeGeometry*) {
......
...@@ -42,7 +42,8 @@ class BLINK_PLATFORM_EXPORT WebContentLayerClient { ...@@ -42,7 +42,8 @@ class BLINK_PLATFORM_EXPORT WebContentLayerClient {
enum PaintingControlSetting { enum PaintingControlSetting {
// Returns the last PaintArtifact produced. // Returns the last PaintArtifact produced.
PaintDefaultBehavior, PaintDefaultBehavior,
// Paints the content to simulate the behavior of FrameView::synchronizedPaint. // Paints the content to simulate the behavior of
// FrameView::synchronizedPaint.
PaintDefaultBehaviorForTest, PaintDefaultBehaviorForTest,
// Puts the GraphicsContext in disabled mode and disables display item // Puts the GraphicsContext in disabled mode and disables display item
// construction in PaintController. // construction in PaintController.
...@@ -53,17 +54,18 @@ class BLINK_PLATFORM_EXPORT WebContentLayerClient { ...@@ -53,17 +54,18 @@ class BLINK_PLATFORM_EXPORT WebContentLayerClient {
PartialInvalidation PartialInvalidation
}; };
// The paintable region is the rectangular region, within the bounds of the layer // The paintable region is the rectangular region, within the bounds of the
// this client paints, that the client is capable of painting via paintContents(). // layer this client paints, that the client is capable of painting via
// Calling paintContents will return a WebDisplayitemList that is guaranteed valid // paintContents(). Calling paintContents will return a WebDisplayitemList
// only within this region. // that is guaranteed valid only within this region. In particular, this is
// In particular, this is used to represent the interest rect in Blink. // used to represent the interest rect in Blink.
virtual gfx::Rect paintableRegion() = 0; virtual gfx::Rect paintableRegion() = 0;
// Paints the content area for the layer, typically dirty rects submitted // Paints the content area for the layer, typically dirty rects submitted
// through WebContentLayer::setNeedsDisplayInRect, submitting drawing commands // through WebContentLayer::setNeedsDisplayInRect, submitting drawing commands
// to populate the WebDisplayItemList. // to populate the WebDisplayItemList.
// The |PaintingControlSetting| enum controls painting to isolate different components in performance tests. // The |PaintingControlSetting| enum controls painting to isolate different
// components in performance tests.
virtual void paintContents(WebDisplayItemList*, virtual void paintContents(WebDisplayItemList*,
PaintingControlSetting = PaintDefaultBehavior) = 0; PaintingControlSetting = PaintDefaultBehavior) = 0;
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
namespace blink { namespace blink {
// FIXME: This is a placeholder list of error conditions. We'll likely expand the // FIXME: This is a placeholder list of error conditions. We'll likely expand
// list as the API evolves. // the list as the API evolves.
enum WebCredentialManagerError { enum WebCredentialManagerError {
WebCredentialManagerNoError = 0, WebCredentialManagerNoError = 0,
WebCredentialManagerDisabledError, WebCredentialManagerDisabledError,
......
...@@ -209,7 +209,8 @@ class WebCryptoAlgorithm { ...@@ -209,7 +209,8 @@ class WebCryptoAlgorithm {
BLINK_PLATFORM_EXPORT const WebCryptoHkdfParams* hkdfParams() const; BLINK_PLATFORM_EXPORT const WebCryptoHkdfParams* hkdfParams() const;
BLINK_PLATFORM_EXPORT const WebCryptoPbkdf2Params* pbkdf2Params() const; BLINK_PLATFORM_EXPORT const WebCryptoPbkdf2Params* pbkdf2Params() const;
// Returns true if the provided algorithm ID is for a hash (in other words, SHA-*) // Returns true if the provided algorithm ID is for a hash (in other words,
// SHA-*)
BLINK_PLATFORM_EXPORT static bool isHash(WebCryptoAlgorithmId); BLINK_PLATFORM_EXPORT static bool isHash(WebCryptoAlgorithmId);
// Returns true if the provided algorithm ID is for a key derivation function // Returns true if the provided algorithm ID is for a key derivation function
BLINK_PLATFORM_EXPORT static bool isKdf(WebCryptoAlgorithmId); BLINK_PLATFORM_EXPORT static bool isKdf(WebCryptoAlgorithmId);
......
...@@ -123,7 +123,8 @@ class WebCryptoAesKeyGenParams : public WebCryptoAlgorithmParams { ...@@ -123,7 +123,8 @@ class WebCryptoAesKeyGenParams : public WebCryptoAlgorithmParams {
class WebCryptoHmacImportParams : public WebCryptoAlgorithmParamsWithHash { class WebCryptoHmacImportParams : public WebCryptoAlgorithmParamsWithHash {
public: public:
// FIXME: Remove this constructor once it is no longer used by Chromium. http://crbug.com/431085 // FIXME: Remove this constructor once it is no longer used by Chromium.
// http://crbug.com/431085
explicit WebCryptoHmacImportParams(const WebCryptoAlgorithm& hash) explicit WebCryptoHmacImportParams(const WebCryptoAlgorithm& hash)
: WebCryptoAlgorithmParamsWithHash(hash), : WebCryptoAlgorithmParamsWithHash(hash),
m_hasLengthBits(false), m_hasLengthBits(false),
......
...@@ -18,7 +18,8 @@ struct WebDistillabilityFeatures { ...@@ -18,7 +18,8 @@ struct WebDistillabilityFeatures {
unsigned passwordInputCount; unsigned passwordInputCount;
unsigned pCount; unsigned pCount;
unsigned preCount; unsigned preCount;
// The following scores are derived from the triggering logic in Readability from Mozilla. // The following scores are derived from the triggering logic in Readability
// from Mozilla.
// https://github.com/mozilla/readability/blob/85101066386a0872526a6c4ae164c18fcd6cc1db/Readability.js#L1704 // https://github.com/mozilla/readability/blob/85101066386a0872526a6c4ae164c18fcd6cc1db/Readability.js#L1704
double mozScore; double mozScore;
double mozScoreAllSqrt; double mozScoreAllSqrt;
......
...@@ -48,13 +48,13 @@ class WebDragData { ...@@ -48,13 +48,13 @@ class WebDragData {
public: public:
struct Item { struct Item {
enum StorageType { enum StorageType {
// String data with an associated MIME type. Depending on the MIME type, there may be // String data with an associated MIME type. Depending on the MIME type,
// optional metadata attributes as well. // there may be optional metadata attributes as well.
StorageTypeString, StorageTypeString,
// Stores the name of one file being dragged into the renderer. // Stores the name of one file being dragged into the renderer.
StorageTypeFilename, StorageTypeFilename,
// An image being dragged out of the renderer. Contains a buffer holding the image data // An image being dragged out of the renderer. Contains a buffer holding
// as well as the suggested name for saving the image to. // the image data as well as the suggested name for saving the image to.
StorageTypeBinaryData, StorageTypeBinaryData,
// Stores the filesystem URL of one file being dragged into the renderer. // Stores the filesystem URL of one file being dragged into the renderer.
StorageTypeFileSystemFile, StorageTypeFileSystemFile,
......
...@@ -156,8 +156,9 @@ enum class WebEditingCommandType { ...@@ -156,8 +156,9 @@ enum class WebEditingCommandType {
// Add new commands immediately above this line. // Add new commands immediately above this line.
NumberOfCommandTypes, NumberOfCommandTypes,
// These unsupported commands are listed here since they appear in the Microsoft // These unsupported commands are listed here since they appear in the
// documentation used as the starting point for our DOM executeCommand support. // Microsoft documentation used as the starting point for our DOM
// executeCommand support.
// //
// 2D-Position (not supported) // 2D-Position (not supported)
// AbsolutePosition (not supported) // AbsolutePosition (not supported)
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
namespace blink { namespace blink {
// From https://w3c.github.io/encrypted-media/initdata-format-registry.html#registry // From
// https://w3c.github.io/encrypted-media/initdata-format-registry.html#registry
enum class WebEncryptedMediaInitDataType { enum class WebEncryptedMediaInitDataType {
Unknown, Unknown,
Cenc, Cenc,
......
...@@ -10,17 +10,20 @@ ...@@ -10,17 +10,20 @@
namespace blink { namespace blink {
enum class WebEventListenerClass { enum class WebEventListenerClass {
TouchStartOrMove, // This value includes "touchstart", "touchmove" and "pointer" events. TouchStartOrMove, // This value includes "touchstart", "touchmove" and
// "pointer" events.
MouseWheel, // This value includes "wheel" and "mousewheel" events. MouseWheel, // This value includes "wheel" and "mousewheel" events.
TouchEndOrCancel, // This value includes "touchend", "touchcancel" events. TouchEndOrCancel, // This value includes "touchend", "touchcancel" events.
}; };
// Indicates the variety of event listener types for a given WebEventListenerClass. // Indicates the variety of event listener types for a given
// WebEventListenerClass.
enum class WebEventListenerProperties { enum class WebEventListenerProperties {
Nothing, // This should be "None"; but None #defined in X11's X.h Nothing, // This should be "None"; but None #defined in X11's X.h
Passive, // This indicates solely passive listeners. Passive, // This indicates solely passive listeners.
Blocking, // This indicates solely blocking listeners. Blocking, // This indicates solely blocking listeners.
BlockingAndPassive, // This indicates >= 1 blocking listener and >= 1 passive listeners. BlockingAndPassive, // This indicates >= 1 blocking listener and >= 1 passive
// listeners.
}; };
} // namespace blink } // namespace blink
......
...@@ -50,7 +50,8 @@ class WebExternalTextureLayer { ...@@ -50,7 +50,8 @@ class WebExternalTextureLayer {
// Sets whether every pixel in this layer is opaque. Defaults to false. // Sets whether every pixel in this layer is opaque. Defaults to false.
virtual void setOpaque(bool) = 0; virtual void setOpaque(bool) = 0;
// Sets whether this layer's texture has premultiplied alpha or not. Defaults to true. // Sets whether this layer's texture has premultiplied alpha or not. Defaults
// to true.
virtual void setPremultipliedAlpha(bool) = 0; virtual void setPremultipliedAlpha(bool) = 0;
// Sets whether the texture should be blended with the background color // Sets whether the texture should be blended with the background color
......
...@@ -82,14 +82,16 @@ class WebFileSystem { ...@@ -82,14 +82,16 @@ class WebFileSystem {
WebFileSystemCallbacks) {} WebFileSystemCallbacks) {}
// Moves a file or directory at |srcPath| to |destPath|. // Moves a file or directory at |srcPath| to |destPath|.
// WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. // WebFileSystemCallbacks::didSucceed() must be called when the operation is
// completed successfully.
// WebFileSystemCallbacks::didFail() must be called otherwise. // WebFileSystemCallbacks::didFail() must be called otherwise.
virtual void move(const WebURL& srcPath, virtual void move(const WebURL& srcPath,
const WebURL& destPath, const WebURL& destPath,
WebFileSystemCallbacks) = 0; WebFileSystemCallbacks) = 0;
// Copies a file or directory at |srcPath| to |destPath|. // Copies a file or directory at |srcPath| to |destPath|.
// WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. // WebFileSystemCallbacks::didSucceed() must be called when the operation is
// completed successfully.
// WebFileSystemCallbacks::didFail() must be called otherwise. // WebFileSystemCallbacks::didFail() must be called otherwise.
virtual void copy(const WebURL& srcPath, virtual void copy(const WebURL& srcPath,
const WebURL& destPath, const WebURL& destPath,
...@@ -97,19 +99,22 @@ class WebFileSystem { ...@@ -97,19 +99,22 @@ class WebFileSystem {
// Deletes a file or directory at a given |path|. // Deletes a file or directory at a given |path|.
// It is an error to try to remove a directory that is not empty. // It is an error to try to remove a directory that is not empty.
// WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. // WebFileSystemCallbacks::didSucceed() must be called when the operation is
// completed successfully.
// WebFileSystemCallbacks::didFail() must be called otherwise. // WebFileSystemCallbacks::didFail() must be called otherwise.
virtual void remove(const WebURL& path, WebFileSystemCallbacks) = 0; virtual void remove(const WebURL& path, WebFileSystemCallbacks) = 0;
// Deletes a file or directory recursively at a given |path|. // Deletes a file or directory recursively at a given |path|.
// WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. // WebFileSystemCallbacks::didSucceed() must be called when the operation is
// completed successfully.
// WebFileSystemCallbacks::didFail() must be called otherwise. // WebFileSystemCallbacks::didFail() must be called otherwise.
virtual void removeRecursively(const WebURL& path, virtual void removeRecursively(const WebURL& path,
WebFileSystemCallbacks) = 0; WebFileSystemCallbacks) = 0;
// Retrieves the metadata information of the file or directory at the given |path|. // Retrieves the metadata information of the file or directory at the given
// This may not always return the local platform path in remote filesystem cases. // |path|. This may not always return the local platform path in remote
// WebFileSystemCallbacks::didReadMetadata() must be called with a valid metadata when the retrieval is completed successfully. // filesystem cases. WebFileSystemCallbacks::didReadMetadata() must be called
// with a valid metadata when the retrieval is completed successfully.
// WebFileSystemCallbacks::didFail() must be called otherwise. // WebFileSystemCallbacks::didFail() must be called otherwise.
virtual void readMetadata(const WebURL& path, WebFileSystemCallbacks) = 0; virtual void readMetadata(const WebURL& path, WebFileSystemCallbacks) = 0;
...@@ -119,7 +124,8 @@ class WebFileSystem { ...@@ -119,7 +124,8 @@ class WebFileSystem {
// If |exclusive| is false, it succeeds if the |path| already exists or // If |exclusive| is false, it succeeds if the |path| already exists or
// it has successfully created a new file at |path|. // it has successfully created a new file at |path|.
// //
// WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. // WebFileSystemCallbacks::didSucceed() must be called when the operation is
// completed successfully.
// WebFileSystemCallbacks::didFail() must be called otherwise. // WebFileSystemCallbacks::didFail() must be called otherwise.
virtual void createFile(const WebURL& path, virtual void createFile(const WebURL& path,
bool exclusive, bool exclusive,
...@@ -128,7 +134,8 @@ class WebFileSystem { ...@@ -128,7 +134,8 @@ class WebFileSystem {
// Creates a directory at a given |path|. // Creates a directory at a given |path|.
// If the |path| doesn't exist, it creates a new directory at |path|. // If the |path| doesn't exist, it creates a new directory at |path|.
// If |exclusive| is true, it fails if the |path| already exists. // If |exclusive| is true, it fails if the |path| already exists.
// If |exclusive| is false, it succeeds if the |path| already exists or it has successfully created a new directory at |path|. // If |exclusive| is false, it succeeds if the |path| already exists or it has
// successfully created a new directory at |path|.
// //
// WebFileSystemCallbacks::didSucceed() must be called when // WebFileSystemCallbacks::didSucceed() must be called when
// the operation is completed successfully. // the operation is completed successfully.
...@@ -138,40 +145,52 @@ class WebFileSystem { ...@@ -138,40 +145,52 @@ class WebFileSystem {
WebFileSystemCallbacks) = 0; WebFileSystemCallbacks) = 0;
// Checks if a file exists at a given |path|. // Checks if a file exists at a given |path|.
// WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. // WebFileSystemCallbacks::didSucceed() must be called when the operation is
// completed successfully.
// WebFileSystemCallbacks::didFail() must be called otherwise. // WebFileSystemCallbacks::didFail() must be called otherwise.
virtual void fileExists(const WebURL& path, WebFileSystemCallbacks) = 0; virtual void fileExists(const WebURL& path, WebFileSystemCallbacks) = 0;
// Checks if a directory exists at a given |path|. // Checks if a directory exists at a given |path|.
// WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. // WebFileSystemCallbacks::didSucceed() must be called when the operation is
// completed successfully.
// WebFileSystemCallbacks::didFail() must be called otherwise. // WebFileSystemCallbacks::didFail() must be called otherwise.
virtual void directoryExists(const WebURL& path, WebFileSystemCallbacks) = 0; virtual void directoryExists(const WebURL& path, WebFileSystemCallbacks) = 0;
// Reads directory entries of a given directory at |path| and returns a callbacks ID which can be used to wait for additional results. // Reads directory entries of a given directory at |path| and returns a
// WebFileSystemCallbacks::didReadDirectory() must be called when the operation is completed successfully. // callbacks ID which can be used to wait for additional results.
// WebFileSystemCallbacks::didReadDirectory() must be called when the
// operation is completed successfully.
// WebFileSystemCallbacks::didFail() must be called otherwise. // WebFileSystemCallbacks::didFail() must be called otherwise.
virtual int readDirectory(const WebURL& path, WebFileSystemCallbacks) = 0; virtual int readDirectory(const WebURL& path, WebFileSystemCallbacks) = 0;
// Creates a WebFileWriter that can be used to write to the given file. // Creates a WebFileWriter that can be used to write to the given file.
// WebFileSystemCallbacks::didCreateFileWriter() must be called with the created WebFileWriter when the operation is completed successfully. // WebFileSystemCallbacks::didCreateFileWriter() must be called with the
// created WebFileWriter when the operation is completed successfully.
// WebFileSystemCallbacks::didFail() must be called otherwise. // WebFileSystemCallbacks::didFail() must be called otherwise.
virtual void createFileWriter(const WebURL& path, virtual void createFileWriter(const WebURL& path,
WebFileWriterClient*, WebFileWriterClient*,
WebFileSystemCallbacks) = 0; WebFileSystemCallbacks) = 0;
// Creates a snapshot file for a given file specified by |path|. It returns the metadata of the created snapshot file. // Creates a snapshot file for a given file specified by |path|. It returns
// The returned metadata should include a local platform path to the snapshot image. // the metadata of the created snapshot file. The returned metadata should
// In local filesystem cases the backend may simply return the metadata of the file itself (as well as readMetadata does), while in // include a local platform path to the snapshot image. In local filesystem
// remote filesystem case the backend may download the file into a temporary snapshot file and return the metadata of the temporary file. // cases the backend may simply return the metadata of the file itself (as
// well as readMetadata does), while in remote filesystem case the backend may
// download the file into a temporary snapshot file and return the metadata of
// the temporary file.
// The returned metadata is used to create a File object for the |path|. // The returned metadata is used to create a File object for the |path|.
// The snapshot file is supposed to be deleted when the last reference to a blink::File referring to it's path is dropped. // The snapshot file is supposed to be deleted when the last reference to a
// WebFileSystemCallbacks::didCreateSnapshotFile() with the metadata of the snapshot file must be called when the operation is completed successfully. // blink::File referring to it's path is dropped.
// WebFileSystemCallbacks::didCreateSnapshotFile() with the metadata of the
// snapshot file must be called when the operation is completed successfully.
// WebFileSystemCallbacks::didFail() must be called otherwise. // WebFileSystemCallbacks::didFail() must be called otherwise.
virtual void createSnapshotFileAndReadMetadata(const WebURL& path, virtual void createSnapshotFileAndReadMetadata(const WebURL& path,
WebFileSystemCallbacks) = 0; WebFileSystemCallbacks) = 0;
// Waits for additional results returned for the method call and returns true if possible. // Waits for additional results returned for the method call and returns true
// Returns false if there is no running method call corresponding for the given ID. // if possible.
// Returns false if there is no running method call corresponding for the
// given ID.
// |callbacksId| must be the value returned by the original method call. // |callbacksId| must be the value returned by the original method call.
virtual bool waitForAdditionalResult(int callbacksId) = 0; virtual bool waitForAdditionalResult(int callbacksId) = 0;
......
...@@ -44,11 +44,14 @@ class WebFileWriter { ...@@ -44,11 +44,14 @@ class WebFileWriter {
virtual ~WebFileWriter() {} virtual ~WebFileWriter() {}
// Only one write or one truncate operation can be in progress at a time. // Only one write or one truncate operation can be in progress at a time.
// These functions are asynchronous and will report results through the WebFileWriter's associated WebFileWriterClient. // These functions are asynchronous and will report results through the
// WebFileWriter's associated WebFileWriterClient.
virtual void write(long long position, const WebString& blobUUID) {} virtual void write(long long position, const WebString& blobUUID) {}
virtual void truncate(long long length) = 0; virtual void truncate(long long length) = 0;
// Cancel will attempt to abort a running write or truncate. However, it may not be possible to cancel an in-progress action, or the call may have come in too late. Partial writes are possible. // Cancel will attempt to abort a running write or truncate. However, it may
// not be possible to cancel an in-progress action, or the call may have come
// in too late. Partial writes are possible.
// Do not call cancel when there is no write or truncate in progress. // Do not call cancel when there is no write or truncate in progress.
virtual void cancel() = 0; virtual void cancel() = 0;
}; };
......
...@@ -45,7 +45,9 @@ class WebFileWriterClient { ...@@ -45,7 +45,9 @@ class WebFileWriterClient {
// Called once when the truncate completes successfully. // Called once when the truncate completes successfully.
virtual void didTruncate() = 0; virtual void didTruncate() = 0;
// Called if the write or truncate fails, or if it is cancelled before the write or truncate completes. Completion of an operation will be signalled exactly once, either by didFail, didTruncate, or didWrite(..., true). // Called if the write or truncate fails, or if it is cancelled before the
// write or truncate completes. Completion of an operation will be signalled
// exactly once, either by didFail, didTruncate, or didWrite(..., true).
virtual void didFail(WebFileError) = 0; virtual void didFail(WebFileError) = 0;
protected: protected:
......
...@@ -23,7 +23,8 @@ class BLINK_PLATFORM_EXPORT WebFrameScheduler { ...@@ -23,7 +23,8 @@ class BLINK_PLATFORM_EXPORT WebFrameScheduler {
virtual void setFrameVisible(bool) {} virtual void setFrameVisible(bool) {}
// Tells the scheduler that the page this frame belongs to is not visible. // Tells the scheduler that the page this frame belongs to is not visible.
// The scheduler may throttle tasks associated with pages that are not visible. // The scheduler may throttle tasks associated with pages that are not
// visible.
virtual void setPageVisible(bool) {} virtual void setPageVisible(bool) {}
// Set whether this frame is cross origin w.r.t. the top level frame. Cross // Set whether this frame is cross origin w.r.t. the top level frame. Cross
......
...@@ -10,16 +10,16 @@ ...@@ -10,16 +10,16 @@
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef WebGestureCurve_h #ifndef WebGestureCurve_h
......
...@@ -10,16 +10,16 @@ ...@@ -10,16 +10,16 @@
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef WebGestureCurveTarget_h #ifndef WebGestureCurveTarget_h
......
...@@ -68,8 +68,8 @@ class WebImage { ...@@ -68,8 +68,8 @@ class WebImage {
BLINK_PLATFORM_EXPORT static WebImage fromData(const WebData&, BLINK_PLATFORM_EXPORT static WebImage fromData(const WebData&,
const WebSize& desiredSize); const WebSize& desiredSize);
// Returns a list of all frames in the image. Only the first frame at each pixel // Returns a list of all frames in the image. Only the first frame at each
// size will be returned. // pixel size will be returned.
BLINK_PLATFORM_EXPORT static WebVector<WebImage> framesFromData( BLINK_PLATFORM_EXPORT static WebVector<WebImage> framesFromData(
const WebData&); const WebData&);
......
...@@ -228,9 +228,9 @@ class WebInputEvent { ...@@ -228,9 +228,9 @@ class WebInputEvent {
static const int InputModifiers = ShiftKey | ControlKey | AltKey | MetaKey; static const int InputModifiers = ShiftKey | ControlKey | AltKey | MetaKey;
double double timeStampSeconds; // Seconds since platform start with microsecond
timeStampSeconds; // Seconds since platform start with microsecond resolution. // resolution.
unsigned size; // The size of this structure, for serialization. unsigned size; // The size of this structure, for serialization.
Type type; Type type;
int modifiers; int modifiers;
...@@ -463,7 +463,7 @@ class WebMouseWheelEvent : public WebMouseEvent { ...@@ -463,7 +463,7 @@ class WebMouseWheelEvent : public WebMouseEvent {
dispatchType(Blocking) {} dispatchType(Blocking) {}
}; };
// WebGestureEvent -------------------------------------------------------------- // WebGestureEvent ---------------------------------------------------------
class WebGestureEvent : public WebInputEvent { class WebGestureEvent : public WebInputEvent {
public: public:
...@@ -539,12 +539,13 @@ class WebGestureEvent : public WebInputEvent { ...@@ -539,12 +539,13 @@ class WebGestureEvent : public WebInputEvent {
// If true, this event will skip hit testing to find a scroll // If true, this event will skip hit testing to find a scroll
// target and instead just scroll the viewport. // target and instead just scroll the viewport.
bool targetViewport; bool targetViewport;
// The state of inertial phase scrolling. OSX has unique phases for normal and // The state of inertial phase scrolling. OSX has unique phases for normal
// momentum scroll events. Should always be UnknownMomentumPhase for touch based // and momentum scroll events. Should always be UnknownMomentumPhase for
// input as it generates GestureFlingStart instead. // touch based input as it generates GestureFlingStart instead.
InertialPhaseState inertialPhase; InertialPhaseState inertialPhase;
// True if this event was synthesized in order to force a hit test; avoiding scroll // True if this event was synthesized in order to force a hit test;
// latching behavior until crbug.com/526463 is fully implemented. // avoiding scroll latching behavior until crbug.com/526463 is fully
// implemented.
bool synthetic; bool synthetic;
// number of pointers down. // number of pointers down.
...@@ -572,9 +573,9 @@ class WebGestureEvent : public WebInputEvent { ...@@ -572,9 +573,9 @@ class WebGestureEvent : public WebInputEvent {
// The original delta units the scrollBegin and scrollUpdates // The original delta units the scrollBegin and scrollUpdates
// were sent as. // were sent as.
ScrollUnits deltaUnits; ScrollUnits deltaUnits;
// The state of inertial phase scrolling. OSX has unique phases for normal and // The state of inertial phase scrolling. OSX has unique phases for normal
// momentum scroll events. Should always be UnknownMomentumPhase for touch based // and momentum scroll events. Should always be UnknownMomentumPhase for
// input as it generates GestureFlingStart instead. // touch based input as it generates GestureFlingStart instead.
InertialPhaseState inertialPhase; InertialPhaseState inertialPhase;
// True if this event was synthesized in order to generate the proper // True if this event was synthesized in order to generate the proper
// GSB/GSU/GSE matching sequences. This is a temporary so that a future // GSB/GSU/GSE matching sequences. This is a temporary so that a future
...@@ -641,7 +642,8 @@ class WebTouchEvent : public WebInputEvent { ...@@ -641,7 +642,8 @@ class WebTouchEvent : public WebInputEvent {
// dispatched. // dispatched.
bool dispatchedDuringFling; bool dispatchedDuringFling;
// Whether this touch event is a touchstart or a first touchmove event per scroll. // Whether this touch event is a touchstart or a first touchmove event per
// scroll.
bool touchStartOrFirstTouchMove; bool touchStartOrFirstTouchMove;
// A unique identifier for the touch event. Valid ids start at one and // A unique identifier for the touch event. Valid ids start at one and
......
...@@ -12,7 +12,8 @@ enum class WebInputEventResult { ...@@ -12,7 +12,8 @@ enum class WebInputEventResult {
NotHandled, NotHandled,
// Event was consumed but suppressed before dispatched to application. // Event was consumed but suppressed before dispatched to application.
HandledSuppressed, HandledSuppressed,
// Event was consumed by application itself; ie. a script handler calling preventDefault. // Event was consumed by application itself; ie. a script handler calling
// preventDefault.
HandledApplication, HandledApplication,
// Event was consumed by the system; ie. executing the default action. // Event was consumed by the system; ie. executing the default action.
HandledSystem, HandledSystem,
......
...@@ -59,7 +59,8 @@ class WebLayer { ...@@ -59,7 +59,8 @@ class WebLayer {
public: public:
virtual ~WebLayer() {} virtual ~WebLayer() {}
// Returns a positive ID that will be unique across all WebLayers allocated in this process. // Returns a positive ID that will be unique across all WebLayers allocated in
// this process.
virtual int id() const = 0; virtual int id() const = 0;
// Sets a region of the layer as invalid, i.e. needs to update its content. // Sets a region of the layer as invalid, i.e. needs to update its content.
...@@ -161,14 +162,16 @@ class WebLayer { ...@@ -161,14 +162,16 @@ class WebLayer {
virtual void setScrollPositionDouble(WebDoublePoint) = 0; virtual void setScrollPositionDouble(WebDoublePoint) = 0;
virtual WebDoublePoint scrollPositionDouble() const = 0; virtual WebDoublePoint scrollPositionDouble() const = 0;
// To set a WebLayer as scrollable we must specify the corresponding clip layer. // To set a WebLayer as scrollable we must specify the corresponding clip
// layer.
virtual void setScrollClipLayer(WebLayer*) = 0; virtual void setScrollClipLayer(WebLayer*) = 0;
virtual bool scrollable() const = 0; virtual bool scrollable() const = 0;
virtual void setUserScrollable(bool horizontal, bool vertical) = 0; virtual void setUserScrollable(bool horizontal, bool vertical) = 0;
virtual bool userScrollableHorizontal() const = 0; virtual bool userScrollableHorizontal() const = 0;
virtual bool userScrollableVertical() const = 0; virtual bool userScrollableVertical() const = 0;
// Indicates that this layer will always scroll on the main thread for the provided reason. // Indicates that this layer will always scroll on the main thread for the
// provided reason.
virtual void addMainThreadScrollingReasons(uint32_t) = 0; virtual void addMainThreadScrollingReasons(uint32_t) = 0;
virtual void clearMainThreadScrollingReasons( virtual void clearMainThreadScrollingReasons(
uint32_t mainThreadScrollingReasonsToClear) = 0; uint32_t mainThreadScrollingReasonsToClear) = 0;
......
...@@ -10,16 +10,16 @@ ...@@ -10,16 +10,16 @@
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef WebLayerScrollClient_h #ifndef WebLayerScrollClient_h
......
...@@ -78,17 +78,21 @@ class WebLayerTreeView { ...@@ -78,17 +78,21 @@ class WebLayerTreeView {
// Sets the background transparency for the viewport. The default is 'false'. // Sets the background transparency for the viewport. The default is 'false'.
virtual void setHasTransparentBackground(bool) {} virtual void setHasTransparentBackground(bool) {}
// Sets whether this view is visible. In threaded mode, a view that is not visible will not // Sets whether this view is visible. In threaded mode, a view that is not
// composite or trigger updateAnimations() or layout() calls until it becomes visible. // visible will not composite or trigger updateAnimations() or layout() calls
// until it becomes visible.
virtual void setVisible(bool) {} virtual void setVisible(bool) {}
// Sets the current page scale factor and minimum / maximum limits. Both limits are initially 1 (no page scale allowed). // Sets the current page scale factor and minimum / maximum limits. Both
// limits are initially 1 (no page scale allowed).
virtual void setPageScaleFactorAndLimits(float pageScaleFactor, virtual void setPageScaleFactorAndLimits(float pageScaleFactor,
float minimum, float minimum,
float maximum) {} float maximum) {}
// Starts an animation of the page scale to a target scale factor and scroll offset. // Starts an animation of the page scale to a target scale factor and scroll
// If useAnchor is true, destination is a point on the screen that will remain fixed for the duration of the animation. // offset.
// If useAnchor is true, destination is a point on the screen that will remain
// fixed for the duration of the animation.
// If useAnchor is false, destination is the final top-left scroll position. // If useAnchor is false, destination is the final top-left scroll position.
virtual void startPageScaleAnimation(const WebPoint& destination, virtual void startPageScaleAnimation(const WebPoint& destination,
bool useAnchor, bool useAnchor,
...@@ -109,13 +113,14 @@ class WebLayerTreeView { ...@@ -109,13 +113,14 @@ class WebLayerTreeView {
WebTopControlsState current, WebTopControlsState current,
bool animate) {} bool animate) {}
// Set top controls height. If |shrinkViewport| is set to true, then Blink shrunk the viewport clip // Set top controls height. If |shrinkViewport| is set to true, then Blink
// layers by the top controls height. // shrunk the viewport clip layers by the top controls height.
virtual void setTopControlsHeight(float height, bool shrinkViewport) {} virtual void setTopControlsHeight(float height, bool shrinkViewport) {}
// Flow control and scheduling --------------------------------------- // Flow control and scheduling ---------------------------------------
// Indicates that blink needs a BeginFrame, but that nothing might actually be dirty. // Indicates that blink needs a BeginFrame, but that nothing might actually be
// dirty.
virtual void setNeedsBeginFrame() {} virtual void setNeedsBeginFrame() {}
// Indicates that blink needs a BeginFrame and to update compositor state. // Indicates that blink needs a BeginFrame and to update compositor state.
...@@ -125,19 +130,20 @@ class WebLayerTreeView { ...@@ -125,19 +130,20 @@ class WebLayerTreeView {
virtual void didStopFlinging() {} virtual void didStopFlinging() {}
// Run layout and paint of all pending document changes asynchronously. // Run layout and paint of all pending document changes asynchronously.
// The caller is resposible for keeping the WebLayoutAndPaintAsyncCallback object // The caller is resposible for keeping the WebLayoutAndPaintAsyncCallback
// alive until it is called. // object alive until it is called.
virtual void layoutAndPaintAsync(WebLayoutAndPaintAsyncCallback*) {} virtual void layoutAndPaintAsync(WebLayoutAndPaintAsyncCallback*) {}
// The caller is responsible for keeping the WebCompositeAndReadbackAsyncCallback // The caller is responsible for keeping the
// object alive until it is called. // WebCompositeAndReadbackAsyncCallback object alive until it is called.
virtual void compositeAndReadbackAsync( virtual void compositeAndReadbackAsync(
WebCompositeAndReadbackAsyncCallback*) {} WebCompositeAndReadbackAsyncCallback*) {}
// Prevents updates to layer tree from becoming visible. // Prevents updates to layer tree from becoming visible.
virtual void setDeferCommits(bool deferCommits) {} virtual void setDeferCommits(bool deferCommits) {}
// Identify key layers to the compositor when using the pinch virtual viewport. // Identify key layers to the compositor when using the pinch virtual
// viewport.
virtual void registerViewportLayers( virtual void registerViewportLayers(
const WebLayer* overscrollElasticityLayer, const WebLayer* overscrollElasticityLayer,
const WebLayer* pageScaleLayer, const WebLayer* pageScaleLayer,
......
...@@ -14,15 +14,16 @@ namespace blink { ...@@ -14,15 +14,16 @@ namespace blink {
// browser process for histogram splitting. // browser process for histogram splitting.
enum WebLoadingBehaviorFlag { enum WebLoadingBehaviorFlag {
WebLoadingBehaviorNone = 0, WebLoadingBehaviorNone = 0,
// Indicates that the page used the document.write evaluator to preload scan for resources inserted via document.write. // Indicates that the page used the document.write evaluator to preload scan
// for resources inserted via document.write.
WebLoadingBehaviorDocumentWriteEvaluator = 1 << 0, WebLoadingBehaviorDocumentWriteEvaluator = 1 << 0,
// Indicates that the page is controlled by a Service Worker. // Indicates that the page is controlled by a Service Worker.
WebLoadingBehaviorServiceWorkerControlled = 1 << 1, WebLoadingBehaviorServiceWorkerControlled = 1 << 1,
// Indicates that the page has a synchronous, cross-origin document.written // Indicates that the page has a synchronous, cross-origin document.written
// script. // script.
WebLoadingBehaviorDocumentWriteBlock = 1 << 2, WebLoadingBehaviorDocumentWriteBlock = 1 << 2,
// Indicates that the page is a reload and has a synchronous, cross-origin document.written // Indicates that the page is a reload and has a synchronous, cross-origin
// script. // document.written script.
WebLoadingBehaviorDocumentWriteBlockReload = 1 << 3, WebLoadingBehaviorDocumentWriteBlockReload = 1 << 3,
// The page loaded external CSS that generated a PreloadRequest via the // The page loaded external CSS that generated a PreloadRequest via the
// CSSPreloaderResourceClient. // CSSPreloaderResourceClient.
......
...@@ -181,7 +181,8 @@ class WebMediaPlayer { ...@@ -181,7 +181,8 @@ class WebMediaPlayer {
return false; return false;
} }
// Do a GPU-GPU textures copy. If the copy is impossible or fails, it returns false. // Do a GPU-GPU textures copy. If the copy is impossible or fails, it returns
// false.
virtual bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, virtual bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*,
unsigned target, unsigned target,
unsigned texture, unsigned texture,
...@@ -192,7 +193,8 @@ class WebMediaPlayer { ...@@ -192,7 +193,8 @@ class WebMediaPlayer {
bool flipY) { bool flipY) {
return false; return false;
} }
// Copy sub video frame texture to |texture|. If the copy is impossible or fails, it returns false. // Copy sub video frame texture to |texture|. If the copy is impossible or
// fails, it returns false.
virtual bool copyVideoSubTextureToPlatformTexture(gpu::gles2::GLES2Interface*, virtual bool copyVideoSubTextureToPlatformTexture(gpu::gles2::GLES2Interface*,
unsigned target, unsigned target,
unsigned texture, unsigned texture,
......
...@@ -10,16 +10,16 @@ ...@@ -10,16 +10,16 @@
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef WebMediaStream_h #ifndef WebMediaStream_h
...@@ -74,8 +74,8 @@ class WebMediaStream { ...@@ -74,8 +74,8 @@ class WebMediaStream {
BLINK_PLATFORM_EXPORT void removeTrack(const WebMediaStreamTrack&); BLINK_PLATFORM_EXPORT void removeTrack(const WebMediaStreamTrack&);
// Extra data associated with this WebMediaStream. // Extra data associated with this WebMediaStream.
// If non-null, the extra data pointer will be deleted when the object is destroyed. // If non-null, the extra data pointer will be deleted when the object is
// Setting the extra data pointer will cause any existing non-null // destroyed. Setting the extra data pointer will cause any existing non-null
// extra data pointer to be deleted. // extra data pointer to be deleted.
BLINK_PLATFORM_EXPORT ExtraData* getExtraData() const; BLINK_PLATFORM_EXPORT ExtraData* getExtraData() const;
BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*);
......
...@@ -59,7 +59,8 @@ class WebMediaStreamCenter { ...@@ -59,7 +59,8 @@ class WebMediaStreamCenter {
return false; return false;
} }
// Caller must take the ownership of the returned |WebAudioSourceProvider| object. // Caller must take the ownership of the returned |WebAudioSourceProvider|
// object.
virtual WebAudioSourceProvider* createWebAudioSourceFromMediaStreamTrack( virtual WebAudioSourceProvider* createWebAudioSourceFromMediaStreamTrack(
const WebMediaStreamTrack&) { const WebMediaStreamTrack&) {
return nullptr; return nullptr;
......
...@@ -104,8 +104,8 @@ class WebMediaStreamSource { ...@@ -104,8 +104,8 @@ class WebMediaStreamSource {
BLINK_PLATFORM_EXPORT ReadyState getReadyState() const; BLINK_PLATFORM_EXPORT ReadyState getReadyState() const;
// Extra data associated with this object. // Extra data associated with this object.
// If non-null, the extra data pointer will be deleted when the object is destroyed. // If non-null, the extra data pointer will be deleted when the object is
// Setting the extra data pointer will cause any existing non-null // destroyed. Setting the extra data pointer will cause any existing non-null
// extra data pointer to be deleted. // extra data pointer to be deleted.
BLINK_PLATFORM_EXPORT ExtraData* getExtraData() const; BLINK_PLATFORM_EXPORT ExtraData* getExtraData() const;
BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*);
...@@ -113,8 +113,8 @@ class WebMediaStreamSource { ...@@ -113,8 +113,8 @@ class WebMediaStreamSource {
BLINK_PLATFORM_EXPORT WebMediaConstraints constraints(); BLINK_PLATFORM_EXPORT WebMediaConstraints constraints();
// Only used if if this is a WebAudio source. // Only used if if this is a WebAudio source.
// The WebAudioDestinationConsumer is not owned, and has to be disposed of separately // The WebAudioDestinationConsumer is not owned, and has to be disposed of
// after calling removeAudioConsumer. // separately after calling removeAudioConsumer.
BLINK_PLATFORM_EXPORT bool requiresAudioConsumer() const; BLINK_PLATFORM_EXPORT bool requiresAudioConsumer() const;
BLINK_PLATFORM_EXPORT void addAudioConsumer(WebAudioDestinationConsumer*); BLINK_PLATFORM_EXPORT void addAudioConsumer(WebAudioDestinationConsumer*);
BLINK_PLATFORM_EXPORT bool removeAudioConsumer(WebAudioDestinationConsumer*); BLINK_PLATFORM_EXPORT bool removeAudioConsumer(WebAudioDestinationConsumer*);
......
...@@ -10,16 +10,16 @@ ...@@ -10,16 +10,16 @@
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef WebMediaStreamTrack_h #ifndef WebMediaStreamTrack_h
...@@ -84,8 +84,8 @@ class WebMediaStreamTrack { ...@@ -84,8 +84,8 @@ class WebMediaStreamTrack {
BLINK_PLATFORM_EXPORT bool isMuted() const; BLINK_PLATFORM_EXPORT bool isMuted() const;
// Extra data associated with this WebMediaStream. // Extra data associated with this WebMediaStream.
// If non-null, the extra data pointer will be deleted when the object is destroyed. // If non-null, the extra data pointer will be deleted when the object is
// Setting the track data pointer will cause any existing non-null // destroyed. Setting the track data pointer will cause any existing non-null
// track data pointer to be deleted. // track data pointer to be deleted.
BLINK_PLATFORM_EXPORT TrackData* getTrackData() const; BLINK_PLATFORM_EXPORT TrackData* getTrackData() const;
BLINK_PLATFORM_EXPORT void setTrackData(TrackData*); BLINK_PLATFORM_EXPORT void setTrackData(TrackData*);
......
...@@ -45,8 +45,9 @@ class WebString; ...@@ -45,8 +45,9 @@ class WebString;
typedef WebVector<class WebMessagePortChannel*> WebMessagePortChannelArray; typedef WebVector<class WebMessagePortChannel*> WebMessagePortChannelArray;
// Provides an interface to a Message Port Channel implementation. The object owns itself and // Provides an interface to a Message Port Channel implementation. The object
// is signalled that its not needed anymore with the destroy() call. // owns itself and is signalled that its not needed anymore with the destroy()
// call.
class WebMessagePortChannel { class WebMessagePortChannel {
public: public:
virtual void setClient(WebMessagePortChannelClient*) = 0; virtual void setClient(WebMessagePortChannelClient*) = 0;
......
...@@ -41,7 +41,8 @@ namespace blink { ...@@ -41,7 +41,8 @@ namespace blink {
class Prerender; class Prerender;
// WebPrerenderRelType is a bitfield since multiple rel attributes can be set on the same prerender. // WebPrerenderRelType is a bitfield since multiple rel attributes can be set on
// the same prerender.
enum WebPrerenderRelType { enum WebPrerenderRelType {
PrerenderRelTypePrerender = 0x1, PrerenderRelTypePrerender = 0x1,
PrerenderRelTypeNext = 0x2, PrerenderRelTypeNext = 0x2,
......
...@@ -49,9 +49,10 @@ class WebPrerenderingSupport { ...@@ -49,9 +49,10 @@ class WebPrerenderingSupport {
// A prerender is canceled when it is removed from a document. // A prerender is canceled when it is removed from a document.
virtual void cancel(const WebPrerender&) = 0; virtual void cancel(const WebPrerender&) = 0;
// A prerender is abandoned when it's navigated away from or suspended in the page cache. This // A prerender is abandoned when it's navigated away from or suspended in the
// is a weaker signal than cancel(), since the launcher hasn't indicated that the prerender isn't // page cache. This is a weaker signal than cancel(), since the launcher
// wanted, and we may end up using it after, for instance, a short redirect chain. // hasn't indicated that the prerender isn't wanted, and we may end up using
// it after, for instance, a short redirect chain.
virtual void abandon(const WebPrerender&) = 0; virtual void abandon(const WebPrerender&) = 0;
protected: protected:
......
...@@ -27,19 +27,20 @@ class WebRTCCertificatePEM { ...@@ -27,19 +27,20 @@ class WebRTCCertificatePEM {
WebString m_certificate; WebString m_certificate;
}; };
// WebRTCCertificate is an interface defining what Blink needs to know about certificates, // WebRTCCertificate is an interface defining what Blink needs to know about
// hiding Chromium and WebRTC layer implementation details. It is possible to create // certificates, hiding Chromium and WebRTC layer implementation details. It is
// shallow copies of the WebRTCCertificate. When all copies are destroyed, the // possible to create shallow copies of the WebRTCCertificate. When all copies
// implementation specific data must be freed. WebRTCCertificate objects thus act as // are destroyed, the implementation specific data must be freed.
// references to the reference counted internal data. // WebRTCCertificate objects thus act as references to the reference counted
// internal data.
class WebRTCCertificate { class WebRTCCertificate {
public: public:
WebRTCCertificate() = default; WebRTCCertificate() = default;
virtual ~WebRTCCertificate() = default; virtual ~WebRTCCertificate() = default;
// Copies the WebRTCCertificate object without copying the underlying implementation // Copies the WebRTCCertificate object without copying the underlying
// specific (WebRTC layer) certificate. When all copies are destroyed the underlying // implementation specific (WebRTC layer) certificate. When all copies are
// data is freed. // destroyed the underlying data is freed.
virtual std::unique_ptr<WebRTCCertificate> shallowCopy() const = 0; virtual std::unique_ptr<WebRTCCertificate> shallowCopy() const = 0;
// Returns the expiration time in ms relative to epoch, 1970-01-01T00:00:00Z. // Returns the expiration time in ms relative to epoch, 1970-01-01T00:00:00Z.
......
...@@ -43,13 +43,15 @@ namespace blink { ...@@ -43,13 +43,15 @@ namespace blink {
using WebRTCCertificateCallback = using WebRTCCertificateCallback =
WebCallbacks<std::unique_ptr<WebRTCCertificate>, void>; WebCallbacks<std::unique_ptr<WebRTCCertificate>, void>;
// Interface defining a class that can generate WebRTCCertificates asynchronously. // Interface defining a class that can generate WebRTCCertificates
// asynchronously.
class WebRTCCertificateGenerator { class WebRTCCertificateGenerator {
public: public:
virtual ~WebRTCCertificateGenerator() {} virtual ~WebRTCCertificateGenerator() {}
// Start generating a certificate asynchronously. |observer| is invoked on the // Start generating a certificate asynchronously. |observer| is invoked on the
// same thread that called generateCertificate when the operation is completed. // same thread that called generateCertificate when the operation is
// completed.
virtual void generateCertificate( virtual void generateCertificate(
const WebRTCKeyParams&, const WebRTCKeyParams&,
std::unique_ptr<WebRTCCertificateCallback> observer) = 0; std::unique_ptr<WebRTCCertificateCallback> observer) = 0;
...@@ -59,11 +61,12 @@ class WebRTCCertificateGenerator { ...@@ -59,11 +61,12 @@ class WebRTCCertificateGenerator {
std::unique_ptr<WebRTCCertificateCallback> observer) = 0; std::unique_ptr<WebRTCCertificateCallback> observer) = 0;
// Determines if the parameters are supported by |generateCertificate|. // Determines if the parameters are supported by |generateCertificate|.
// For example, if the number of bits of some parameter is too small or too large we // For example, if the number of bits of some parameter is too small or too
// may want to reject it for security or performance reasons. // large we may want to reject it for security or performance reasons.
virtual bool isSupportedKeyParams(const WebRTCKeyParams&) = 0; virtual bool isSupportedKeyParams(const WebRTCKeyParams&) = 0;
// Creates a certificate from the PEM strings. See also |WebRTCCertificate::toPEM|. // Creates a certificate from the PEM strings. See also
// |WebRTCCertificate::toPEM|.
virtual std::unique_ptr<WebRTCCertificate> fromPEM( virtual std::unique_ptr<WebRTCCertificate> fromPEM(
blink::WebString pemPrivateKey, blink::WebString pemPrivateKey,
blink::WebString pemCertificate) = 0; blink::WebString pemCertificate) = 0;
......
...@@ -10,16 +10,16 @@ ...@@ -10,16 +10,16 @@
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef WebRTCDataChannelHandler_h #ifndef WebRTCDataChannelHandler_h
......
...@@ -10,16 +10,16 @@ ...@@ -10,16 +10,16 @@
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef WebRTCDataChannelHandlerClient_h #ifndef WebRTCDataChannelHandlerClient_h
......
...@@ -51,7 +51,8 @@ class WebRTCVoidRequest; ...@@ -51,7 +51,8 @@ class WebRTCVoidRequest;
class WebString; class WebString;
struct WebRTCDataChannelInit; struct WebRTCDataChannelInit;
// Used to back histogram value of "WebRTC.PeerConnection.SelectedRtcpMuxPolicy", so treat as append-only. // Used to back histogram value of
// "WebRTC.PeerConnection.SelectedRtcpMuxPolicy", so treat as append-only.
enum RtcpMuxPolicy { enum RtcpMuxPolicy {
RtcpMuxPolicyRequire, RtcpMuxPolicyRequire,
RtcpMuxPolicyNegotiate, RtcpMuxPolicyNegotiate,
...@@ -93,8 +94,9 @@ class WebRTCPeerConnectionHandler { ...@@ -93,8 +94,9 @@ class WebRTCPeerConnectionHandler {
virtual bool addStream(const WebMediaStream&, const WebMediaConstraints&) = 0; virtual bool addStream(const WebMediaStream&, const WebMediaConstraints&) = 0;
virtual void removeStream(const WebMediaStream&) = 0; virtual void removeStream(const WebMediaStream&) = 0;
virtual void getStats(const WebRTCStatsRequest&) = 0; virtual void getStats(const WebRTCStatsRequest&) = 0;
// Gets stats using the new stats collection API, see third_party/webrtc/api/stats/. // Gets stats using the new stats collection API, see
// These will replace the old stats collection API when the new API has matured enough. // third_party/webrtc/api/stats/. These will replace the old stats collection
// API when the new API has matured enough.
virtual void getStats(std::unique_ptr<WebRTCStatsReportCallback>) = 0; virtual void getStats(std::unique_ptr<WebRTCStatsReportCallback>) = 0;
virtual WebRTCDataChannelHandler* createDataChannel( virtual WebRTCDataChannelHandler* createDataChannel(
const WebString& label, const WebString& label,
......
...@@ -68,7 +68,8 @@ class WebRTCStatsMember { ...@@ -68,7 +68,8 @@ class WebRTCStatsMember {
virtual WebRTCStatsMemberType type() const = 0; virtual WebRTCStatsMemberType type() const = 0;
virtual bool isDefined() const = 0; virtual bool isDefined() const = 0;
// Value getters. No conversion is performed; the function must match the member's |type|. // Value getters. No conversion is performed; the function must match the
// member's |type|.
virtual int32_t valueInt32() const = 0; virtual int32_t valueInt32() const = 0;
virtual uint32_t valueUint32() const = 0; virtual uint32_t valueUint32() const = 0;
virtual int64_t valueInt64() const = 0; virtual int64_t valueInt64() const = 0;
......
...@@ -10,16 +10,16 @@ ...@@ -10,16 +10,16 @@
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef WebRTCStatsResponse_h #ifndef WebRTCStatsResponse_h
......
...@@ -38,9 +38,9 @@ class BLINK_PLATFORM_EXPORT WebScheduler { ...@@ -38,9 +38,9 @@ class BLINK_PLATFORM_EXPORT WebScheduler {
// the associated WebThread. // the associated WebThread.
virtual void shutdown() = 0; virtual void shutdown() = 0;
// Returns true if there is high priority work pending on the associated WebThread // Returns true if there is high priority work pending on the associated
// and the caller should yield to let the scheduler service that work. // WebThread and the caller should yield to let the scheduler service that
// Must be called on the associated WebThread. // work. Must be called on the associated WebThread.
virtual bool shouldYieldForHighPriorityWork() = 0; virtual bool shouldYieldForHighPriorityWork() = 0;
// Returns true if a currently running idle task could exceed its deadline // Returns true if a currently running idle task could exceed its deadline
......
...@@ -10,16 +10,16 @@ ...@@ -10,16 +10,16 @@
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef WebScrollbar_h #ifndef WebScrollbar_h
......
...@@ -64,7 +64,8 @@ class WebScrollbarThemePainter { ...@@ -64,7 +64,8 @@ class WebScrollbarThemePainter {
BLINK_PLATFORM_EXPORT void paintTickmarks(WebCanvas*, const WebRect&); BLINK_PLATFORM_EXPORT void paintTickmarks(WebCanvas*, const WebRect&);
BLINK_PLATFORM_EXPORT void paintThumb(WebCanvas*, const WebRect&); BLINK_PLATFORM_EXPORT void paintThumb(WebCanvas*, const WebRect&);
// This opacity is applied on top of the content that is painted for the thumb. // This opacity is applied on top of the content that is painted for the
// thumb.
BLINK_PLATFORM_EXPORT float thumbOpacity() const; BLINK_PLATFORM_EXPORT float thumbOpacity() const;
BLINK_PLATFORM_EXPORT bool trackNeedsRepaint() const; BLINK_PLATFORM_EXPORT bool trackNeedsRepaint() const;
......
...@@ -71,8 +71,8 @@ class WebSecurityOrigin { ...@@ -71,8 +71,8 @@ class WebSecurityOrigin {
BLINK_PLATFORM_EXPORT WebString host() const; BLINK_PLATFORM_EXPORT WebString host() const;
BLINK_PLATFORM_EXPORT unsigned short port() const; BLINK_PLATFORM_EXPORT unsigned short port() const;
// |port()| will return 0 if the port is the default for an origin. This method // |port()| will return 0 if the port is the default for an origin. This
// instead returns the effective port, even if it is the default port // method instead returns the effective port, even if it is the default port
// (e.g. "http" => 80). // (e.g. "http" => 80).
BLINK_PLATFORM_EXPORT unsigned short effectivePort() const; BLINK_PLATFORM_EXPORT unsigned short effectivePort() const;
...@@ -115,8 +115,9 @@ class WebSecurityOrigin { ...@@ -115,8 +115,9 @@ class WebSecurityOrigin {
BLINK_PLATFORM_EXPORT operator WTF::PassRefPtr<SecurityOrigin>() const; BLINK_PLATFORM_EXPORT operator WTF::PassRefPtr<SecurityOrigin>() const;
BLINK_PLATFORM_EXPORT SecurityOrigin* get() const; BLINK_PLATFORM_EXPORT SecurityOrigin* get() const;
#else #else
// TODO(mkwst): A number of properties don't survive a round-trip ('document.domain', for instance). // TODO(mkwst): A number of properties don't survive a round-trip
// We'll need to fix that for OOPI-enabled embedders: https://crbug.com/490074. // ('document.domain', for instance). We'll need to fix that for OOPI-enabled
// embedders, https://crbug.com/490074.
operator url::Origin() const { operator url::Origin() const {
return isUnique() ? url::Origin() return isUnique() ? url::Origin()
: url::Origin::UnsafelyCreateOriginWithoutNormalization( : url::Origin::UnsafelyCreateOriginWithoutNormalization(
...@@ -137,7 +138,8 @@ class WebSecurityOrigin { ...@@ -137,7 +138,8 @@ class WebSecurityOrigin {
#endif #endif
private: private:
// Present only to facilitate conversion from 'url::Origin'; this constructor shouldn't be used anywhere else. // Present only to facilitate conversion from 'url::Origin'; this constructor
// shouldn't be used anywhere else.
BLINK_PLATFORM_EXPORT static WebSecurityOrigin BLINK_PLATFORM_EXPORT static WebSecurityOrigin
createFromTuple(const WebString& protocol, const WebString& host, int port); createFromTuple(const WebString& protocol, const WebString& host, int port);
......
...@@ -67,7 +67,8 @@ class WebSourceBuffer { ...@@ -67,7 +67,8 @@ class WebSourceBuffer {
size_t newDataSize) = 0; size_t newDataSize) = 0;
// Appends data and runs the segment parser loop algorithm. // Appends data and runs the segment parser loop algorithm.
// The algorithm may update |*timestampOffset| if |timestampOffset| is not null. // The algorithm may update |*timestampOffset| if |timestampOffset| is not
// null.
// Returns true on success, otherwise the append error algorithm needs to // Returns true on success, otherwise the append error algorithm needs to
// run with the decode error parameter set to true. // run with the decode error parameter set to true.
virtual bool append(const unsigned char* data, virtual bool append(const unsigned char* data,
......
...@@ -17,7 +17,8 @@ class WebSourceBufferClient { ...@@ -17,7 +17,8 @@ class WebSourceBufferClient {
public: public:
virtual ~WebSourceBufferClient() {} virtual ~WebSourceBufferClient() {}
// Complete media track info: track type, unique track id, kind, label, language. // Complete media track info: track type, unique track id, kind, label,
// language.
struct MediaTrackInfo { struct MediaTrackInfo {
WebMediaPlayer::TrackType trackType; WebMediaPlayer::TrackType trackType;
WebMediaPlayer::TrackId id; WebMediaPlayer::TrackId id;
...@@ -27,8 +28,10 @@ class WebSourceBufferClient { ...@@ -27,8 +28,10 @@ class WebSourceBufferClient {
WebString language; WebString language;
}; };
// Notifies SourceBuffer that parsing of a new init segment has been completed successfully. The input parameter is a collection // Notifies SourceBuffer that parsing of a new init segment has been completed
// of information about media tracks found in the new init segment. The return value is true in case of success. // successfully. The input parameter is a collection of information about
// media tracks found in the new init segment. The return value is true in
// case of success.
virtual bool initializationSegmentReceived( virtual bool initializationSegmentReceived(
const WebVector<MediaTrackInfo>& tracks) = 0; const WebVector<MediaTrackInfo>& tracks) = 0;
}; };
......
...@@ -56,7 +56,8 @@ class WebSpeechSynthesisUtterance { ...@@ -56,7 +56,8 @@ class WebSpeechSynthesisUtterance {
BLINK_PLATFORM_EXPORT WebString lang() const; BLINK_PLATFORM_EXPORT WebString lang() const;
BLINK_PLATFORM_EXPORT WebString voice() const; BLINK_PLATFORM_EXPORT WebString voice() const;
// As defined in: https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html // As defined in:
// https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
BLINK_PLATFORM_EXPORT float volume() const; // 0...1, 1 is default BLINK_PLATFORM_EXPORT float volume() const; // 0...1, 1 is default
BLINK_PLATFORM_EXPORT float rate() const; // 0.1...10, 1 is default BLINK_PLATFORM_EXPORT float rate() const; // 0.1...10, 1 is default
BLINK_PLATFORM_EXPORT float pitch() const; // 0...2, 1 is default BLINK_PLATFORM_EXPORT float pitch() const; // 0...2, 1 is default
......
...@@ -51,18 +51,18 @@ class WebStorageArea { ...@@ -51,18 +51,18 @@ class WebStorageArea {
// The number of key/value pairs in the storage area. // The number of key/value pairs in the storage area.
virtual unsigned length() = 0; virtual unsigned length() = 0;
// Get a value for a specific key. Valid key indices are 0 through length() - 1. // Get a value for a specific key. Valid key indices are 0 through
// Indexes may change on any set/removeItem call. Will return null if the index // length() - 1. Indexes may change on any set/removeItem call. Will return
// provided is out of range. // null if the index provided is out of range.
virtual WebString key(unsigned index) = 0; virtual WebString key(unsigned index) = 0;
// Get the value that corresponds to a specific key. This returns null if there is // Get the value that corresponds to a specific key. This returns null if
// no entry for that key. // there is no entry for that key.
virtual WebString getItem(const WebString& key) = 0; virtual WebString getItem(const WebString& key) = 0;
// Set the value that corresponds to a specific key. Result will either be ResultOK // Set the value that corresponds to a specific key. Result will either be
// or some particular error. The value is NOT set when there's an error. |pageUrl| is the // ResultOK or some particular error. The value is NOT set when there's an
// url that should be used if a storage event fires. // error. |pageUrl| is the url that should be used if a storage event fires.
virtual void setItem(const WebString& key, virtual void setItem(const WebString& key,
const WebString& newValue, const WebString& newValue,
const WebURL& pageUrl, const WebURL& pageUrl,
...@@ -71,20 +71,22 @@ class WebStorageArea { ...@@ -71,20 +71,22 @@ class WebStorageArea {
setItem(key, newValue, pageUrl, result, unused); setItem(key, newValue, pageUrl, result, unused);
} }
// Remove the value associated with a particular key. |pageUrl| is the url that should be used // Remove the value associated with a particular key. |pageUrl| is the url
// if a storage event fires. // that should be used if a storage event fires.
virtual void removeItem(const WebString& key, const WebURL& pageUrl) { virtual void removeItem(const WebString& key, const WebURL& pageUrl) {
WebString unused; WebString unused;
removeItem(key, pageUrl, unused); removeItem(key, pageUrl, unused);
} }
// Clear all key/value pairs. |pageUrl| is the url that should be used if a storage event fires. // Clear all key/value pairs. |pageUrl| is the url that should be used if a
// storage event fires.
virtual void clear(const WebURL& pageUrl) { virtual void clear(const WebURL& pageUrl) {
bool unused; bool unused;
clear(pageUrl, unused); clear(pageUrl, unused);
} }
// DEPRECATED - being replaced by the async variants above which do not return oldValues or block until completion. // DEPRECATED - being replaced by the async variants above which do not return
// oldValues or block until completion.
virtual void setItem(const WebString& key, virtual void setItem(const WebString& key,
const WebString& newValue, const WebString& newValue,
const WebURL&, const WebURL&,
......
...@@ -38,16 +38,18 @@ namespace blink { ...@@ -38,16 +38,18 @@ namespace blink {
class WebStorageArea; class WebStorageArea;
class WebString; class WebString;
// WebStorageNamespace represents a collection of StorageAreas. Typically, you'll have // WebStorageNamespace represents a collection of StorageAreas. Typically,
// multiple StorageNamespaces to represent the SessionStorage for each tab and a single // you'll have multiple StorageNamespaces to represent the SessionStorage for
// StorageNamespace to represent LocalStorage for the entire browser. // each tab and a single StorageNamespace to represent LocalStorage for the
// entire browser.
class WebStorageNamespace { class WebStorageNamespace {
public: public:
virtual ~WebStorageNamespace() {} virtual ~WebStorageNamespace() {}
// Create a new WebStorageArea object. Two subsequent calls with the same origin // Create a new WebStorageArea object. Two subsequent calls with the same
// will return two different WebStorageArea objects that share the same backing store. // origin will return two different WebStorageArea objects that share the same
// You should call delete on the returned object when you're finished. // backing store. You should call delete on the returned object when you're
// finished.
virtual WebStorageArea* createStorageArea(const WebString& origin) = 0; virtual WebStorageArea* createStorageArea(const WebString& origin) = 0;
// Returns true of the two instances represent the same storage namespace. // Returns true of the two instances represent the same storage namespace.
......
...@@ -58,20 +58,21 @@ class BLINK_PLATFORM_EXPORT WebTaskRunner { ...@@ -58,20 +58,21 @@ class BLINK_PLATFORM_EXPORT WebTaskRunner {
// --- // ---
// Headless Chrome virtualises time for determinism and performance (fast forwarding // Headless Chrome virtualises time for determinism and performance (fast
// of timers). To make this work some parts of blink (e.g. Timers) need to use virtual // forwarding of timers). To make this work some parts of blink (e.g. Timers)
// time, however by default new code should use the normal non-virtual time APIs. // need to use virtual time, however by default new code should use the normal
// non-virtual time APIs.
// Returns a double which is the number of seconds since epoch (Jan 1, 1970). // Returns a double which is the number of seconds since epoch (Jan 1, 1970).
// This may represent either the real time, or a virtual time depending on // This may represent either the real time, or a virtual time depending on
// whether or not the WebTaskRunner is associated with a virtual time domain or a // whether or not the WebTaskRunner is associated with a virtual time domain
// real time domain. // or a real time domain.
virtual double virtualTimeSeconds() const = 0; virtual double virtualTimeSeconds() const = 0;
// Returns a microsecond resolution platform dependant time source. // Returns a microsecond resolution platform dependant time source.
// This may represent either the real time, or a virtual time depending on // This may represent either the real time, or a virtual time depending on
// whether or not the WebTaskRunner is associated with a virtual time domain or a // whether or not the WebTaskRunner is associated with a virtual time domain
// real time domain. // or a real time domain.
virtual double monotonicallyIncreasingVirtualTimeSeconds() const = 0; virtual double monotonicallyIncreasingVirtualTimeSeconds() const = 0;
// Returns the underlying task runner object. // Returns the underlying task runner object.
......
...@@ -61,22 +61,26 @@ class BLINK_PLATFORM_EXPORT WebThread { ...@@ -61,22 +61,26 @@ class BLINK_PLATFORM_EXPORT WebThread {
virtual void didProcessTask() = 0; virtual void didProcessTask() = 0;
}; };
// Returns a WebTaskRunner bound to the underlying scheduler's default task queue. // Returns a WebTaskRunner bound to the underlying scheduler's default task
// queue.
virtual WebTaskRunner* getWebTaskRunner() { return nullptr; } virtual WebTaskRunner* getWebTaskRunner() { return nullptr; }
virtual bool isCurrentThread() const = 0; virtual bool isCurrentThread() const = 0;
virtual PlatformThreadId threadId() const { return 0; } virtual PlatformThreadId threadId() const { return 0; }
// TaskObserver is an object that receives task notifications from the MessageLoop // TaskObserver is an object that receives task notifications from the
// MessageLoop
// NOTE: TaskObserver implementation should be extremely fast! // NOTE: TaskObserver implementation should be extremely fast!
// This API is performance sensitive. Use only if you have a compelling reason. // This API is performance sensitive. Use only if you have a compelling
// reason.
virtual void addTaskObserver(TaskObserver*) {} virtual void addTaskObserver(TaskObserver*) {}
virtual void removeTaskObserver(TaskObserver*) {} virtual void removeTaskObserver(TaskObserver*) {}
// TaskTimeObserver is an object that receives notifications for // TaskTimeObserver is an object that receives notifications for
// CPU time spent in each top-level MessageLoop task. // CPU time spent in each top-level MessageLoop task.
// NOTE: TaskTimeObserver implementation should be extremely fast! // NOTE: TaskTimeObserver implementation should be extremely fast!
// This API is performance sensitive. Use only if you have a compelling reason. // This API is performance sensitive. Use only if you have a compelling
// reason.
virtual void addTaskTimeObserver(scheduler::TaskTimeObserver*) {} virtual void addTaskTimeObserver(scheduler::TaskTimeObserver*) {}
virtual void removeTaskTimeObserver(scheduler::TaskTimeObserver*) {} virtual void removeTaskTimeObserver(scheduler::TaskTimeObserver*) {}
......
...@@ -44,8 +44,8 @@ namespace blink { ...@@ -44,8 +44,8 @@ namespace blink {
class RawData; class RawData;
// A container for raw bytes. It is inexpensive to copy a WebThreadSafeData object. // A container for raw bytes. It is inexpensive to copy a WebThreadSafeData
// It is safe to pass a WebThreadSafeData across threads!!! // object. It is safe to pass a WebThreadSafeData across threads.
class WebThreadSafeData { class WebThreadSafeData {
public: public:
WebThreadSafeData() {} WebThreadSafeData() {}
......
...@@ -92,7 +92,8 @@ class BLINK_PLATFORM_EXPORT WebURLLoaderClient { ...@@ -92,7 +92,8 @@ class BLINK_PLATFORM_EXPORT WebURLLoaderClient {
int encodedDataLength, int encodedDataLength,
int encodedBodyLength) {} int encodedBodyLength) {}
// Called when a chunk of renderer-generated metadata is received from the cache. // Called when a chunk of renderer-generated metadata is received from the
// cache.
virtual void didReceiveCachedMetadata(WebURLLoader*, virtual void didReceiveCachedMetadata(WebURLLoader*,
const char* data, const char* data,
int dataLength) {} int dataLength) {}
...@@ -106,7 +107,8 @@ class BLINK_PLATFORM_EXPORT WebURLLoaderClient { ...@@ -106,7 +107,8 @@ class BLINK_PLATFORM_EXPORT WebURLLoaderClient {
// Called when the load completes with an error. // Called when the load completes with an error.
virtual void didFail(WebURLLoader*, const WebURLError&) {} virtual void didFail(WebURLLoader*, const WebURLError&) {}
// Value passed to didFinishLoading when total encoded data length isn't known. // Value passed to didFinishLoading when total encoded data length isn't
// known.
static const int64_t kUnknownEncodedDataLength = -1; static const int64_t kUnknownEncodedDataLength = -1;
protected: protected:
......
...@@ -53,7 +53,8 @@ class WebURLLoaderMockFactory { ...@@ -53,7 +53,8 @@ class WebURLLoaderMockFactory {
// FrameTestHelpers instead. // FrameTestHelpers instead.
virtual void serveAsynchronousRequests() = 0; virtual void serveAsynchronousRequests() = 0;
// Set a delegate that allows callbacks for all WebURLLoaderClients to be intercepted. // Set a delegate that allows callbacks for all WebURLLoaderClients to be
// intercepted.
virtual void setLoaderDelegate(WebURLLoaderTestDelegate*) = 0; virtual void setLoaderDelegate(WebURLLoaderTestDelegate*) = 0;
}; };
......
...@@ -58,7 +58,8 @@ class WebURLRequest { ...@@ -58,7 +58,8 @@ class WebURLRequest {
PriorityVeryHigh, PriorityVeryHigh,
}; };
// Corresponds to Fetch's "context": http://fetch.spec.whatwg.org/#concept-request-context // Corresponds to Fetch's "context":
// http://fetch.spec.whatwg.org/#concept-request-context
enum RequestContext { enum RequestContext {
RequestContextUnspecified = 0, RequestContextUnspecified = 0,
RequestContextAudio, RequestContextAudio,
...@@ -96,7 +97,8 @@ class WebURLRequest { ...@@ -96,7 +97,8 @@ class WebURLRequest {
RequestContextXSLT RequestContextXSLT
}; };
// Corresponds to Fetch's "context frame type": http://fetch.spec.whatwg.org/#concept-request-context-frame-type // Corresponds to Fetch's "context frame type":
// http://fetch.spec.whatwg.org/#concept-request-context-frame-type
enum FrameType { enum FrameType {
FrameTypeAuxiliary, FrameTypeAuxiliary,
FrameTypeNested, FrameTypeNested,
...@@ -134,11 +136,13 @@ class WebURLRequest { ...@@ -134,11 +136,13 @@ class WebURLRequest {
ReportIntent, // Report metrics with UI action displayed intent. ReportIntent, // Report metrics with UI action displayed intent.
}; };
// The LoFi state which determines whether to request a Lo-Fi version of the resource. // The LoFi state which determines whether to request a Lo-Fi version of the
// resource.
enum LoFiState { enum LoFiState {
LoFiUnspecified, // Let the browser process decide whether or not to request the Lo-Fi version. LoFiUnspecified, // Let the browser process decide whether or not to
LoFiOff, // Request a normal (non-Lo-Fi) version of the resource. // request the Lo-Fi version.
LoFiOn, // Request a Lo-Fi version of the resource. LoFiOff, // Request a normal (non-Lo-Fi) version of the resource.
LoFiOn, // Request a Lo-Fi version of the resource.
}; };
// Indicates which types of ServiceWorkers should skip handling this request. // Indicates which types of ServiceWorkers should skip handling this request.
...@@ -195,7 +199,8 @@ class WebURLRequest { ...@@ -195,7 +199,8 @@ class WebURLRequest {
BLINK_PLATFORM_EXPORT void setHTTPMethod(const WebString&); BLINK_PLATFORM_EXPORT void setHTTPMethod(const WebString&);
BLINK_PLATFORM_EXPORT WebString httpHeaderField(const WebString& name) const; BLINK_PLATFORM_EXPORT WebString httpHeaderField(const WebString& name) const;
// It's not possible to set the referrer header using this method. Use setHTTPReferrer instead. // It's not possible to set the referrer header using this method. Use
// setHTTPReferrer instead.
BLINK_PLATFORM_EXPORT void setHTTPHeaderField(const WebString& name, BLINK_PLATFORM_EXPORT void setHTTPHeaderField(const WebString& name,
const WebString& value); const WebString& value);
BLINK_PLATFORM_EXPORT void setHTTPReferrer(const WebString& referrer, BLINK_PLATFORM_EXPORT void setHTTPReferrer(const WebString& referrer,
...@@ -280,7 +285,8 @@ class WebURLRequest { ...@@ -280,7 +285,8 @@ class WebURLRequest {
BLINK_PLATFORM_EXPORT FetchRedirectMode getFetchRedirectMode() const; BLINK_PLATFORM_EXPORT FetchRedirectMode getFetchRedirectMode() const;
BLINK_PLATFORM_EXPORT void setFetchRedirectMode(FetchRedirectMode); BLINK_PLATFORM_EXPORT void setFetchRedirectMode(FetchRedirectMode);
// The LoFi state which determines whether to request a Lo-Fi version of the resource. // The LoFi state which determines whether to request a Lo-Fi version of the
// resource.
BLINK_PLATFORM_EXPORT LoFiState getLoFiState() const; BLINK_PLATFORM_EXPORT LoFiState getLoFiState() const;
BLINK_PLATFORM_EXPORT void setLoFiState(LoFiState); BLINK_PLATFORM_EXPORT void setLoFiState(LoFiState);
......
...@@ -121,7 +121,8 @@ class WebURLResponse { ...@@ -121,7 +121,8 @@ class WebURLResponse {
// All strings are human-readable values. // All strings are human-readable values.
WebString protocol; WebString protocol;
WebString keyExchange; WebString keyExchange;
// keyExchangeGroup is the empty string if not applicable for the connection's key exchange. // keyExchangeGroup is the empty string if not applicable for the
// connection's key exchange.
WebString keyExchangeGroup; WebString keyExchangeGroup;
WebString cipher; WebString cipher;
// mac is the empty string when the connection cipher suite does not // mac is the empty string when the connection cipher suite does not
...@@ -227,8 +228,8 @@ class WebURLResponse { ...@@ -227,8 +228,8 @@ class WebURLResponse {
BLINK_PLATFORM_EXPORT bool wasFetchedViaSPDY() const; BLINK_PLATFORM_EXPORT bool wasFetchedViaSPDY() const;
BLINK_PLATFORM_EXPORT void setWasFetchedViaSPDY(bool); BLINK_PLATFORM_EXPORT void setWasFetchedViaSPDY(bool);
// Flag whether this request was loaded after the TLS/Next-Protocol-Negotiation was used. // Flag whether this request was loaded after the
// This is related to SPDY. // TLS/Next-Protocol-Negotiation was used. This is related to SPDY.
BLINK_PLATFORM_EXPORT bool wasNpnNegotiated() const; BLINK_PLATFORM_EXPORT bool wasNpnNegotiated() const;
BLINK_PLATFORM_EXPORT void setWasNpnNegotiated(bool); BLINK_PLATFORM_EXPORT void setWasNpnNegotiated(bool);
......
...@@ -27,9 +27,9 @@ class BLINK_PLATFORM_EXPORT WebViewScheduler { ...@@ -27,9 +27,9 @@ class BLINK_PLATFORM_EXPORT WebViewScheduler {
virtual std::unique_ptr<WebFrameScheduler> createFrameScheduler( virtual std::unique_ptr<WebFrameScheduler> createFrameScheduler(
BlameContext*) = 0; BlameContext*) = 0;
// Instructs this WebViewScheduler to use virtual time. When virtual time is enabled // Instructs this WebViewScheduler to use virtual time. When virtual time is
// the system doesn't actually sleep for the delays between tasks before executing // enabled the system doesn't actually sleep for the delays between tasks
// them. E.g: A-E are delayed tasks // before executing them. E.g: A-E are delayed tasks
// //
// | A B C D E (normal) // | A B C D E (normal)
// |-----------------------------> time // |-----------------------------> time
...@@ -42,25 +42,28 @@ class BLINK_PLATFORM_EXPORT WebViewScheduler { ...@@ -42,25 +42,28 @@ class BLINK_PLATFORM_EXPORT WebViewScheduler {
virtual bool virtualTimeAllowedToAdvance() const = 0; virtual bool virtualTimeAllowedToAdvance() const = 0;
enum class VirtualTimePolicy { enum class VirtualTimePolicy {
// In this policy virtual time is allowed to advance. If the blink scheduler runs out of // In this policy virtual time is allowed to advance. If the blink scheduler
// immediate work, the virtual timebase will be incremented so that the next sceduled // runs out of immediate work, the virtual timebase will be incremented so
// timer may fire. NOTE Tasks will be run in time order (as usual). // that the next sceduled timer may fire. NOTE Tasks will be run in time
// order (as usual).
ADVANCE, ADVANCE,
// In this policy virtual time is not allowed to advance. Delayed tasks posted to // In this policy virtual time is not allowed to advance. Delayed tasks
// WebTaskRunners owned by any child WebFrameSchedulers will be paused, unless their // posted to WebTaskRunners owned by any child WebFrameSchedulers will be
// scheduled run time is less than or equal to the current virtual time. Note non-delayed // paused, unless their scheduled run time is less than or equal to the
// tasks will run as normal. // current virtual time. Note non-delayed tasks will run as normal.
PAUSE, PAUSE,
// In this policy virtual time is allowed to advance unless there are pending network // In this policy virtual time is allowed to advance unless there are
// fetches associated any child WebFrameScheduler, or a document is being parsed on a // pending network fetches associated any child WebFrameScheduler, or a
// background thread. Initially virtual time is not allowed to advance until we have seen // document is being parsed on a background thread. Initially virtual time
// at least one load. The aim being to try and make loading (more) deterministic. // is not allowed to advance until we have seen at least one load. The aim
// being to try and make loading (more) deterministic.
DETERMINISTIC_LOADING DETERMINISTIC_LOADING
}; };
// Sets the virtual time policy, which is applied imemdiatly to all child WebFrameSchedulers. // Sets the virtual time policy, which is applied imemdiatly to all child
// WebFrameSchedulers.
virtual void setVirtualTimePolicy(VirtualTimePolicy) = 0; virtual void setVirtualTimePolicy(VirtualTimePolicy) = 0;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment