[WebView] Componentize strings/resources for error pages
This CL takes the first step to componentizing WebView's implementation
of network error pages for sharing with WebLayer (which currently has
forked the implementation). Specifically, this CL moves the
necessary strings and resources to //components. This move leaves
aw_strings.grd and aw_resources.grd effectively empty; however, this
CL makes no attempt to eliminate them in order to keep its scope
limited.
Note that we do not whitelist the strings/resources in WebLayer. We
would ideally do so in order to not have an implicit dependence of
WebLayer on WebView's whitelists, but doing so would currently cause
these resources to be duplicated in the APK. See crbug.com/1041799 for
further details.
Bug: 1024326
Change-Id: If135634e68f5524ba3830c8f0a3f763d12beebac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1991569
Commit-Queue: Colin Blundell <[email protected]>
Reviewed-by: Bo <[email protected]>
Cr-Commit-Position: refs/heads/master@{#731249}
diff --git a/components/android_system_error_page_strings.grdp b/components/android_system_error_page_strings.grdp
new file mode 100644
index 0000000..99cb730
--- /dev/null
+++ b/components/android_system_error_page_strings.grdp
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<grit-part>
+ <!-- Strings for displaying error pages with Android system styling -->
+ <message name="IDS_ANDROID_ERROR_PAGE_WEBPAGE_NOT_AVAILABLE" desc="The title of the webpage shown when the requested URL in unavailable">
+ Webpage not available
+ </message>
+ <message name="IDS_ANDROID_ERROR_PAGE_WEBPAGE_CAN_NOT_BE_LOADED" desc="Message informing the user that the page can not be loaded">
+ The webpage at <ph name="PAGE"><strong>$1</strong><ex>page.html</ex></ph> could not be loaded because:
+ </message>
+ <message name="IDS_ANDROID_ERROR_PAGE_WEBPAGE_TEMPORARILY_DOWN" desc="Message informing the user that it is not possible to contact the server">
+ The webpage at <ph name="PAGE"><strong>$1</strong><ex>page.html</ex></ph> might be temporarily down or it may have moved permanently to a new web address.
+ </message>
+ <message name="IDS_ANDROID_ERROR_PAGE_WEBPAGE_TEMPORARILY_DOWN_SUGGESTIONS" desc="Suggestions provided to the user when it is not possible to contact the server"><ph name="MARKUP_1"><strong><ex>_</ex></ph>Suggestions:<ph name="MARKUP_2"></strong><ul><li><ex>_</ex></ph>Make sure you have a data connection<ph name="MARKUP_3"></li><li><ex>_</ex></ph>Reload this webpage later<ph name="MARKUP_4"></li><li><ex>_</ex></ph>Check the address you entered<ph name="MARKUP_5"></li></ul><ex>_</ex></ph>
+ </message>
+</grit-part>