Skip to content

Commit

Permalink
C++/CLI - Replace OVERRIDE with override
Browse files Browse the repository at this point in the history
OVERRIDE was a CEF macro which has been removed, use standard compliant override

Issue #3636
  • Loading branch information
amaitland committed Jul 31, 2021
1 parent 018aefc commit b24cd8e
Show file tree
Hide file tree
Showing 31 changed files with 160 additions and 160 deletions.
2 changes: 1 addition & 1 deletion CefSharp.BrowserSubprocess.Core/BindObjectAsyncHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace CefSharp
_browserWrapper = nullptr;
}

bool Execute(const CefString& name, CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval, CefString& exception) OVERRIDE
bool Execute(const CefString& name, CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval, CefString& exception) override
{
auto context = CefV8Context::GetCurrentContext();

Expand Down
18 changes: 9 additions & 9 deletions CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ namespace CefSharp
CefBrowserWrapper^ FindBrowserWrapper(int browserId);
JavascriptRootObjectWrapper^ GetJsRootObjectWrapper(int browserId, int64 frameId);

virtual DECL CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() OVERRIDE;
virtual DECL void OnBrowserCreated(CefRefPtr<CefBrowser> browser, CefRefPtr<CefDictionaryValue> extraInfo) OVERRIDE;
virtual DECL void OnBrowserDestroyed(CefRefPtr<CefBrowser> browser) OVERRIDE;
virtual DECL void OnContextCreated(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context) OVERRIDE;
virtual DECL void OnContextReleased(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context) OVERRIDE;
virtual DECL bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefProcessId sourceProcessId, CefRefPtr<CefProcessMessage> message) OVERRIDE;
virtual DECL void OnWebKitInitialized() OVERRIDE;
virtual DECL void OnFocusedNodeChanged(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefDOMNode> node) OVERRIDE;
virtual DECL void OnUncaughtException(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context, CefRefPtr<CefV8Exception> exception, CefRefPtr<CefV8StackTrace> stackTrace) OVERRIDE;
virtual DECL CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() override;
virtual DECL void OnBrowserCreated(CefRefPtr<CefBrowser> browser, CefRefPtr<CefDictionaryValue> extraInfo) override;
virtual DECL void OnBrowserDestroyed(CefRefPtr<CefBrowser> browser) override;
virtual DECL void OnContextCreated(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context) override;
virtual DECL void OnContextReleased(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context) override;
virtual DECL bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefProcessId sourceProcessId, CefRefPtr<CefProcessMessage> message) override;
virtual DECL void OnWebKitInitialized() override;
virtual DECL void OnFocusedNodeChanged(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefDOMNode> node) override;
virtual DECL void OnUncaughtException(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context, CefRefPtr<CefV8Exception> exception, CefRefPtr<CefV8StackTrace> stackTrace) override;

IMPLEMENT_REFCOUNTING(CefAppUnmanagedWrapper);
};
Expand Down
2 changes: 1 addition & 1 deletion CefSharp.BrowserSubprocess.Core/JavascriptMethodHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace CefSharp
_callbackRegistry = nullptr;
}

virtual bool Execute(const CefString& name, CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval, CefString& exception) OVERRIDE;
virtual bool Execute(const CefString& name, CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval, CefString& exception) override;

CefRefPtr<CefV8Value> ConvertToCefObject(Object^ obj);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace CefSharp
_javascriptCallbackRegistry = javascriptCallbackRegistry;
}

bool Execute(const CefString& name, CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval, CefString& exception) OVERRIDE
bool Execute(const CefString& name, CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval, CefString& exception) override
{
if (arguments.size() == 0 || arguments.size() > 1)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace CefSharp
_javascriptObjects = javascriptObjects;
}

bool Execute(const CefString& name, CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval, CefString& exception) OVERRIDE
bool Execute(const CefString& name, CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval, CefString& exception) override
{
auto context = CefV8Context::GetCurrentContext();
if (context.get())
Expand Down
2 changes: 1 addition & 1 deletion CefSharp.BrowserSubprocess.Core/SubProcessApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace CefSharp
_schemes = nullptr;
}

void OnRegisterCustomSchemes(CefRawPtr<CefSchemeRegistrar> registrar) OVERRIDE
void OnRegisterCustomSchemes(CefRawPtr<CefSchemeRegistrar> registrar) override
{
for each (CefCustomScheme ^ scheme in _schemes->AsReadOnly())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace CefSharp
_handler = nullptr;
}

void OnComplete() OVERRIDE
void OnComplete() override
{
_handler->OnComplete();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace CefSharp
}


bool CanSendCookie(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request, const CefCookie& cookie) OVERRIDE
bool CanSendCookie(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request, const CefCookie& cookie) override
{
Request requestWrapper(request);
auto managedCookie = TypeConversion::FromNative(cookie);
Expand All @@ -57,7 +57,7 @@ namespace CefSharp
return _handler->CanSendCookie(_browserControl, nullptr, nullptr, %requestWrapper, managedCookie);
}

