summaryrefslogtreecommitdiffstats
path: root/content/public/renderer
diff options
context:
space:
mode:
authorgsennton <gsennton@chromium.org>2016-01-12 03:07:32 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-12 11:08:16 +0000
commit68afca713e53e857cbc6c2d25aeb0bb1d76cd4ac (patch)
tree87c838ebe00c70fea70fbb42f47ee4a1374cbd53 /content/public/renderer
parent9eb67a8f0290d89f19a9cadc7519aac0ef371e60 (diff)
downloadchromium_src-68afca713e53e857cbc6c2d25aeb0bb1d76cd4ac.zip
chromium_src-68afca713e53e857cbc6c2d25aeb0bb1d76cd4ac.tar.gz
chromium_src-68afca713e53e857cbc6c2d25aeb0bb1d76cd4ac.tar.bz2
Revert 3 CLs for shouldOverrideUrlLoading implementation.
Since https://codereview.chromium.org/1424263003 does not handle overriding about:blank loads (or rather, about:blank loads are handled synchronously and can thus be finished before we have a chance to override them) we cannot land that patch without potentially breaking lots of apps using WebView. The second CL being reverted is a fix for the first one to post didStopLoad and didFailLoad in the correct order. The third CL being reverted here is a small change removing code that is not used by https://codereview.chromium.org/1424263003 but is used now that we revert that CL. This reverts commit bae3ff13e6959b713b872df3c4a734d6a1ea01ad. This reverts commit e1da704f67f34022b7aaf3afe277c86217844114. This reverts commit c002c7ea9c5a3dbeb665e4070d852e6724d1ff86. TBR=palmer@chromium.org,jam@chromium.org BUG=325351,462306 Review URL: https://codereview.chromium.org/1530183004 Cr-Commit-Position: refs/heads/master@{#368849}
Diffstat (limited to 'content/public/renderer')
-rw-r--r--content/public/renderer/content_renderer_client.cc14
-rw-r--r--content/public/renderer/content_renderer_client.h19
2 files changed, 33 insertions, 0 deletions
diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc
index 32004d1..3d0316f 100644
--- a/content/public/renderer/content_renderer_client.cc
+++ b/content/public/renderer/content_renderer_client.cc
@@ -98,6 +98,20 @@ bool ContentRendererClient::AllowPopup() {
return false;
}
+#ifdef OS_ANDROID
+bool ContentRendererClient::HandleNavigation(
+ RenderFrame* render_frame,
+ bool is_content_initiated,
+ int opener_id,
+ blink::WebFrame* frame,
+ const blink::WebURLRequest& request,
+ blink::WebNavigationType type,
+ blink::WebNavigationPolicy default_policy,
+ bool is_redirect) {
+ return false;
+}
+#endif
+
bool ContentRendererClient::ShouldFork(blink::WebLocalFrame* frame,
const GURL& url,
const std::string& http_method,
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index fd2f3af..45686b5 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -18,6 +18,8 @@
#include "base/strings/string16.h"
#include "content/public/common/content_client.h"
#include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
+#include "third_party/WebKit/public/web/WebNavigationPolicy.h"
+#include "third_party/WebKit/public/web/WebNavigationType.h"
#include "ui/base/page_transition_types.h"
#include "v8/include/v8.h"
@@ -192,6 +194,23 @@ class CONTENT_EXPORT ContentRendererClient {
// Returns true if a popup window should be allowed.
virtual bool AllowPopup();
+#ifdef OS_ANDROID
+ // TODO(sgurun) This callback is deprecated and will be removed as soon
+ // as android webview completes implementation of a resource throttle based
+ // shouldoverrideurl implementation. See crbug.com/325351
+ //
+ // Returns true if the navigation was handled by the embedder and should be
+ // ignored by WebKit. This method is used by CEF and android_webview.
+ virtual bool HandleNavigation(RenderFrame* render_frame,
+ bool is_content_initiated,
+ int opener_id,
+ blink::WebFrame* frame,
+ const blink::WebURLRequest& request,
+ blink::WebNavigationType type,
+ blink::WebNavigationPolicy default_policy,
+ bool is_redirect);
+#endif
+
// Returns true if we should fork a new process for the given navigation.
// If |send_referrer| is set to false (which is the default), no referrer
// header will be send for the navigation. Otherwise, the referrer header is