Remove CEF-specific integer and char16 typedef's (see #3507)

This commit is contained in:
Marshall Greenblatt
2023-06-01 17:06:15 +03:00
parent 695ee2a041
commit 5042d71408
150 changed files with 597 additions and 621 deletions

View File

@@ -316,7 +316,7 @@ void CefBrowserHostBase::StartDownload(const CefString& url) {
void CefBrowserHostBase::DownloadImage(
const CefString& image_url,
bool is_favicon,
uint32 max_image_size,
uint32_t max_image_size,
bool bypass_cache,
CefRefPtr<CefDownloadImageCallback> callback) {
if (!CEF_CURRENTLY_ON_UIT()) {
@@ -346,7 +346,7 @@ void CefBrowserHostBase::DownloadImage(
gurl, is_favicon, gfx::Size(max_image_size, max_image_size),
max_image_size * scale, bypass_cache,
base::BindOnce(
[](uint32 max_image_size,
[](uint32_t max_image_size,
CefRefPtr<CefDownloadImageCallback> callback, int id,
int http_status_code, const GURL& image_url,
const std::vector<SkBitmap>& bitmaps,
@@ -765,7 +765,7 @@ CefRefPtr<CefFrame> CefBrowserHostBase::GetFocusedFrame() {
return GetFrame(CefFrameHostImpl::kFocusedFrameId);
}
CefRefPtr<CefFrame> CefBrowserHostBase::GetFrame(int64 identifier) {
CefRefPtr<CefFrame> CefBrowserHostBase::GetFrame(int64_t identifier) {
if (identifier == CefFrameHostImpl::kInvalidFrameId) {
return nullptr;
} else if (identifier == CefFrameHostImpl::kMainFrameId) {
@@ -796,7 +796,8 @@ size_t CefBrowserHostBase::GetFrameCount() {
return browser_info_->GetAllFrames().size();
}
void CefBrowserHostBase::GetFrameIdentifiers(std::vector<int64>& identifiers) {
void CefBrowserHostBase::GetFrameIdentifiers(
std::vector<int64_t>& identifiers) {
if (identifiers.size() > 0) {
identifiers.clear();
}

View File

@@ -179,7 +179,7 @@ class CefBrowserHostBase : public CefBrowserHost,
void StartDownload(const CefString& url) override;
void DownloadImage(const CefString& image_url,
bool is_favicon,
uint32 max_image_size,
uint32_t max_image_size,
bool bypass_cache,
CefRefPtr<CefDownloadImageCallback> callback) override;
void Print() override;
@@ -225,10 +225,10 @@ class CefBrowserHostBase : public CefBrowserHost,
bool IsPopup() override;
CefRefPtr<CefFrame> GetMainFrame() override;
CefRefPtr<CefFrame> GetFocusedFrame() override;
CefRefPtr<CefFrame> GetFrame(int64 identifier) override;
CefRefPtr<CefFrame> GetFrame(int64_t identifier) override;
CefRefPtr<CefFrame> GetFrame(const CefString& name) override;
size_t GetFrameCount() override;
void GetFrameIdentifiers(std::vector<int64>& identifiers) override;
void GetFrameIdentifiers(std::vector<int64_t>& identifiers) override;
void GetFrameNames(std::vector<CefString>& names) override;
// CefBrowserContentsDelegate::Observer methods:

View File

@@ -408,7 +408,7 @@ void CefBrowserPlatformDelegate::StopFinding(bool clearSelection) {
// static
int CefBrowserPlatformDelegate::TranslateWebEventModifiers(
uint32 cef_modifiers) {
uint32_t cef_modifiers) {
int result = 0;
// Set modifiers based on key state.
if (cef_modifiers & EVENTFLAG_CAPS_LOCK_ON) {

View File

@@ -379,7 +379,7 @@ class CefBrowserPlatformDelegate {
CefBrowserPlatformDelegate();
virtual ~CefBrowserPlatformDelegate();
static int TranslateWebEventModifiers(uint32 cef_modifiers);
static int TranslateWebEventModifiers(uint32_t cef_modifiers);
// Not owned by this object.
content::WebContents* web_contents_ = nullptr;

View File

@@ -50,7 +50,7 @@ cef_download_interrupt_reason_t CefDownloadItemImpl::GetInterruptReason() {
const_value().GetLastReason());
}
int64 CefDownloadItemImpl::GetCurrentSpeed() {
int64_t CefDownloadItemImpl::GetCurrentSpeed() {
CEF_VALUE_VERIFY_RETURN(false, 0);
return const_value().CurrentSpeed();
}
@@ -60,12 +60,12 @@ int CefDownloadItemImpl::GetPercentComplete() {
return const_value().PercentComplete();
}
int64 CefDownloadItemImpl::GetTotalBytes() {
int64_t CefDownloadItemImpl::GetTotalBytes() {
CEF_VALUE_VERIFY_RETURN(false, 0);
return const_value().GetTotalBytes();
}
int64 CefDownloadItemImpl::GetReceivedBytes() {
int64_t CefDownloadItemImpl::GetReceivedBytes() {
CEF_VALUE_VERIFY_RETURN(false, 0);
return const_value().GetReceivedBytes();
}
@@ -85,7 +85,7 @@ CefString CefDownloadItemImpl::GetFullPath() {
return const_value().GetFullPath().value();
}
uint32 CefDownloadItemImpl::GetId() {
uint32_t CefDownloadItemImpl::GetId() {
CEF_VALUE_VERIFY_RETURN(false, 0);
return const_value().GetId();
}

View File

@@ -29,14 +29,14 @@ class CefDownloadItemImpl
bool IsCanceled() override;
bool IsInterrupted() override;
cef_download_interrupt_reason_t GetInterruptReason() override;
int64 GetCurrentSpeed() override;
int64_t GetCurrentSpeed() override;
int GetPercentComplete() override;
int64 GetTotalBytes() override;
int64 GetReceivedBytes() override;
int64_t GetTotalBytes() override;
int64_t GetReceivedBytes() override;
CefBaseTime GetStartTime() override;
CefBaseTime GetEndTime() override;
CefString GetFullPath() override;
uint32 GetId() override;
uint32_t GetId() override;
CefString GetURL() override;
CefString GetOriginalUrl() override;
CefString GetSuggestedFileName() override;

View File

@@ -45,7 +45,7 @@ CefRefPtr<CefDownloadHandler> GetDownloadHandler(
class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
public:
CefBeforeDownloadCallbackImpl(const base::WeakPtr<DownloadManager>& manager,
uint32 download_id,
uint32_t download_id,
const base::FilePath& suggested_name,
content::DownloadTargetCallback callback)
: manager_(manager),
@@ -81,7 +81,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
private:
static void GenerateFilename(base::WeakPtr<DownloadManager> manager,
uint32 download_id,
uint32_t download_id,
const base::FilePath& suggested_name,
const base::FilePath& download_path,
bool show_dialog,
@@ -117,7 +117,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
}
static void ChooseDownloadPath(base::WeakPtr<DownloadManager> manager,
uint32 download_id,
uint32_t download_id,
const base::FilePath& suggested_path,
bool show_dialog,
content::DownloadTargetCallback callback) {
@@ -188,7 +188,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
}
base::WeakPtr<DownloadManager> manager_;
uint32 download_id_;
uint32_t download_id_;
base::FilePath suggested_name_;
content::DownloadTargetCallback callback_;
@@ -200,7 +200,7 @@ class CefDownloadItemCallbackImpl : public CefDownloadItemCallback {
public:
explicit CefDownloadItemCallbackImpl(
const base::WeakPtr<DownloadManager>& manager,
uint32 download_id)
uint32_t download_id)
: manager_(manager), download_id_(download_id) {}
CefDownloadItemCallbackImpl(const CefDownloadItemCallbackImpl&) = delete;
@@ -265,7 +265,7 @@ class CefDownloadItemCallbackImpl : public CefDownloadItemCallback {
}
base::WeakPtr<DownloadManager> manager_;
uint32 download_id_;
uint32_t download_id_;
IMPLEMENT_REFCOUNTING(CefDownloadItemCallbackImpl);
};
@@ -416,7 +416,7 @@ bool CefDownloadManagerDelegate::DetermineDownloadTarget(
void CefDownloadManagerDelegate::GetNextId(
content::DownloadIdCallback callback) {
static uint32 next_id = DownloadItem::kInvalidId + 1;
static uint32_t next_id = DownloadItem::kInvalidId + 1;
std::move(callback).Run(next_id++);
}

View File

@@ -98,7 +98,7 @@ class CefGetExtensionLoadFileCallbackImpl
// Move to the end of the stream.
stream->Seek(0, SEEK_END);
const int64 size = stream->Tell();
const int64_t size = stream->Tell();
if (size == 0) {
LOG(WARNING) << "Extension resource " << file << " is empty.";
return nullptr;
@@ -111,7 +111,7 @@ class CefGetExtensionLoadFileCallbackImpl
stream->Seek(0, SEEK_SET);
// Read all stream contents into the string.
int64 read, offset = 0;
int64_t read, offset = 0;
do {
read =
static_cast<int>(stream->Read(&(*result)[offset], 1, size - offset));

View File

@@ -193,13 +193,13 @@ CefString CefFrameHostImpl::GetName() {
return name_;
}
int64 CefFrameHostImpl::GetIdentifier() {
int64_t CefFrameHostImpl::GetIdentifier() {
base::AutoLock lock_scope(state_lock_);
return frame_id_;
}
CefRefPtr<CefFrame> CefFrameHostImpl::GetParent() {
int64 parent_frame_id;
int64_t parent_frame_id;
{
base::AutoLock lock_scope(state_lock_);
@@ -574,7 +574,7 @@ const ui::PageTransition CefFrameHostImpl::kPageTransitionExplicit =
static_cast<ui::PageTransition>(ui::PAGE_TRANSITION_TYPED |
ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
int64 CefFrameHostImpl::GetFrameId() const {
int64_t CefFrameHostImpl::GetFrameId() const {
base::AutoLock lock_scope(state_lock_);
return is_main_frame_ ? kMainFrameId : frame_id_;
}

View File

@@ -65,7 +65,7 @@ class CefFrameHostImpl : public CefFrame, public cef::mojom::BrowserFrame {
bool IsMain() override;
bool IsFocused() override;
CefString GetName() override;
int64 GetIdentifier() override;
int64_t GetIdentifier() override;
CefRefPtr<CefFrame> GetParent() override;
CefString GetURL() override;
CefRefPtr<CefBrowser> GetBrowser() override;
@@ -156,7 +156,7 @@ class CefFrameHostImpl : public CefFrame, public cef::mojom::BrowserFrame {
static const ui::PageTransition kPageTransitionExplicit;
private:
int64 GetFrameId() const;
int64_t GetFrameId() const;
scoped_refptr<CefBrowserInfo> GetBrowserInfo() const;
CefRefPtr<CefBrowserHostBase> GetBrowserHostBase() const;
@@ -176,12 +176,12 @@ class CefFrameHostImpl : public CefFrame, public cef::mojom::BrowserFrame {
// The following members may be read/modified from any thread. All access must
// be protected by |state_lock_|.
mutable base::Lock state_lock_;
int64 frame_id_;
int64_t frame_id_;
scoped_refptr<CefBrowserInfo> browser_info_;
bool is_focused_;
CefString url_;
CefString name_;
int64 parent_frame_id_;
int64_t parent_frame_id_;
// The following members are only accessed on the UI thread.
content::RenderFrameHost* render_frame_host_ = nullptr;

View File

@@ -229,7 +229,7 @@ base::TimeTicks CefBrowserPlatformDelegateNativeAura::GetEventTimeStamp() {
// static
int CefBrowserPlatformDelegateNativeAura::TranslateUiEventModifiers(
uint32 cef_modifiers) {
uint32_t cef_modifiers) {
int result = 0;
// Set modifiers based on key state.
if (cef_modifiers & EVENTFLAG_CAPS_LOCK_ON) {
@@ -273,7 +273,7 @@ int CefBrowserPlatformDelegateNativeAura::TranslateUiEventModifiers(
// static
int CefBrowserPlatformDelegateNativeAura::TranslateUiChangedButtonFlags(
uint32 cef_modifiers) {
uint32_t cef_modifiers) {
int result = 0;
if (cef_modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON) {
result |= ui::EF_LEFT_MOUSE_BUTTON;

View File

@@ -75,8 +75,8 @@ class CefBrowserPlatformDelegateNativeAura
base::OnceClosure GetWidgetDeleteCallback();
static base::TimeTicks GetEventTimeStamp();
static int TranslateUiEventModifiers(uint32 cef_modifiers);
static int TranslateUiChangedButtonFlags(uint32 cef_modifiers);
static int TranslateUiEventModifiers(uint32_t cef_modifiers);
static int TranslateUiChangedButtonFlags(uint32_t cef_modifiers);
// Widget hosting the web contents. It will be deleted automatically when the
// associated root window is destroyed.

View File

@@ -513,10 +513,12 @@ CefBrowserPlatformDelegateNativeMac::TranslateWebKeyEvent(
}
NSString* charactersIgnoringModifiers =
[[NSString alloc] initWithCharacters:&key_event.unmodified_character
[[NSString alloc] initWithCharacters:reinterpret_cast<const unichar*>(
&key_event.unmodified_character)
length:1];
NSString* characters =
[[NSString alloc] initWithCharacters:&key_event.character length:1];
NSString* characters = [[NSString alloc]
initWithCharacters:reinterpret_cast<const unichar*>(&key_event.character)
length:1];
NSEvent* synthetic_event =
[NSEvent keyEventWithType:event_type

View File

@@ -70,7 +70,7 @@ class RedirectHandler : public CefResourceHandler {
}
void GetResponseHeaders(CefRefPtr<CefResponse> response,
int64& response_length,
int64_t& response_length,
CefString& redirectUrl) override {
response_length = 0;
redirectUrl = url_.spec();
@@ -111,7 +111,7 @@ class InternalHandler : public CefResourceHandler {
}
void GetResponseHeaders(CefRefPtr<CefResponse> response,
int64& response_length,
int64_t& response_length,
CefString& redirectUrl) override {
response_length = size_;

View File

@@ -600,8 +600,8 @@ class CefBrowserURLRequest::Context
CefURLRequest::Status status_ = UR_IO_PENDING;
CefRefPtr<CefResponseImpl> response_;
bool response_was_cached_ = false;
int64 upload_data_size_ = 0;
int64 download_data_size_ = -1;
int64_t upload_data_size_ = 0;
int64_t download_data_size_ = -1;
bool got_upload_progress_complete_ = false;
bool cleanup_immediately_ = false;

View File

@@ -34,7 +34,7 @@ class SkipCallbackWrapper : public CefResourceSkipCallback {
}
}
void Continue(int64 bytes_skipped) override {
void Continue(int64_t bytes_skipped) override {
if (!work_thread_task_runner_->RunsTasksInCurrentSequence()) {
work_thread_task_runner_->PostTask(
FROM_HERE,

View File

@@ -1278,7 +1278,7 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler {
static CefRefPtr<CefRequestImpl> MakeRequest(
const network::ResourceRequest* request,
int64 request_id,
int64_t request_id,
bool read_only) {
CefRefPtr<CefRequestImpl> requestPtr = new CefRequestImpl();
requestPtr->Set(request, request_id);

View File

@@ -155,7 +155,7 @@ class AcceptWebSocketCallback : public CefCallback {
// static
void CefServer::CreateServer(const CefString& address,
uint16 port,
uint16_t port,
int backlog,
CefRefPtr<CefServerHandler> handler) {
CefRefPtr<CefServerImpl> server(new CefServerImpl(handler));
@@ -178,7 +178,7 @@ CefServerImpl::CefServerImpl(CefRefPtr<CefServerHandler> handler)
}
void CefServerImpl::Start(const std::string& address,
uint16 port,
uint16_t port,
int backlog) {
DCHECK(!address.empty());
CEF_POST_TASK(CEF_UIT, base::BindOnce(&CefServerImpl::StartOnUIThread, this,
@@ -280,7 +280,7 @@ void CefServerImpl::SendHttp500Response(int connection_id,
void CefServerImpl::SendHttpResponse(int connection_id,
int response_code,
const CefString& content_type,
int64 content_length,
int64_t content_length,
const HeaderMap& extra_headers) {
if (!CEF_CURRENTLY_ON_HT()) {
CEF_POST_TASK_HT(base::BindOnce(&CefServerImpl::SendHttpResponse, this,
@@ -540,7 +540,7 @@ void CefServerImpl::OnClose(int connection_id) {
}
void CefServerImpl::StartOnUIThread(const std::string& address,
uint16 port,
uint16_t port,
int backlog) {
CEF_REQUIRE_UIT();
DCHECK(!thread_);
@@ -562,7 +562,7 @@ void CefServerImpl::StartOnUIThread(const std::string& address,
}
void CefServerImpl::StartOnHandlerThread(const std::string& address,
uint16 port,
uint16_t port,
int backlog) {
CEF_REQUIRE_HT();

View File

@@ -25,7 +25,7 @@ class CefServerImpl : public CefServer, net::HttpServer::Delegate {
CefServerImpl(const CefServerImpl&) = delete;
CefServerImpl& operator=(const CefServerImpl&) = delete;
void Start(const std::string& address, uint16 port, int backlog);
void Start(const std::string& address, uint16_t port, int backlog);
// CefServer methods:
CefRefPtr<CefTaskRunner> GetTaskRunner() override;
@@ -44,7 +44,7 @@ class CefServerImpl : public CefServer, net::HttpServer::Delegate {
void SendHttpResponse(int connection_id,
int response_code,
const CefString& content_type,
int64 content_length,
int64_t content_length,
const HeaderMap& extra_headers) override;
void SendRawData(int connection_id,
const void* data,
@@ -77,9 +77,9 @@ class CefServerImpl : public CefServer, net::HttpServer::Delegate {
void OnWebSocketMessage(int connection_id, std::string data) override;
void OnClose(int connection_id) override;
void StartOnUIThread(const std::string& address, uint16 port, int backlog);
void StartOnUIThread(const std::string& address, uint16_t port, int backlog);
void StartOnHandlerThread(const std::string& address,
uint16 port,
uint16_t port,
int backlog);
void ShutdownOnHandlerThread();

View File

@@ -88,7 +88,7 @@ size_t CefFileReader::Read(void* ptr, size_t size, size_t n) {
return fread(ptr, size, n, file_);
}
int CefFileReader::Seek(int64 offset, int whence) {
int CefFileReader::Seek(int64_t offset, int whence) {
base::AutoLock lock_scope(lock_);
#if BUILDFLAG(IS_WIN)
return _fseeki64(file_, offset, whence);
@@ -97,7 +97,7 @@ int CefFileReader::Seek(int64 offset, int whence) {
#endif
}
int64 CefFileReader::Tell() {
int64_t CefFileReader::Tell() {
base::AutoLock lock_scope(lock_);
#if BUILDFLAG(IS_WIN)
return _ftelli64(file_);
@@ -128,12 +128,12 @@ size_t CefFileWriter::Write(const void* ptr, size_t size, size_t n) {
return (size_t)fwrite(ptr, size, n, file_);
}
int CefFileWriter::Seek(int64 offset, int whence) {
int CefFileWriter::Seek(int64_t offset, int whence) {
base::AutoLock lock_scope(lock_);
return fseek(file_, offset, whence);
}
int64 CefFileWriter::Tell() {
int64_t CefFileWriter::Tell() {
base::AutoLock lock_scope(lock_);
return ftell(file_);
}
@@ -145,7 +145,7 @@ int CefFileWriter::Flush() {
// CefBytesReader
CefBytesReader::CefBytesReader(void* data, int64 datasize, bool copy)
CefBytesReader::CefBytesReader(void* data, int64_t datasize, bool copy)
: data_(nullptr), datasize_(0), copy_(false), offset_(0) {
SetData(data, datasize, copy);
}
@@ -163,7 +163,7 @@ size_t CefBytesReader::Read(void* ptr, size_t size, size_t n) {
return ret;
}
int CefBytesReader::Seek(int64 offset, int whence) {
int CefBytesReader::Seek(int64_t offset, int whence) {
int rv = -1L;
base::AutoLock lock_scope(lock_);
switch (whence) {
@@ -175,7 +175,7 @@ int CefBytesReader::Seek(int64 offset, int whence) {
rv = 0;
break;
case SEEK_END: {
int64 offset_abs = std::abs(offset);
int64_t offset_abs = std::abs(offset);
if (offset_abs > datasize_) {
break;
}
@@ -195,7 +195,7 @@ int CefBytesReader::Seek(int64 offset, int whence) {
return rv;
}
int64 CefBytesReader::Tell() {
int64_t CefBytesReader::Tell() {
base::AutoLock lock_scope(lock_);
return offset_;
}
@@ -205,7 +205,7 @@ int CefBytesReader::Eof() {
return (offset_ >= datasize_);
}
void CefBytesReader::SetData(void* data, int64 datasize, bool copy) {
void CefBytesReader::SetData(void* data, int64_t datasize, bool copy) {
base::AutoLock lock_scope(lock_);
if (copy_) {
free(data_);
@@ -245,7 +245,7 @@ CefBytesWriter::~CefBytesWriter() {
size_t CefBytesWriter::Write(const void* ptr, size_t size, size_t n) {
base::AutoLock lock_scope(lock_);
size_t rv;
if (offset_ + static_cast<int64>(size * n) >= datasize_ &&
if (offset_ + static_cast<int64_t>(size * n) >= datasize_ &&
Grow(size * n) == 0) {
rv = 0;
} else {
@@ -257,7 +257,7 @@ size_t CefBytesWriter::Write(const void* ptr, size_t size, size_t n) {
return rv;
}
int CefBytesWriter::Seek(int64 offset, int whence) {
int CefBytesWriter::Seek(int64_t offset, int whence) {
int rv = -1L;
base::AutoLock lock_scope(lock_);
switch (whence) {
@@ -269,7 +269,7 @@ int CefBytesWriter::Seek(int64 offset, int whence) {
rv = 0;
break;
case SEEK_END: {
int64 offset_abs = std::abs(offset);
int64_t offset_abs = std::abs(offset);
if (offset_abs > datasize_) {
break;
}
@@ -289,7 +289,7 @@ int CefBytesWriter::Seek(int64 offset, int whence) {
return rv;
}
int64 CefBytesWriter::Tell() {
int64_t CefBytesWriter::Tell() {
base::AutoLock lock_scope(lock_);
return offset_;
}

View File

@@ -20,8 +20,8 @@ class CefFileReader : public CefStreamReader {
~CefFileReader() override;
size_t Read(void* ptr, size_t size, size_t n) override;
int Seek(int64 offset, int whence) override;
int64 Tell() override;
int Seek(int64_t offset, int whence) override;
int64_t Tell() override;
int Eof() override;
bool MayBlock() override { return true; }
@@ -41,8 +41,8 @@ class CefFileWriter : public CefStreamWriter {
~CefFileWriter() override;
size_t Write(const void* ptr, size_t size, size_t n) override;
int Seek(int64 offset, int whence) override;
int64 Tell() override;
int Seek(int64_t offset, int whence) override;
int64_t Tell() override;
int Flush() override;
bool MayBlock() override { return true; }
@@ -58,25 +58,25 @@ class CefFileWriter : public CefStreamWriter {
// Implementation of CefStreamReader for byte buffers.
class CefBytesReader : public CefStreamReader {
public:
CefBytesReader(void* data, int64 datasize, bool copy);
CefBytesReader(void* data, int64_t datasize, bool copy);
~CefBytesReader() override;
size_t Read(void* ptr, size_t size, size_t n) override;
int Seek(int64 offset, int whence) override;
int64 Tell() override;
int Seek(int64_t offset, int whence) override;
int64_t Tell() override;
int Eof() override;
bool MayBlock() override { return false; }
void SetData(void* data, int64 datasize, bool copy);
void SetData(void* data, int64_t datasize, bool copy);
void* GetData() { return data_; }
size_t GetDataSize() { return offset_; }
protected:
void* data_;
int64 datasize_;
int64_t datasize_;
bool copy_;
int64 offset_;
int64_t offset_;
base::Lock lock_;
@@ -90,13 +90,13 @@ class CefBytesWriter : public CefStreamWriter {
~CefBytesWriter() override;
size_t Write(const void* ptr, size_t size, size_t n) override;
int Seek(int64 offset, int whence) override;
int64 Tell() override;
int Seek(int64_t offset, int whence) override;
int64_t Tell() override;
int Flush() override;
bool MayBlock() override { return false; }
void* GetData() { return data_; }
int64 GetDataSize() { return offset_; }
int64_t GetDataSize() { return offset_; }
std::string GetDataString();
protected:
@@ -104,8 +104,8 @@ class CefBytesWriter : public CefStreamWriter {
size_t grow_;
void* data_;
int64 datasize_;
int64 offset_;
int64_t datasize_;
int64_t offset_;
base::Lock lock_;
@@ -121,10 +121,10 @@ class CefHandlerReader : public CefStreamReader {
size_t Read(void* ptr, size_t size, size_t n) override {
return handler_->Read(ptr, size, n);
}
int Seek(int64 offset, int whence) override {
int Seek(int64_t offset, int whence) override {
return handler_->Seek(offset, whence);
}
int64 Tell() override { return handler_->Tell(); }
int64_t Tell() override { return handler_->Tell(); }
int Eof() override { return handler_->Eof(); }
bool MayBlock() override { return handler_->MayBlock(); }
@@ -143,10 +143,10 @@ class CefHandlerWriter : public CefStreamWriter {
size_t Write(const void* ptr, size_t size, size_t n) override {
return handler_->Write(ptr, size, n);
}
int Seek(int64 offset, int whence) override {
int Seek(int64_t offset, int whence) override {
return handler_->Seek(offset, whence);
}
int64 Tell() override { return handler_->Tell(); }
int64_t Tell() override { return handler_->Tell(); }
int Flush() override { return handler_->Flush(); }
bool MayBlock() override { return handler_->MayBlock(); }

View File

@@ -175,7 +175,7 @@ class CefTestServerImpl::Context {
DCHECK(!test_server_);
}
bool Start(uint16 port,
bool Start(uint16_t port,
bool https_server,
cef_test_cert_type_t https_cert_type) {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -252,7 +252,7 @@ class CefTestServerImpl::Context {
EmbeddedTestServerHandle test_server_handle_;
};
bool CefTestServerImpl::Start(uint16 port,
bool CefTestServerImpl::Start(uint16_t port,
bool https_server,
cef_test_cert_type_t https_cert_type,
CefRefPtr<CefTestServerHandler> handler) {
@@ -281,7 +281,7 @@ CefString CefTestServerImpl::GetOrigin() {
// static
CefRefPtr<CefTestServer> CefTestServer::CreateAndStart(
uint16 port,
uint16_t port,
bool https_server,
cef_test_cert_type_t https_cert_type,
CefRefPtr<CefTestServerHandler> handler) {

View File

@@ -17,7 +17,7 @@ class CefTestServerImpl : public CefTestServer {
CefTestServerImpl(const CefTestServerImpl&) = delete;
CefTestServerImpl& operator=(const CefTestServerImpl&) = delete;
bool Start(uint16 port,
bool Start(uint16_t port,
bool https_server,
cef_test_cert_type_t https_cert_type,
CefRefPtr<CefTestServerHandler> handler);

View File

@@ -49,6 +49,6 @@ bool CefEndTracing(const CefString& tracing_file,
return subscriber->EndTracing(base::FilePath(tracing_file), callback);
}
int64 CefNowFromSystemTraceTime() {
int64_t CefNowFromSystemTraceTime() {
return base::TimeTicks::Now().ToInternalValue();
}

View File

@@ -111,7 +111,7 @@ CefDisplayImpl::~CefDisplayImpl() {
CEF_REQUIRE_UIT();
}
int64 CefDisplayImpl::GetID() {
int64_t CefDisplayImpl::GetID() {
CEF_REQUIRE_UIT_RETURN(-1);
return display_.id();
}

View File

@@ -21,7 +21,7 @@ class CefDisplayImpl : public CefDisplay {
~CefDisplayImpl() override;
// CefDisplay methods:
int64 GetID() override;
int64_t GetID() override;
float GetDeviceScaleFactor() override;
void ConvertPointToPixels(CefPoint& point) override;
void ConvertPointFromPixels(CefPoint& point) override;

View File

@@ -554,7 +554,7 @@ CefWindowHandle CefWindowImpl::GetWindowHandle() {
return view_util::GetWindowHandle(widget_);
}
void CefWindowImpl::SendKeyPress(int key_code, uint32 event_flags) {
void CefWindowImpl::SendKeyPress(int key_code, uint32_t event_flags) {
CEF_REQUIRE_VALID_RETURN_VOID();
InitializeUITesting();

View File

@@ -75,7 +75,7 @@ class CefWindowImpl
void SetDraggableRegions(
const std::vector<CefDraggableRegion>& regions) override;
CefWindowHandle GetWindowHandle() override;
void SendKeyPress(int key_code, uint32 event_flags) override;
void SendKeyPress(int key_code, uint32_t event_flags) override;
void SendMouseMove(int screen_x, int screen_y) override;
void SendMouseEvents(cef_mouse_button_type_t button,
bool mouse_down,

View File

@@ -185,7 +185,7 @@ CefString CefZipReaderImpl::GetFileName() {
return filename_;
}
int64 CefZipReaderImpl::GetFileSize() {
int64_t CefZipReaderImpl::GetFileSize() {
if (!VerifyContext() || !GetFileInfo()) {
return -1;
}
@@ -244,7 +244,7 @@ int CefZipReaderImpl::ReadFile(void* buffer, size_t bufferSize) {
return unzReadCurrentFile(reader_, buffer, bufferSize);
}
int64 CefZipReaderImpl::Tell() {
int64_t CefZipReaderImpl::Tell() {
if (!VerifyContext() || !has_fileopen_) {
return -1;
}

View File

@@ -26,12 +26,12 @@ class CefZipReaderImpl : public CefZipReader {
bool MoveToFile(const CefString& fileName, bool caseSensitive) override;
bool Close() override;
CefString GetFileName() override;
int64 GetFileSize() override;
int64_t GetFileSize() override;
CefBaseTime GetFileLastModified() override;
bool OpenFile(const CefString& password) override;
bool CloseFile() override;
int ReadFile(void* buffer, size_t bufferSize) override;
int64 Tell() override;
int64_t Tell() override;
bool Eof() override;
bool GetFileInfo();
@@ -46,7 +46,7 @@ class CefZipReaderImpl : public CefZipReader {
bool has_fileopen_;
bool has_fileinfo_;
CefString filename_;
int64 filesize_;
int64_t filesize_;
time_t filemodified_;
IMPLEMENT_REFCOUNTING(CefZipReaderImpl);

View File

@@ -21,9 +21,9 @@ constexpr const char kCategory[] = "cef.client";
CEF_EXPORT void cef_trace_event_instant(const char* /* category */,
const char* name,
const char* arg1_name,
uint64 arg1_val,
uint64_t arg1_val,
const char* arg2_name,
uint64 arg2_val) {
uint64_t arg2_val) {
DCHECK(name);
if (!name) {
return;
@@ -43,9 +43,9 @@ CEF_EXPORT void cef_trace_event_instant(const char* /* category */,
CEF_EXPORT void cef_trace_event_begin(const char* /* category */,
const char* name,
const char* arg1_name,
uint64 arg1_val,
uint64_t arg1_val,
const char* arg2_name,
uint64 arg2_val) {
uint64_t arg2_val) {
DCHECK(name);
if (!name) {
return;
@@ -64,9 +64,9 @@ CEF_EXPORT void cef_trace_event_begin(const char* /* category */,
CEF_EXPORT void cef_trace_event_end(const char* /* category */,
const char* name,
const char* arg1_name,
uint64 arg1_val,
uint64_t arg1_val,
const char* arg2_name,
uint64 arg2_val) {
uint64_t arg2_val) {
DCHECK(name);
if (!name) {
return;
@@ -84,9 +84,9 @@ CEF_EXPORT void cef_trace_event_end(const char* /* category */,
CEF_EXPORT void cef_trace_counter(const char* /* category */,
const char* name,
const char* value1_name,
uint64 value1_val,
uint64_t value1_val,
const char* value2_name,
uint64 value2_val) {
uint64_t value2_val) {
DCHECK(name);
if (!name) {
return;
@@ -102,11 +102,11 @@ CEF_EXPORT void cef_trace_counter(const char* /* category */,
CEF_EXPORT void cef_trace_counter_id(const char* /* category */,
const char* name,
uint64 id,
uint64_t id,
const char* value1_name,
uint64 value1_val,
uint64_t value1_val,
const char* value2_name,
uint64 value2_val) {
uint64_t value2_val) {
DCHECK(name);
if (!name) {
return;
@@ -122,11 +122,11 @@ CEF_EXPORT void cef_trace_counter_id(const char* /* category */,
CEF_EXPORT void cef_trace_event_async_begin(const char* /* category */,
const char* name,
uint64 id,
uint64_t id,
const char* arg1_name,
uint64 arg1_val,
uint64_t arg1_val,
const char* arg2_name,
uint64 arg2_val) {
uint64_t arg2_val) {
DCHECK(name);
if (!name) {
return;
@@ -144,10 +144,10 @@ CEF_EXPORT void cef_trace_event_async_begin(const char* /* category */,
CEF_EXPORT void cef_trace_event_async_step_into(const char* /* category */,
const char* name,
uint64 id,
uint64 step,
uint64_t id,
uint64_t step,
const char* arg1_name,
uint64 arg1_val) {
uint64_t arg1_val) {
DCHECK(name);
if (!name) {
return;
@@ -163,10 +163,10 @@ CEF_EXPORT void cef_trace_event_async_step_into(const char* /* category */,
CEF_EXPORT void cef_trace_event_async_step_past(const char* /* category */,
const char* name,
uint64 id,
uint64 step,
uint64_t id,
uint64_t step,
const char* arg1_name,
uint64 arg1_val) {
uint64_t arg1_val) {
DCHECK(name);
if (!name) {
return;
@@ -182,11 +182,11 @@ CEF_EXPORT void cef_trace_event_async_step_past(const char* /* category */,
CEF_EXPORT void cef_trace_event_async_end(const char* /* category */,
const char* name,
uint64 id,
uint64_t id,
const char* arg1_name,
uint64 arg1_val,
uint64_t arg1_val,
const char* arg2_name,
uint64 arg2_val) {
uint64_t arg2_val) {
DCHECK(name);
if (!name) {
return;

View File

@@ -389,13 +389,13 @@ CefRequestImpl::TransitionType CefRequestImpl::GetTransitionType() {
return transition_type_;
}
uint64 CefRequestImpl::GetIdentifier() {
uint64_t CefRequestImpl::GetIdentifier() {
base::AutoLock lock_scope(lock_);
return identifier_;
}
void CefRequestImpl::Set(const network::ResourceRequest* request,
uint64 identifier) {
uint64_t identifier) {
base::AutoLock lock_scope(lock_);
CHECK_READONLY_RETURN_VOID();

View File

@@ -80,10 +80,10 @@ class CefRequestImpl : public CefRequest {
void SetFirstPartyForCookies(const CefString& url) override;
ResourceType GetResourceType() override;
TransitionType GetTransitionType() override;
uint64 GetIdentifier() override;
uint64_t GetIdentifier() override;
// Populate this object from the ResourceRequest object.
void Set(const network::ResourceRequest* request, uint64 identifier);
void Set(const network::ResourceRequest* request, uint64_t identifier);
// Populate the ResourceRequest object from this object.
// If |changed_only| is true then only the changed fields will be updated.
@@ -145,7 +145,7 @@ class CefRequestImpl : public CefRequest {
HeaderMap headermap_;
ResourceType resource_type_;
TransitionType transition_type_;
uint64 identifier_;
uint64_t identifier_;
// The below members are used by CefURLRequest.
int flags_;

View File

@@ -21,7 +21,7 @@ void string_utf8_dtor(char* str) {
delete[] str;
}
void string_utf16_dtor(char16* str) {
void string_utf16_dtor(char16_t* str) {
delete[] str;
}
@@ -84,7 +84,7 @@ CEF_EXPORT int cef_string_utf8_set(const char* src,
return 1;
}
CEF_EXPORT int cef_string_utf16_set(const char16* src,
CEF_EXPORT int cef_string_utf16_set(const char16_t* src,
size_t src_len,
cef_string_utf16_t* output,
int copy) {
@@ -92,18 +92,18 @@ CEF_EXPORT int cef_string_utf16_set(const char16* src,
if (copy) {
if (src && src_len > 0) {
output->str = new char16[src_len + 1];
output->str = new char16_t[src_len + 1];
if (!output->str) {
return 0;
}
memcpy(output->str, src, src_len * sizeof(char16));
memcpy(output->str, src, src_len * sizeof(char16_t));
output->str[src_len] = 0;
output->length = src_len;
output->dtor = string_utf16_dtor;
}
} else {
output->str = const_cast<char16*>(src);
output->str = const_cast<char16_t*>(src);
output->length = src_len;
output->dtor = nullptr;
}
@@ -186,7 +186,9 @@ CEF_EXPORT int cef_string_utf16_cmp(const cef_string_utf16_t* str1,
reinterpret_cast<std::u16string::value_type*>(str2->str),
std::min(str1->length, str2->length));
#else
int r = wcsncmp(str1->str, str2->str, std::min(str1->length, str2->length));
int r = wcsncmp(reinterpret_cast<wchar_t*>(str1->str),
reinterpret_cast<wchar_t*>(str2->str),
std::min(str1->length, str2->length));
#endif
if (r == 0) {
if (str1->length > str2->length) {
@@ -225,14 +227,14 @@ CEF_EXPORT int cef_string_wide_to_utf16(const wchar_t* src,
cef_string_utf16_t* output) {
std::u16string str;
bool ret = base::WideToUTF16(src, src_len, &str);
if (!cef_string_utf16_set(reinterpret_cast<const char16*>(str.c_str()),
if (!cef_string_utf16_set(reinterpret_cast<const char16_t*>(str.c_str()),
str.length(), output, true)) {
return false;
}
return ret;
}
CEF_EXPORT int cef_string_utf16_to_wide(const char16* src,
CEF_EXPORT int cef_string_utf16_to_wide(const char16_t* src,
size_t src_len,
cef_string_wide_t* output) {
std::wstring str;
@@ -249,14 +251,14 @@ CEF_EXPORT int cef_string_utf8_to_utf16(const char* src,
cef_string_utf16_t* output) {
std::u16string str;
bool ret = base::UTF8ToUTF16(src, src_len, &str);
if (!cef_string_utf16_set(reinterpret_cast<const char16*>(str.c_str()),
if (!cef_string_utf16_set(reinterpret_cast<const char16_t*>(str.c_str()),
str.length(), output, true)) {
return false;
}
return ret;
}
CEF_EXPORT int cef_string_utf16_to_utf8(const char16* src,
CEF_EXPORT int cef_string_utf16_to_utf8(const char16_t* src,
size_t src_len,
cef_string_utf8_t* output) {
std::string str;
@@ -279,7 +281,7 @@ CEF_EXPORT int cef_string_ascii_to_utf16(const char* src,
size_t src_len,
cef_string_utf16_t* output) {
const std::u16string& str = base::ASCIIToUTF16(std::string(src, src_len));
return cef_string_utf16_set(reinterpret_cast<const char16*>(str.c_str()),
return cef_string_utf16_set(reinterpret_cast<const char16_t*>(str.c_str()),
str.length(), output, true);
}
@@ -317,20 +319,20 @@ CEF_EXPORT void cef_string_userfree_utf16_free(
delete str;
}
CEF_EXPORT int cef_string_utf16_to_lower(const char16* src,
CEF_EXPORT int cef_string_utf16_to_lower(const char16_t* src,
size_t src_len,
cef_string_utf16_t* output) {
const std::u16string& str = base::i18n::ToLower(std::u16string(
reinterpret_cast<const std::u16string::value_type*>(src), src_len));
return cef_string_utf16_set(reinterpret_cast<const char16*>(str.c_str()),
return cef_string_utf16_set(reinterpret_cast<const char16_t*>(str.c_str()),
str.length(), output, true);
}
CEF_EXPORT int cef_string_utf16_to_upper(const char16* src,
CEF_EXPORT int cef_string_utf16_to_upper(const char16_t* src,
size_t src_len,
cef_string_utf16_t* output) {
const std::u16string& str = base::i18n::ToUpper(std::u16string(
reinterpret_cast<const std::u16string::value_type*>(src), src_len));
return cef_string_utf16_set(reinterpret_cast<const char16*>(str.c_str()),
return cef_string_utf16_set(reinterpret_cast<const char16_t*>(str.c_str()),
str.length(), output, true);
}

View File

@@ -35,7 +35,7 @@ bool CefPostTask(CefThreadId threadId, CefRefPtr<CefTask> task) {
bool CefPostDelayedTask(CefThreadId threadId,
CefRefPtr<CefTask> task,
int64 delay_ms) {
int64_t delay_ms) {
scoped_refptr<base::SequencedTaskRunner> task_runner =
CefTaskRunnerImpl::GetTaskRunner(threadId);
if (task_runner.get()) {

View File

@@ -139,7 +139,7 @@ bool CefTaskRunnerImpl::PostTask(CefRefPtr<CefTask> task) {
}
bool CefTaskRunnerImpl::PostDelayedTask(CefRefPtr<CefTask> task,
int64 delay_ms) {
int64_t delay_ms) {
return task_runner_->PostDelayedTask(
FROM_HERE, base::BindOnce(&CefTask::Execute, task.get()),
base::Milliseconds(delay_ms));

View File

@@ -29,7 +29,7 @@ class CefTaskRunnerImpl : public CefTaskRunner {
bool BelongsToCurrentThread() override;
bool BelongsToThread(CefThreadId threadId) override;
bool PostTask(CefRefPtr<CefTask> task) override;
bool PostDelayedTask(CefRefPtr<CefTask> task, int64 delay_ms) override;
bool PostDelayedTask(CefRefPtr<CefTask> task, int64_t delay_ms) override;
private:
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;

View File

@@ -55,7 +55,7 @@ void CefWaitableEventImpl::Wait() {
event_.Wait();
}
bool CefWaitableEventImpl::TimedWait(int64 max_ms) {
bool CefWaitableEventImpl::TimedWait(int64_t max_ms) {
if (!AllowWait()) {
return false;
}

View File

@@ -22,7 +22,7 @@ class CefWaitableEventImpl : public CefWaitableEvent {
void Signal() override;
bool IsSignaled() override;
void Wait() override;
bool TimedWait(int64 max_ms) override;
bool TimedWait(int64_t max_ms) override;
private:
base::WaitableEvent event_;

View File

@@ -180,7 +180,7 @@ CefRefPtr<CefFrame> CefBrowserImpl::GetFocusedFrame() {
return nullptr;
}
CefRefPtr<CefFrame> CefBrowserImpl::GetFrame(int64 identifier) {
CefRefPtr<CefFrame> CefBrowserImpl::GetFrame(int64_t identifier) {
CEF_REQUIRE_RT_RETURN(nullptr);
return GetWebFrameImpl(identifier).get();
@@ -234,7 +234,7 @@ size_t CefBrowserImpl::GetFrameCount() {
return count;
}
void CefBrowserImpl::GetFrameIdentifiers(std::vector<int64>& identifiers) {
void CefBrowserImpl::GetFrameIdentifiers(std::vector<int64_t>& identifiers) {
CEF_REQUIRE_RT_RETURN_VOID();
if (identifiers.size() > 0) {

View File

@@ -57,10 +57,10 @@ class CefBrowserImpl : public CefBrowser, public blink::WebViewObserver {
bool HasDocument() override;
CefRefPtr<CefFrame> GetMainFrame() override;
CefRefPtr<CefFrame> GetFocusedFrame() override;
CefRefPtr<CefFrame> GetFrame(int64 identifier) override;
CefRefPtr<CefFrame> GetFrame(int64_t identifier) override;
CefRefPtr<CefFrame> GetFrame(const CefString& name) override;
size_t GetFrameCount() override;
void GetFrameIdentifiers(std::vector<int64>& identifiers) override;
void GetFrameIdentifiers(std::vector<int64_t>& identifiers) override;
void GetFrameNames(std::vector<CefString>& names) override;
CefBrowserImpl(blink::WebView* web_view,
@@ -100,7 +100,7 @@ class CefBrowserImpl : public CefBrowser, public blink::WebViewObserver {
bool is_windowless_;
// Map of unique frame ids to CefFrameImpl references.
using FrameMap = std::map<int64, CefRefPtr<CefFrameImpl>>;
using FrameMap = std::map<int64_t, CefRefPtr<CefFrameImpl>>;
FrameMap frames_;
// True if the browser was in the BFCache.
@@ -108,7 +108,7 @@ class CefBrowserImpl : public CefBrowser, public blink::WebViewObserver {
// Map of unique frame ids to CefTrackManager objects that need to be cleaned
// up when the frame is deleted.
using FrameObjectMap = std::map<int64, CefRefPtr<CefTrackManager>>;
using FrameObjectMap = std::map<int64_t, CefRefPtr<CefTrackManager>>;
FrameObjectMap frame_objects_;
struct LoadingState {

View File

@@ -185,7 +185,7 @@ CefString CefFrameImpl::GetName() {
return name;
}
int64 CefFrameImpl::GetIdentifier() {
int64_t CefFrameImpl::GetIdentifier() {
CEF_REQUIRE_RT_RETURN(0);
return frame_id_;

View File

@@ -70,7 +70,7 @@ class CefFrameImpl
bool IsMain() override;
bool IsFocused() override;
CefString GetName() override;
int64 GetIdentifier() override;
int64_t GetIdentifier() override;
CefRefPtr<CefFrame> GetParent() override;
CefString GetURL() override;
CefRefPtr<CefBrowser> GetBrowser() override;
@@ -166,7 +166,7 @@ class CefFrameImpl
CefBrowserImpl* browser_;
blink::WebLocalFrame* frame_;
const int64 frame_id_;
const int64_t frame_id_;
bool did_commit_provisional_load_ = false;
bool did_initialize_script_context_ = false;

View File

@@ -444,7 +444,7 @@ v8::Local<v8::String> GetV8String(v8::Isolate* isolate, const CefString& str) {
}
#if defined(CEF_STRING_TYPE_UTF16)
void v8impl_string_dtor(char16* str) {
void v8impl_string_dtor(char16_t* str) {
delete[] str;
}
#elif defined(CEF_STRING_TYPE_UTF8)
@@ -481,7 +481,7 @@ void GetCefString(v8::Isolate* isolate,
if (len == 0) {
return;
}
char16* buf = new char16[len + 1];
char16_t* buf = new char16_t[len + 1];
str->Write(isolate, reinterpret_cast<uint16_t*>(buf), 0, len + 1);
#else
// Allocate enough space for a worst-case conversion.
@@ -1274,7 +1274,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateBool(bool value) {
}
// static
CefRefPtr<CefV8Value> CefV8Value::CreateInt(int32 value) {
CefRefPtr<CefV8Value> CefV8Value::CreateInt(int32_t value) {
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
@@ -1283,7 +1283,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateInt(int32 value) {
}
// static
CefRefPtr<CefV8Value> CefV8Value::CreateUInt(uint32 value) {
CefRefPtr<CefV8Value> CefV8Value::CreateUInt(uint32_t value) {
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
@@ -1597,13 +1597,13 @@ void CefV8ValueImpl::InitBool(bool value) {
bool_value_ = value;
}
void CefV8ValueImpl::InitInt(int32 value) {
void CefV8ValueImpl::InitInt(int32_t value) {
DCHECK_EQ(type_, TYPE_INVALID);
type_ = TYPE_INT;
int_value_ = value;
}
void CefV8ValueImpl::InitUInt(uint32 value) {
void CefV8ValueImpl::InitUInt(uint32_t value) {
DCHECK_EQ(type_, TYPE_INVALID);
type_ = TYPE_UINT;
uint_value_ = value;
@@ -1814,7 +1814,7 @@ bool CefV8ValueImpl::GetBoolValue() {
return false;
}
int32 CefV8ValueImpl::GetIntValue() {
int32_t CefV8ValueImpl::GetIntValue() {
CEF_V8_REQUIRE_ISOLATE_RETURN(0);
if (type_ == TYPE_INT || type_ == TYPE_UINT) {
return int_value_;
@@ -1822,7 +1822,7 @@ int32 CefV8ValueImpl::GetIntValue() {
return 0;
}
uint32 CefV8ValueImpl::GetUIntValue() {
uint32_t CefV8ValueImpl::GetUIntValue() {
CEF_V8_REQUIRE_ISOLATE_RETURN(0);
if (type_ == TYPE_INT || type_ == TYPE_UINT) {
return uint_value_;

View File

@@ -214,8 +214,8 @@ class CefV8ValueImpl : public CefV8Value {
void InitUndefined();
void InitNull();
void InitBool(bool value);
void InitInt(int32 value);
void InitUInt(uint32 value);
void InitInt(int32_t value);
void InitUInt(uint32_t value);
void InitDouble(double value);
void InitDate(CefBaseTime value);
void InitString(CefString& value);
@@ -241,8 +241,8 @@ class CefV8ValueImpl : public CefV8Value {
bool IsPromise() override;
bool IsSame(CefRefPtr<CefV8Value> value) override;
bool GetBoolValue() override;
int32 GetIntValue() override;
uint32 GetUIntValue() override;
int32_t GetIntValue() override;
uint32_t GetUIntValue() override;
double GetDoubleValue() override;
CefBaseTime GetDateValue() override;
CefString GetStringValue() override;
@@ -348,8 +348,8 @@ class CefV8ValueImpl : public CefV8Value {
union {
bool bool_value_;
int32 int_value_;
uint32 uint_value_;
int32_t int_value_;
uint32_t uint_value_;
double double_value_;
cef_basetime_t date_value_;
cef_string_t string_value_;