Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1345873003: Expose PageImportanceSignals via WebContents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missing null check Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 895431535bd0cd2974629812888521e24045455c..e1e3449a00f9c429f755d42757e2421792b3614b 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -642,6 +642,8 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host,
OnRegisterProtocolHandler)
IPC_MESSAGE_HANDLER(FrameHostMsg_UnregisterProtocolHandler,
OnUnregisterProtocolHandler)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_UpdatePageImportanceSignals,
+ OnUpdatePageImportanceSignals)
IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply)
IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed)
IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend)
@@ -911,6 +913,10 @@ gfx::NativeViewAccessible accessible_parent) {
}
#endif
+const PageImportanceSignals& WebContentsImpl::GetPageImportanceSignals() const {
+ return page_importance_signals_;
+}
+
const base::string16& WebContentsImpl::GetTitle() const {
// Transient entries take precedence. They are used for interstitial pages
// that are shown on top of existing pages.
@@ -3172,6 +3178,11 @@ void WebContentsImpl::OnUnregisterProtocolHandler(const std::string& protocol,
delegate_->UnregisterProtocolHandler(this, protocol, url, user_gesture);
}
+void WebContentsImpl::OnUpdatePageImportanceSignals(
+ const PageImportanceSignals& signals) {
+ page_importance_signals_ = signals;
+}
+
void WebContentsImpl::OnFindReply(int request_id,
int number_of_matches,
const gfx::Rect& selection_rect,

Powered by Google App Engine
This is Rietveld 408576698