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

Unified Diff: content/renderer/load_progress_tracker.h

Issue 180113003: Prepare for per frame did{Start,Stop}Loading calls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | content/renderer/load_progress_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/load_progress_tracker.h
diff --git a/content/renderer/load_progress_tracker.h b/content/renderer/load_progress_tracker.h
index c4ed37eca9d679232fe47c7cbf59358c30179477..72a711ccc5ee77117299a37ff33bd70c5650dde3 100644
--- a/content/renderer/load_progress_tracker.h
+++ b/content/renderer/load_progress_tracker.h
@@ -5,14 +5,11 @@
#ifndef CONTENT_RENDERER_LOAD_PROGRESS_TRACKER_H_
#define CONTENT_RENDERER_LOAD_PROGRESS_TRACKER_H_
+#include "base/containers/hash_tables.h"
#include "base/logging.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
-namespace blink {
-class WebFrame;
-}
-
namespace content {
class RenderViewImpl;
@@ -21,9 +18,10 @@ class LoadProgressTracker {
explicit LoadProgressTracker(RenderViewImpl* render_view);
~LoadProgressTracker();
- void DidStopLoading();
+ void DidStartLoading(int frame_routing_id);
+ void DidStopLoading(int frame_routing_id);
- void DidChangeLoadProgress(blink::WebFrame* frame, double progress);
+ void DidChangeLoadProgress(int frame_routing_id, double progress);
private:
void ResetStates();
@@ -32,9 +30,11 @@ class LoadProgressTracker {
RenderViewImpl* render_view_;
- blink::WebFrame* tracked_frame_;
-
- double progress_;
+ // ProgressMap maps RenderFrame routing ids to a double representing that
+ // frame's completion (from 0 to 1).
+ typedef base::hash_map<int, double> ProgressMap;
+ ProgressMap progresses_;
+ double total_progress_;
base::TimeTicks last_time_progress_sent_;
« no previous file with comments | « no previous file | content/renderer/load_progress_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698