mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision c78c0ad7 (#363565)
This commit is contained in:
@@ -1,60 +1,73 @@
|
||||
diff --git public/renderer/content_renderer_client.cc public/renderer/content_renderer_client.cc
|
||||
index 3d0316f..ccd1f58 100644
|
||||
index 32004d1..ccd1f58 100644
|
||||
--- public/renderer/content_renderer_client.cc
|
||||
+++ public/renderer/content_renderer_client.cc
|
||||
@@ -98,7 +98,6 @@ bool ContentRendererClient::AllowPopup() {
|
||||
@@ -98,6 +98,18 @@ bool ContentRendererClient::AllowPopup() {
|
||||
return false;
|
||||
}
|
||||
|
||||
-#ifdef OS_ANDROID
|
||||
bool ContentRendererClient::HandleNavigation(
|
||||
RenderFrame* render_frame,
|
||||
bool is_content_initiated,
|
||||
@@ -110,7 +109,6 @@ bool ContentRendererClient::HandleNavigation(
|
||||
bool is_redirect) {
|
||||
return false;
|
||||
}
|
||||
-#endif
|
||||
|
||||
+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;
|
||||
+}
|
||||
+
|
||||
bool ContentRendererClient::ShouldFork(blink::WebLocalFrame* frame,
|
||||
const GURL& url,
|
||||
const std::string& http_method,
|
||||
diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h
|
||||
index f55c691..0aeb1b24 100644
|
||||
index 59d448c..ef15ff1 100644
|
||||
--- public/renderer/content_renderer_client.h
|
||||
+++ public/renderer/content_renderer_client.h
|
||||
@@ -192,7 +192,6 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -16,6 +16,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"
|
||||
|
||||
@@ -189,6 +191,17 @@ 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
|
||||
@@ -207,7 +206,6 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
blink::WebNavigationType type,
|
||||
blink::WebNavigationPolicy default_policy,
|
||||
bool is_redirect);
|
||||
-#endif
|
||||
+
|
||||
+ // 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);
|
||||
|
||||
// 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
|
||||
diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc
|
||||
index 33219e5..f6aac25 100644
|
||||
index 314fe7b..c519785 100644
|
||||
--- renderer/render_frame_impl.cc
|
||||
+++ renderer/render_frame_impl.cc
|
||||
@@ -4395,7 +4395,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
||||
@@ -4440,6 +4440,14 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
||||
(pending_navigation_params_ &&
|
||||
!pending_navigation_params_->request_params.redirects.empty());
|
||||
|
||||
-#ifdef OS_ANDROID
|
||||
// The handlenavigation API is deprecated and will be removed once
|
||||
// crbug.com/325351 is resolved.
|
||||
if (info.urlRequest.url() != GURL(kSwappedOutURL) &&
|
||||
@@ -4405,7 +4404,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
||||
is_redirect)) {
|
||||
return blink::WebNavigationPolicyIgnore;
|
||||
}
|
||||
-#endif
|
||||
|
||||
+ if (info.urlRequest.url() != GURL(kSwappedOutURL) &&
|
||||
+ GetContentClient()->renderer()->HandleNavigation(
|
||||
+ this, is_content_initiated, render_view_->opener_id_, frame_,
|
||||
+ info.urlRequest, info.navigationType, info.defaultPolicy,
|
||||
+ is_redirect)) {
|
||||
+ return blink::WebNavigationPolicyIgnore;
|
||||
+ }
|
||||
+
|
||||
Referrer referrer(
|
||||
RenderViewImpl::GetReferrerFromRequest(frame_, info.urlRequest));
|
||||
|
||||
|
Reference in New Issue
Block a user