bool CanSaveCookie(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request, CefRefPtr<CefResponse> response, const CefCookie& cookie) OVERRIDE
bool CanSaveCookie(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request, CefRefPtr<CefResponse> response, const CefCookie& cookie) override
{
Request requestWrapper(request);
CefResponseWrapper responseWrapper(response);
Expand Down
2 changes: 1 addition & 1 deletion CefSharp.Core.Runtime/Internals/CefCookieVisitorAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace CefSharp
_visitor = nullptr;
}

virtual bool Visit(const CefCookie& cefCookie, int count, int total, bool& deleteCookie) OVERRIDE
virtual bool Visit(const CefCookie& cefCookie, int count, int total, bool& deleteCookie) override
{
auto cookie = TypeConversion::FromNative(cefCookie);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace CefSharp
_handler = nullptr;
}

void OnComplete(int numDeleted) OVERRIDE
void OnComplete(int numDeleted) override
{
_handler->OnComplete(numDeleted);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,30 +46,30 @@ namespace CefSharp
int message_id,
bool success,
const void* result,
size_t result_size) OVERRIDE
size_t result_size) override
{
CefBrowserWrapper browserWrapper(browser);
UnmanagedMemoryStream resultStream((Byte*)result, (Int64)result_size, (Int64)result_size, FileAccess::Read);

_handler->OnDevToolsMethodResult(%browserWrapper, message_id, success, %resultStream);
}

virtual void OnDevToolsEvent(CefRefPtr<CefBrowser> browser, const CefString& method, const void* params, size_t params_size) OVERRIDE
virtual void OnDevToolsEvent(CefRefPtr<CefBrowser> browser, const CefString& method, const void* params, size_t params_size) override
{
CefBrowserWrapper browserWrapper(browser);
UnmanagedMemoryStream paramsStream((Byte*)params, (Int64)params_size, (Int64)params_size, FileAccess::Read);

_handler->OnDevToolsEvent(%browserWrapper, StringUtils::ToClr(method), %paramsStream);
}

void OnDevToolsAgentAttached(CefRefPtr<CefBrowser> browser) OVERRIDE
void OnDevToolsAgentAttached(CefRefPtr<CefBrowser> browser) override
{
CefBrowserWrapper browserWrapper(browser);

_handler->OnDevToolsAgentAttached(%browserWrapper);
}

void OnDevToolsAgentDetached(CefRefPtr<CefBrowser> browser) OVERRIDE
void OnDevToolsAgentDetached(CefRefPtr<CefBrowser> browser) override
{
CefBrowserWrapper browserWrapper(browser);

Expand Down
16 changes: 8 additions & 8 deletions CefSharp.Core.Runtime/Internals/CefExtensionHandlerAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace CefSharp
// be the error code.
///
/*--cef()--*/
void OnExtensionLoadFailed(cef_errorcode_t result) OVERRIDE
void OnExtensionLoadFailed(cef_errorcode_t result) override
{
_handler->OnExtensionLoadFailed((CefErrorCode)result);
}
Expand All @@ -51,7 +51,7 @@ namespace CefSharp
// |extension| is the loaded extension.
///
/*--cef()--*/
void OnExtensionLoaded(CefRefPtr<CefExtension> extension) OVERRIDE
void OnExtensionLoaded(CefRefPtr<CefExtension> extension) override
{
//TODO: Should this be auto disposed?
_handler->OnExtensionLoaded(gcnew CefExtensionWrapper(extension));
Expand All @@ -61,7 +61,7 @@ namespace CefSharp
// Called after the CefExtension::Unload request has completed.
///
/*--cef()--*/
void OnExtensionUnloaded(CefRefPtr<CefExtension> extension) OVERRIDE
void OnExtensionUnloaded(CefRefPtr<CefExtension> extension) override
{
//TODO: Add comment to interface saying extension is only valid within the scope
//of this method as it's auto disposed
Expand All @@ -88,7 +88,7 @@ namespace CefSharp
bool OnBeforeBackgroundBrowser(CefRefPtr<CefExtension> extension,
const CefString& url,
CefRefPtr<CefClient>& client,
CefBrowserSettings& settings) OVERRIDE
CefBrowserSettings& settings) override
{
BrowserSettings browserSettingsWrapper(&settings);

Expand Down Expand Up @@ -120,7 +120,7 @@ namespace CefSharp
bool active,
CefWindowInfo& windowInfo,
CefRefPtr<CefClient>& client,
CefBrowserSettings& settings) OVERRIDE
CefBrowserSettings& settings) override
{
BrowserSettings browserSettingsWrapper(&settings);

Expand All @@ -147,7 +147,7 @@ namespace CefSharp
CefRefPtr<CefBrowser> GetActiveBrowser(
CefRefPtr<CefExtension> extension,
CefRefPtr<CefBrowser> browser,
bool includeIncognito) OVERRIDE
bool includeIncognito) override
{
//TODO: Should extension be auto disposed?
auto activeBrowser = _handler->GetActiveBrowser(gcnew CefExtensionWrapper(extension),
Expand Down Expand Up @@ -177,7 +177,7 @@ namespace CefSharp
bool CanAccessBrowser(CefRefPtr<CefExtension> extension,
CefRefPtr<CefBrowser> browser,
bool includeIncognito,
CefRefPtr<CefBrowser> target_browser) OVERRIDE
CefRefPtr<CefBrowser> target_browser) override
{
return _handler->CanAccessBrowser(gcnew CefExtensionWrapper(extension),
gcnew CefBrowserWrapper(browser),
Expand All @@ -200,7 +200,7 @@ namespace CefSharp
CefRefPtr<CefExtension> extension,
CefRefPtr<CefBrowser> browser,
const CefString& file,
CefRefPtr<CefGetExtensionResourceCallback> callback) OVERRIDE
CefRefPtr<CefGetExtensionResourceCallback> callback) override
{
return _handler->GetExtensionResource(gcnew CefExtensionWrapper(extension),
gcnew CefBrowserWrapper(browser),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace CefSharp
bool Visit(CefRefPtr<CefNavigationEntry> entry,
bool current,
int index,
int total) OVERRIDE
int total) override
{
auto navEntry = TypeConversion::FromNative(entry, current);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace CefSharp
_callback = nullptr;
}

virtual void OnPdfPrintFinished(const CefString& path, bool ok) OVERRIDE
virtual void OnPdfPrintFinished(const CefString& path, bool ok) override
{
if (static_cast<IPrintToPdfCallback^>(_callback) != nullptr)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace CefSharp
/// additional information about why registration failed.
/// </summary>
virtual void OnCdmRegistrationComplete(cef_cdm_registration_error_t result,
const CefString& error_message) OVERRIDE
const CefString& error_message) override
{
auto r = gcnew CdmRegistration((CdmRegistrationErrorCode)result, StringUtils::ToClr(error_message));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ namespace CefSharp
bool is_main_frame,
const CefString& top_origin_url,
CefRefPtr<CefWebPluginInfo> plugin_info,
CefRequestContextHandler::PluginPolicy* plugin_policy) OVERRIDE;
CefRequestContextHandler::PluginPolicy* plugin_policy) override;

virtual void OnRequestContextInitialized(CefRefPtr<CefRequestContext> requestContext) OVERRIDE;
virtual void OnRequestContextInitialized(CefRefPtr<CefRequestContext> requestContext) override;

virtual CefRefPtr<CefResourceRequestHandler> GetResourceRequestHandler(
CefRefPtr<CefBrowser> browser,
Expand All @@ -47,7 +47,7 @@ namespace CefSharp
bool is_navigation,
bool is_download,
const CefString& request_initiator,
bool& disable_default_handling) OVERRIDE;
bool& disable_default_handling) override;

IMPLEMENT_REFCOUNTING(CefRequestContextHandlerAdapter);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace CefSharp
_handler = nullptr;
}

