1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_LOAD_PROGRESS_TRACKER_H_
6 #define CONTENT_RENDERER_LOAD_PROGRESS_TRACKER_H_
8 #include "base/logging.h"
9 #include "base/memory/weak_ptr.h"
10 #include "base/time.h"
19 class LoadProgressTracker
{
21 explicit LoadProgressTracker(RenderViewImpl
* render_view
);
22 ~LoadProgressTracker();
24 void DidStopLoading();
26 void DidChangeLoadProgress(WebKit::WebFrame
* frame
, double progress
);
31 void SendChangeLoadProgress();
33 RenderViewImpl
* render_view_
;
35 WebKit::WebFrame
* tracked_frame_
;
39 base::TimeTicks last_time_progress_sent_
;
41 base::WeakPtrFactory
<LoadProgressTracker
> weak_factory_
;
43 DISALLOW_COPY_AND_ASSIGN(LoadProgressTracker
);
46 } // namespace content
48 #endif // CONTENT_RENDERER_LOAD_PROGRESS_TRACKER_H_