Skip to content

Commit

Permalink
fixed: use int64_t instead of int64
Browse files Browse the repository at this point in the history
  • Loading branch information
L-Super committed Sep 2, 2023
1 parent a6969ff commit 9f0f8e5
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 25 deletions.
2 changes: 1 addition & 1 deletion include/CefViewBrowserApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class CefViewBrowserApp

virtual void OnBeforeChildProcessLaunch(CefRefPtr<CefCommandLine> command_line) override;

virtual void OnScheduleMessagePumpWork(int64 delay_ms) override;
virtual void OnScheduleMessagePumpWork(int64_t delay_ms) override;

#pragma endregion CefBrowserProcessHandler
};
Expand Down
6 changes: 3 additions & 3 deletions include/CefViewQueryHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class CefViewQueryHandler
/// <returns></returns>
virtual bool OnQuery(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
int64 query_id,
int64_t query_id,
const CefString& request,
bool persistent,
CefRefPtr<Callback> callback) override;
Expand All @@ -60,7 +60,7 @@ class CefViewQueryHandler
/// <param name="browser"></param>
/// <param name="frame"></param>
/// <param name="query_id"></param>
virtual void OnQueryCanceled(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, int64 query_id) override;
virtual void OnQueryCanceled(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, int64_t query_id) override;

/// <summary>
///
Expand All @@ -81,7 +81,7 @@ class CefViewQueryHandler
/// <summary>
///
/// </summary>
std::map<int64, CefRefPtr<Callback>> mapCallback_;
std::map<int64_t, CefRefPtr<Callback>> mapCallback_;

/// <summary>
///
Expand Down
2 changes: 1 addition & 1 deletion src/CefView/CefBrowserApp/CefViewBrowserApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ CefViewBrowserApp::OnBeforeChildProcessLaunch(CefRefPtr<CefCommandLine> command_
}

