// from app side.
if (web_view->IsLoadErrorPageCallbackSet()) {
const char* error_page = web_view->InvokeViewLoadErrorPageCallback(
- handle->GetURL(), error_code, "ERR_ABORTED");
+ handle->GetURL(), error_code, error_code == net::ERR_ABORTED);
if (error_page) {
LOG(ERROR) << "Already get customer error page";
// Currently return result with action NavigationThrottle::CANCEL, error
}
// Remove below code while ewk_error_cancellation_get has been implemented.
-const char* EWebView::InvokeViewLoadErrorPageCallback(
- const GURL& url,
- int error_code,
- const std::string& error_description) {
- std::unique_ptr<_Ewk_Error> err(
- new _Ewk_Error(error_code, url.possibly_invalid_spec().c_str(),
- error_description.c_str()));
+const char* EWebView::InvokeViewLoadErrorPageCallback(const GURL& url,
+ int error_code,
+ bool is_cancellation) {
+ std::unique_ptr<_Ewk_Error> err(new _Ewk_Error(
+ error_code, is_cancellation, url.possibly_invalid_spec().c_str()));
_Ewk_Error_Page error_page;
LOG(INFO) << "EWebView::InvokeLoadErrorPageCallback url: "
void SetViewLoadErrorPageCallback(Ewk_View_Error_Page_Load_Callback callback,
void* user_data);
- const char* InvokeViewLoadErrorPageCallback(
- const GURL& url,
- int error_code,
- const std::string& error_description);
+ const char* InvokeViewLoadErrorPageCallback(const GURL& url,
+ int error_code,
+ bool is_cancellation);
bool IsLoadErrorPageCallbackSet() const;
void SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback,
void* user_data);