<webview>: Do not show blocked_by_client error page for guest.
commitf677288e17388766fcd942c9c29b214560a4593f
authorlazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 18 Sep 2013 02:11:00 +0000 (18 02:11 +0000)
committerlazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 18 Sep 2013 02:11:00 +0000 (18 02:11 +0000)
treeabf869fb9f348825ba2e4ccf8ba0f597e5b512a1
parent103c824ba88c47c873c748fa8ebaf0800f89b87f
<webview>: Do not show blocked_by_client error page for guest.

When a request to load a top level frame inside webview is cancelled by
using <webview>'s WebRequest API, by default we load
"This webpage is blocked by an extension" error page.
This CL avoids loading error page's html in guest render view.
We already fire loadabort event in this case.

BUG=284741
Test=With webrequest API, a webview containing:
<a href="http://foo">Foo</a>

When clicked on the link, if embedder wants to prevent navigating the <webview>
to foo, does so using webRequest API to cancel:

<webview>.request.onBeforeRequest.addListener(function(details) {
  if (details.type == 'main_frame' && details.url == 'http://foo' {
    window.open('...');
    return {cancel: true};
  }
  return {cancel: 'false'};
},
{urls: ['<all_urls>']},
['blocking']);

The "return {cancel:true}" won't load the mentioned error page anymore in
the webview.

Review URL: https://chromiumcodereview.appspot.com/23856006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223769 0039d316-1c4b-4281-b951-d872f2087c98
content/browser/browser_plugin/browser_plugin_guest.cc
content/common/view_messages.h
content/public/common/renderer_preferences.cc
content/public/common/renderer_preferences.h
content/renderer/render_view_impl.cc