void
CefViewBrowserApp::OnScheduleMessagePumpWork(int64 delay_ms)
CefViewBrowserApp::OnScheduleMessagePumpWork(int64_t delay_ms)
{
auto delegate = app_delegate_.lock();

Expand Down
4 changes: 2 additions & 2 deletions src/CefView/CefBrowserApp/CefViewQueryHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CefViewQueryHandler::~CefViewQueryHandler() {}
bool
CefViewQueryHandler::OnQuery(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
int64 query_id,
int64_t query_id,
const CefString& request,
bool persistent,
CefRefPtr<Callback> callback)
Expand All @@ -29,7 +29,7 @@ CefViewQueryHandler::OnQuery(CefRefPtr<CefBrowser> browser,
}

void
CefViewQueryHandler::OnQueryCanceled(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, int64 query_id)
CefViewQueryHandler::OnQueryCanceled(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, int64_t query_id)
{
mtxCallbackMap_.lock();
auto it = mapCallback_.find(query_id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ SchemeHandler::Open(CefRefPtr<CefRequest> request, bool& handle_request, CefRefP
}

void
SchemeHandler::GetResponseHeaders(CefRefPtr<CefResponse> response, int64& response_length, CefString& redirectUrl)
SchemeHandler::GetResponseHeaders(CefRefPtr<CefResponse> response, int64_t& response_length, CefString& redirectUrl)
{
CEF_REQUIRE_IO_THREAD();
DCHECK(!data_.empty());
Expand All @@ -55,7 +55,7 @@ SchemeHandler::GetResponseHeaders(CefRefPtr<CefResponse> response, int64& respon
}

bool
SchemeHandler::Skip(int64 bytes_to_skip, int64& bytes_skipped, CefRefPtr<CefResourceSkipCallback> callback)
SchemeHandler::Skip(int64_t bytes_to_skip, int64_t& bytes_skipped, CefRefPtr<CefResourceSkipCallback> callback)
{
bytes_skipped = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ class SchemeHandler : public CefResourceHandler
virtual bool Open(CefRefPtr<CefRequest> request, bool& handle_request, CefRefPtr<CefCallback> callback) override;

virtual void GetResponseHeaders(CefRefPtr<CefResponse> response,
int64& response_length,
int64_t& response_length,
CefString& redirectUrl) override;

virtual bool Skip(int64 bytes_to_skip, int64& bytes_skipped, CefRefPtr<CefResourceSkipCallback> callback) override;
virtual bool Skip(int64_t bytes_to_skip, int64_t& bytes_skipped, CefRefPtr<CefResourceSkipCallback> callback) override;

virtual bool Read(void* data_out,
int bytes_to_read,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RenderDelegate::OnContextCreated(CefRefPtr<CefViewRenderApp> app,
frame->ExecuteJavaScript("console.info('[JSRuntime]:frame context created')", frame->GetURL(), 0);

// binding bridge object and functions
int64 frameId = frame->GetIdentifier();
auto frameId = frame->GetIdentifier();
auto it = frame_id_to_client_map_.find(frameId);
if (it == frame_id_to_client_map_.end()) {
// create and insert the bridge Object into this frame.window object
Expand All @@ -63,7 +63,7 @@ RenderDelegate::OnContextReleased(CefRefPtr<CefViewRenderApp> app,
{
render_message_router_->OnContextReleased(browser, frame, context);

int64 frameId = frame->GetIdentifier();
auto frameId = frame->GetIdentifier();
auto it = frame_id_to_client_map_.find(frameId);
if (it != frame_id_to_client_map_.end()) {
frame_id_to_client_map_.erase(it);
Expand Down Expand Up @@ -151,7 +151,7 @@ RenderDelegate::ExecuteEventListener(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefListValue> args)
{
if (browser && frame) {
int64 frameId = frame->GetIdentifier();
auto frameId = frame->GetIdentifier();
auto it = frame_id_to_client_map_.find(frameId);
if (it != frame_id_to_client_map_.end()) {
const CefRefPtr<CefViewClient>& objClient = it->second;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class RenderDelegate : public CefViewRenderApp::RenderDelegate
/// <summary>
///
/// </summary>
typedef std::unordered_map<int64, CefRefPtr<CefViewClient>> FrameID2CefClientMap;
typedef std::unordered_map<int64_t, CefRefPtr<CefViewClient>> FrameID2CefClientMap;

public:
/// <summary>
Expand Down
18 changes: 8 additions & 10 deletions src/Shared/Common/CefViewDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,27 @@

#include "CefViewDebug.h"

#include <cstdarg>
#include <string>
#include <vector>

std::string toString(CefRefPtr<CefBrowser> browser)
{
std::string msg;

msg += "( ";
msg += "CefBrowser:";
msg += ", ptr=" + std::to_string((int64)browser.get());
msg += ", ptr=" + std::to_string((int64_t)browser.get());
#if CEF_VERSION_MAJOR > 91
msg += ", IsValid=" + std::to_string(browser->IsValid());
#endif
msg += ", GetHost=" + std::to_string((int64)browser->GetHost().get());
msg += ", GetHost=" + std::to_string((int64_t)browser->GetHost().get());
msg += ", CanGoBack=" + std::to_string(browser->CanGoBack());
msg += ", CanGoForward=" + std::to_string(browser->CanGoForward());
msg += ", IsLoading=" + std::to_string(browser->IsLoading());
msg += ", GetIdentifier=" + std::to_string(browser->GetIdentifier());
msg += ", IsPopup=" + std::to_string(browser->IsPopup());
msg += ", HasDocument=" + std::to_string(browser->HasDocument());
msg += ", GetMainFrame=" + std::to_string((int64)browser->GetMainFrame().get());
msg += ", GetFocusedFrame=" + std::to_string((int64)browser->GetFocusedFrame().get());
msg += ", GetMainFrame=" + std::to_string((int64_t)browser->GetMainFrame().get());
msg += ", GetFocusedFrame=" + std::to_string((int64_t)browser->GetFocusedFrame().get());
msg += ", GetFrameCount=" + std::to_string(browser->GetFrameCount());
msg += " )";

Expand All @@ -42,16 +40,16 @@ std::string toString(CefRefPtr<CefFrame> frame)

msg += "( ";
msg += "CefFrame:";
msg += ", ptr=" + std::to_string((int64)frame.get());
msg += ", ptr=" + std::to_string((int64_t)frame.get());
msg += ", IsValid=" + std::to_string(frame->IsValid());
msg += ", IsMain=" + std::to_string(frame->IsMain());
msg += ", IsFocused=" + std::to_string(frame->IsFocused());
msg += ", GetName=" + frame->GetName().ToString();
msg += ", GetIdentifier=" + std::to_string(frame->GetIdentifier());
msg += ", GetParent=" + std::to_string((int64)frame->GetParent().get());
msg += ", GetParent=" + std::to_string((int64_t)frame->GetParent().get());
msg += ", GetURL=" + frame->GetURL().ToString();
msg += ", GetBrowser=" + std::to_string((int64)frame->GetBrowser().get());
//msg += ", GetV8Context=" + std::to_string((int64)frame->GetV8Context().get());
msg += ", GetBrowser=" + std::to_string((int64_t)frame->GetBrowser().get());
//msg += ", GetV8Context=" + std::to_string((int64_t)frame->GetV8Context().get());
msg += " )";

return msg;
Expand Down

0 comments on commit 9f0f8e5

Please sign in to comment.