void OnResolveCompleted(cef_errorcode_t result, const std::vector<CefString>& resolvedIps) OVERRIDE
void OnResolveCompleted(cef_errorcode_t result, const std::vector<CefString>& resolvedIps) override
{
_handler->OnResolveCompleted((CefErrorCode)result, StringUtils::ToClr(resolvedIps));
}
Expand Down
14 changes: 7 additions & 7 deletions CefSharp.Core.Runtime/Internals/CefResourceHandlerAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ namespace CefSharp
_request = nullptr;
}

virtual bool Open(CefRefPtr<CefRequest> request, bool& handle_request, CefRefPtr<CefCallback> callback) OVERRIDE;
virtual void GetResponseHeaders(CefRefPtr<CefResponse> response, int64& response_length, CefString& redirectUrl) OVERRIDE;
virtual bool Skip(int64 bytesToSkip, int64& bytesSkipped, CefRefPtr<CefResourceSkipCallback> callback) OVERRIDE;
virtual bool Read(void* dataOut, int bytesToRead, int& bytesRead, CefRefPtr<CefResourceReadCallback> callback) OVERRIDE;
virtual void Cancel() OVERRIDE;
virtual bool Open(CefRefPtr<CefRequest> request, bool& handle_request, CefRefPtr<CefCallback> callback) override;
virtual void GetResponseHeaders(CefRefPtr<CefResponse> response, int64& response_length, CefString& redirectUrl) override;
virtual bool Skip(int64 bytesToSkip, int64& bytesSkipped, CefRefPtr<CefResourceSkipCallback> callback) override;
virtual bool Read(void* dataOut, int bytesToRead, int& bytesRead, CefRefPtr<CefResourceReadCallback> callback) override;
virtual void Cancel() override;

//Depricated
virtual bool ProcessRequest(CefRefPtr<CefRequest> request, CefRefPtr<CefCallback> callback) OVERRIDE;
virtual bool ReadResponse(void* data_out, int bytes_to_read, int& bytes_read, CefRefPtr<CefCallback> callback) OVERRIDE;
virtual bool ProcessRequest(CefRefPtr<CefRequest> request, CefRefPtr<CefCallback> callback) override;
virtual bool ReadResponse(void* data_out, int bytes_to_read, int& bytes_read, CefRefPtr<CefCallback> callback) override;

IMPLEMENT_REFCOUNTING(CefResourceHandlerAdapter);
};
Expand Down
Loading

0 comments on commit b24cd8e

Please sign in to comment.