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

Unified Diff: chrome/browser/data_use_measurement/chrome_data_use_ascriber.h

Issue 2572823002: Propogate the tab foreground, background change events to data use (Closed)
Patch Set: Fix trybot failure Created 4 years 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
« no previous file with comments | « no previous file | chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/data_use_measurement/chrome_data_use_ascriber.h
diff --git a/chrome/browser/data_use_measurement/chrome_data_use_ascriber.h b/chrome/browser/data_use_measurement/chrome_data_use_ascriber.h
index c50efd730825d1ba5e67cb09119dfe4d8306c54f..a05d8a8b57a2dec762ce3b0f4e5cadc14d83c61e 100644
--- a/chrome/browser/data_use_measurement/chrome_data_use_ascriber.h
+++ b/chrome/browser/data_use_measurement/chrome_data_use_ascriber.h
@@ -91,6 +91,16 @@ class ChromeDataUseAscriber : public DataUseAscriber {
bool is_same_page_navigation,
void* navigation_handle);
+ // Called every time the WebContents changes visibility.
+ void WasShownOrHidden(int main_render_process_id,
+ int main_render_frame_id,
+ bool visible);
+
+ // Called whenever one of the render frames of a WebContents is swapped.
+ void RenderFrameHostChanged(int old_render_process_id,
+ int old_render_frame_id,
+ int new_render_process_id,
+ int new_render_frame_id);
private:
friend class ChromeDataUseAscriberTest;
@@ -156,6 +166,9 @@ class ChromeDataUseAscriber : public DataUseAscriber {
GlobalRequestIDHash>
pending_navigation_data_use_map_;
+ // Contains the mainframe IDs that are currently visible.
+ base::hash_set<RenderFrameHostID> visible_main_render_frames_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeDataUseAscriber);
};
« no previous file with comments | « no previous file | chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698