Upstream version 7.36.153.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / renderer / tizen / xwalk_content_renderer_client_tizen.cc
index 0835049..9f9fd52 100644 (file)
@@ -7,9 +7,12 @@
 #include <string>
 
 #include "base/files/file_path.h"
+#include "base/strings/stringprintf.h"
 #include "net/base/filename_util.h"
+#include "net/base/net_errors.h"
 #include "url/gurl.h"
 #include "xwalk/application/common/constants.h"
+#include "third_party/WebKit/public/platform/WebURLError.h"
 #include "third_party/WebKit/public/web/WebFrame.h"
 #include "third_party/WebKit/public/web/WebDocument.h"
 
@@ -88,4 +91,24 @@ bool XWalkContentRendererClientTizen::WillSendRequest(
   return true;
 }
 
+bool XWalkContentRendererClientTizen::HasErrorPage(int http_status_code,
+                                                   std::string* error_domain) {
+  return true;
+}
+
+void XWalkContentRendererClientTizen::GetNavigationErrorStrings(
+    content::RenderView* render_view,
+    blink::WebFrame* frame,
+    const blink::WebURLRequest& failed_request,
+    const blink::WebURLError& error,
+    std::string* error_html,
+    base::string16* error_description) {
+  if (error_html) {
+    *error_html =
+        base::StringPrintf("<html><body style=\"text-align: center;\">"
+                           "<h1>NET ERROR : %s</h1></body></html>",
+                           net::ErrorToString(error.reason));
+  }
+}
+
 }  // namespace xwalk