summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/public/platform/platform.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-24 11:40:17 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-24 12:42:11 +0000
commit5d87695f37678f96492b258bbab36486c59866b4 (patch)
treebe9783bbaf04fb930c4d74ca9c00b5e7954c8bc6 /chromium/third_party/blink/public/platform/platform.h
parent6c11fb357ec39bf087b8b632e2b1e375aef1b38b (diff)
downloadqtwebengine-chromium-5d87695f37678f96492b258bbab36486c59866b4.tar.gz
BASELINE: Update Chromium to 75.0.3770.56
Change-Id: I86d2007fd27a45d5797eee06f4c9369b8b50ac4f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/third_party/blink/public/platform/platform.h')
-rw-r--r--chromium/third_party/blink/public/platform/platform.h53
1 files changed, 29 insertions, 24 deletions
diff --git a/chromium/third_party/blink/public/platform/platform.h b/chromium/third_party/blink/public/platform/platform.h
index e89fff83c1c..198d6649ef4 100644
--- a/chromium/third_party/blink/public/platform/platform.h
+++ b/chromium/third_party/blink/public/platform/platform.h
@@ -31,12 +31,9 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_PLATFORM_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_PLATFORM_H_
-#ifdef WIN32
-#include <windows.h>
-#endif
-
#include <memory>
+#include "base/files/file.h"
#include "base/memory/scoped_refptr.h"
#include "base/metrics/user_metrics_action.h"
#include "base/strings/string_piece.h"
@@ -133,6 +130,7 @@ class WebSpeechSynthesizer;
class WebSpeechSynthesizerClient;
class WebStorageNamespace;
class WebThemeEngine;
+class WebTransmissionEncodingInfoHandler;
class WebURLLoaderMockFactory;
class WebURLResponse;
class WebURLResponse;
@@ -144,14 +142,6 @@ class WebThreadScheduler;
class BLINK_PLATFORM_EXPORT Platform {
public:
-// HTML5 Database ------------------------------------------------------
-
-#ifdef WIN32
- typedef HANDLE FileHandle;
-#else
- typedef int FileHandle;
-#endif
-
// Initialize platform and wtf. If you need to initialize the entire Blink,
// you should use blink::Initialize. WebThreadScheduler must be owned by
// the embedder.
@@ -229,12 +219,12 @@ class BLINK_PLATFORM_EXPORT Platform {
// Must return non-null.
virtual WebBlobRegistry* GetBlobRegistry() { return nullptr; }
- // Database ------------------------------------------------------------
+ // Database (WebSQL) ---------------------------------------------------
// Opens a database file.
- virtual FileHandle DatabaseOpenFile(const WebString& vfs_file_name,
+ virtual base::File DatabaseOpenFile(const WebString& vfs_file_name,
int desired_flags) {
- return FileHandle();
+ return base::File();
}
// Deletes a database file and returns the error code.
@@ -244,24 +234,24 @@ class BLINK_PLATFORM_EXPORT Platform {
}
// Returns the attributes of the given database file.
- virtual long DatabaseGetFileAttributes(const WebString& vfs_file_name) {
+ virtual int32_t DatabaseGetFileAttributes(const WebString& vfs_file_name) {
return 0;
}
// Returns the size of the given database file.
- virtual long long DatabaseGetFileSize(const WebString& vfs_file_name) {
+ virtual int64_t DatabaseGetFileSize(const WebString& vfs_file_name) {
return 0;
}
// Returns the space available for the given origin.
- virtual long long DatabaseGetSpaceAvailableForOrigin(
+ virtual int64_t DatabaseGetSpaceAvailableForOrigin(
const WebSecurityOrigin& origin) {
return 0;
}
// Set the size of the given database file.
virtual bool DatabaseSetFileSize(const WebString& vfs_file_name,
- long long size) {
+ int64_t size) {
return false;
}
@@ -296,14 +286,13 @@ class BLINK_PLATFORM_EXPORT Platform {
// Returns the hash for the given canonicalized URL for use in visited
// link coloring.
- virtual unsigned long long VisitedLinkHash(const char* canonical_url,
- size_t length) {
+ virtual uint64_t VisitedLinkHash(const char* canonical_url, size_t length) {
return 0;
}
// Returns whether the given link hash is in the user's history. The
// hash must have been generated by calling VisitedLinkHash().
- virtual bool IsLinkVisited(unsigned long long link_hash) { return false; }
+ virtual bool IsLinkVisited(uint64_t link_hash) { return false; }
static const size_t kNoDecodedImageByteLimit = static_cast<size_t>(-1);
@@ -538,6 +527,7 @@ class BLINK_PLATFORM_EXPORT Platform {
kWebGPUContextType, // WebGPU context
};
struct ContextAttributes {
+ bool prefer_integrated_gpu = false;
bool fail_if_major_performance_caveat = false;
ContextType context_type = kGLES2ContextType;
// Offscreen contexts usually share a surface for the default frame buffer
@@ -659,8 +649,10 @@ class BLINK_PLATFORM_EXPORT Platform {
WebMediaStream*,
WebMediaPlayer*,
scoped_refptr<base::SingleThreadTaskRunner>) {}
- virtual void CreateHTMLAudioElementCapturer(WebMediaStream*,
- WebMediaPlayer*) {}
+ virtual void CreateHTMLAudioElementCapturer(
+ WebMediaStream*,
+ WebMediaPlayer*,
+ scoped_refptr<base::SingleThreadTaskRunner>) {}
// Creates a WebImageCaptureFrameGrabber to take a snapshot of a Video Tracks.
// May return null if the functionality is not available.
@@ -676,6 +668,10 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void UpdateWebRTCAPICount(WebRTCAPIName api_name) {}
+ virtual base::Optional<double> GetWebRtcMaxCaptureFrameRate() {
+ return base::nullopt;
+ }
+
// WebWorker ----------------------------------------------------------
virtual std::unique_ptr<WebDedicatedWorkerHostFactoryClient>
@@ -717,6 +713,15 @@ class BLINK_PLATFORM_EXPORT Platform {
return nullptr;
}
+ virtual WebTransmissionEncodingInfoHandler*
+ TransmissionEncodingInfoHandler() {
+ return nullptr;
+ }
+
+ // Renderer Memory Metrics ----------------------------------------------
+
+ virtual void RecordMetricsForBackgroundedRendererPurge() {}
+
// V8 Context Snapshot --------------------------------------------------
// This method returns true only when