From: Grzegorz Spryszynski Date: Fri, 13 Jun 2014 22:18:34 +0000 (-0700) Subject: [Error Page] Lack of error page message X-Git-Tag: submit/tizen/20201118.160233~1986 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d8d593f567df93a3b0b26aaef36bac27cdb8e7f;p=platform%2Fframework%2Fweb%2Fchromium-efl.git [Error Page] Lack of error page message Issues: CBBROWSER-135, CBBROWSER-136 [Problem] There is no message when page can not be loaded. [Cause] The error pare is no implemented. [Solution] Added information with description when there is some problem with page loading. Change-Id: I04f0b7796ec71d5b0b261a74273efac24cee0ad1 Conflicts: src/apps/shell/app/shell_main_delegate.cc Conflicts: src/apps/shell/app/shell_main_delegate.cc --- diff --git a/tizen_src/impl/eweb_view.cc b/tizen_src/impl/eweb_view.cc index f35481c..fcea01d 100644 --- a/tizen_src/impl/eweb_view.cc +++ b/tizen_src/impl/eweb_view.cc @@ -31,6 +31,7 @@ #include "API/ewk_view_private.h" #include "public/ewk_private.h" #include "web_contents_delegate_efl.h" +#include "public/platform/WebString.h" #include "base/files/file_path.h" #include "base/logging.h" @@ -50,6 +51,8 @@ #include "third_party/WebKit/public/web/WebFindOptions.h" #include "ui/events/gestures/gesture_recognizer.h" #include "browser/motion/wkext_motion.h" +#include "grit/webkit_strings.h" +#include "ui/base/l10n/l10n_util.h" #ifdef OS_TIZEN #include @@ -1632,3 +1635,54 @@ bool EWebView::IsIMEShow() { gfx::Rect EWebView::GetIMERect() { return rwhv()->im_context()->GetIMERect(); } + +std::string EWebView::GetErrorPage(const std::string& invalidUrl) { + base::string16 url16; + url16.assign(invalidUrl.begin(), invalidUrl.end()); + + std::string errorHead = l10n_util::GetStringUTF8(IDS_ERRORPAGES_HEADING_NOT_AVAILABLE); + std::string errorMessage = l10n_util::GetStringFUTF8(IDS_ERRORPAGES_SUMMARY_NAME_NOT_RESOLVED, url16); + + std::string html = + "" + "" + "" + "" + ""; + html += invalidUrl; + html += + "" + "" + "" + "" + "
" + "

"; + html += errorHead; + html += "


"; + html += errorMessage; + html += + "
" + "" + "" + ; + return html; +} diff --git a/tizen_src/impl/eweb_view.h b/tizen_src/impl/eweb_view.h index 7eab524..99693ce 100644 --- a/tizen_src/impl/eweb_view.h +++ b/tizen_src/impl/eweb_view.h @@ -260,6 +260,8 @@ class EWebView bool IsIMEShow(); gfx::Rect GetIMERect(); + std::string GetErrorPage(const std::string& invalidUrl); + private: EWebView(EWebContext*, Evas_Object* smart_object); ~EWebView(); diff --git a/tizen_src/impl/web_process_content_main_delegate_efl.cc b/tizen_src/impl/web_process_content_main_delegate_efl.cc index 6f26896..db894d3 100644 --- a/tizen_src/impl/web_process_content_main_delegate_efl.cc +++ b/tizen_src/impl/web_process_content_main_delegate_efl.cc @@ -38,7 +38,7 @@ ContentRendererClient* WebProcessContentMainDelegateEfl::CreateContentRendererCl void WebProcessContentMainDelegateEfl::PreSandboxStartup() { base::FilePath pak_dir; base::FilePath pak_file; - PathService::Get(base::DIR_MODULE, &pak_dir); + PathService::Get(base::DIR_EXE, &pak_dir); pak_file = pak_dir.Append(FILE_PATH_LITERAL("content_shell.pak")); ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); }