mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Remove CEF-specific integer and char16 typedef's (see #3507)
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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 {
|
||||
|
@@ -185,7 +185,7 @@ CefString CefFrameImpl::GetName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
int64 CefFrameImpl::GetIdentifier() {
|
||||
int64_t CefFrameImpl::GetIdentifier() {
|
||||
CEF_REQUIRE_RT_RETURN(0);
|
||||
|
||||
return frame_id_;
|
||||
|
@@ -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;
|
||||
|
@@ -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_;
|
||||
|
@@ -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_;
|
||||
|
Reference in New Issue
Block a user