Chromium Code Reviews| Index: content/renderer/render_view_impl.cc |
| diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
| index aebac36cdf7eaa62e893adfb7cf06de3cec19854..5f79a7629c65330ba7b013ced35d01afbf08258f 100644 |
| --- a/content/renderer/render_view_impl.cc |
| +++ b/content/renderer/render_view_impl.cc |
| @@ -57,6 +57,7 @@ |
| #include "content/public/common/favicon_url.h" |
| #include "content/public/common/file_chooser_file_info.h" |
| #include "content/public/common/file_chooser_params.h" |
| +#include "content/public/common/page_importance_signals.h" |
| #include "content/public/common/page_state.h" |
| #include "content/public/common/page_zoom.h" |
| #include "content/public/common/ssl_status.h" |
| @@ -151,6 +152,7 @@ |
| #include "third_party/WebKit/public/web/WebNavigationPolicy.h" |
| #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h" |
| #include "third_party/WebKit/public/web/WebNodeList.h" |
| +#include "third_party/WebKit/public/web/WebPageImportanceSignals.h" |
| #include "third_party/WebKit/public/web/WebPageSerializer.h" |
| #include "third_party/WebKit/public/web/WebPlugin.h" |
| #include "third_party/WebKit/public/web/WebPluginAction.h" |
| @@ -3519,6 +3521,22 @@ void RenderViewImpl::draggableRegionsChanged() { |
| DraggableRegionsChanged(webview()->mainFrame())); |
| } |
| +void RenderViewImpl::pageImportanceSignalsChanged() { |
| + if (!webview()) |
|
kinuko
2015/09/24 00:26:22
nit: Could this happen when this is signaled?
kouhei (in TOK)
2015/09/24 01:13:46
Yes. This can happen when the view is closing.
|
| + return; |
| + |
| + blink::WebPageImportanceSignals* web_signals = |
| + webview()->pageImportanceSignals(); |
| + if (!web_signals) |
|
kinuko
2015/09/24 00:26:23
ditto
kouhei (in TOK)
2015/09/24 01:13:46
web_signals is guaranteed to be non-null now. Fixe
|
| + return; |
| + |
| + PageImportanceSignals signals; |
| + signals.had_form_interaction = web_signals->hadFormInteraction(); |
| + |
| + main_render_frame_->Send(new FrameHostMsg_UpdatePageImportanceSignals( |
| + main_render_frame_->GetRoutingID(), signals)); |
| +} |
| + |
| #if defined(OS_ANDROID) |
| WebContentDetectionResult RenderViewImpl::detectContentAround( |
| const WebHitTestResult& touch_hit) { |