diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 03:40:23 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 03:40:23 +0000 |
commit | 6692b0d7bca9e0e3327d371c312196f3af9ed7c6 (patch) | |
tree | e589215d311709b95cdbdbae330ae86c439b46a4 /chrome/app | |
parent | 2c77c96e4c474ff213c4cf2ed850970c48bbced0 (diff) | |
download | chromium_src-6692b0d7bca9e0e3327d371c312196f3af9ed7c6.zip chromium_src-6692b0d7bca9e0e3327d371c312196f3af9ed7c6.tar.gz chromium_src-6692b0d7bca9e0e3327d371c312196f3af9ed7c6.tar.bz2 |
Show offline interstitial page when offline and reload when reconnected to network.
* Added OfflineResourceHandler that intercept the request and show interstitial page.
* Added OfflineLoadPage that is shown when offline.
This gets deleted when
- User pressed "Load now" btton to proceed or
- User pressed "Cancel" button to cancel loading
- Network become available.
The page first appears as blank page (a little darker than white for now. I'll update when mock is ready),
and then options become available after 3 seconds maximum.
* Added unit test for OfflineLoadPage class.
* OfflineLoadService class to control when/if a load request
should proceed regardless of network status.
The current implementation is tentative and will proceed
if if loading was requested in a given tab.
I'll revisit this class to improve the logic in separate CL
later.
Known Issue:
- thumbnail is not working yet. I'll working on this in separate Cl.
- a tab shows URL instead of title string. I'll fix this in separate CL.
- InitNavigationParams in offline_load_page_unittest is copied from safe_browsing_blocking_page_unittest. I'll move this to common place in separate CL. (hopefully before checking this in)
BUG=chromium-os:3605
TEST=unit test: offline_load_page_unittest
manual: disable wifi and ethernet, then login.
chrome will show the offline page when tab is activated. Enable network (wifi or ethernet) and all tab will start loading again.
Review URL: http://codereview.chromium.org/2931005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52433 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r-- | chrome/app/generated_resources.grd | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 4825c04..c802f74 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -6291,6 +6291,22 @@ Keep your key file in a safe place. You will need it to create new versions of y Options </message> + <!-- Offline page --> + <if expr="pp_ifdef('chromeos')"> + <message name="IDS_OFFLINE_LOAD_HEADLINE" desc="Offline Page HTML headline"> + Network is not available. + </message> + <message name="IDS_OFFLINE_LOAD_DESCRIPTION" desc="Offline Page HTML description"> + Page will be loaded when network becomes available. Press 'Load Now' if you want to load now. + </message> + <message name="IDS_OFFLINE_LOAD_BUTTON"> + Load Now + </message> + <message name="IDS_OFFLINE_BACK_BUTTON"> + Cancel + </message> + </if> + <!-- SafeBrowsing --> <message name="IDS_SAFE_BROWSING_MALWARE_TITLE" desc="SafeBrowsing Malware HTML title"> Malware Detected! |