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 8fafdaeb59cce21eb0bde46d2e6f87fbeb6b1e2d..fb769b94f04f73939108eb5a177b3b31765b8442 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -1324,6 +1324,10 @@ void WebContentsImpl::SetLastActiveTime(base::TimeTicks last_active_time) { |
last_active_time_ = last_active_time; |
} |
+base::TimeTicks WebContentsImpl::GetLastHiddenTime() const { |
+ return last_hidden_time_; |
+} |
+ |
void WebContentsImpl::WasShown() { |
controller_.SetActive(true); |
@@ -1364,6 +1368,8 @@ void WebContentsImpl::WasHidden() { |
SendPageMessage(new PageMsg_WasHidden(MSG_ROUTING_NONE)); |
} |
+ last_hidden_time_ = base::TimeTicks::Now(); |
+ |
for (auto& observer : observers_) |
observer.WasHidden(); |