Fix build break
[chromium-blink-merge.git] / content / renderer / load_progress_tracker.h
blobcfcd5a892cf785d8c33d26a6c3f510df4d871e51
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"
12 namespace WebKit {
13 class WebFrame;
16 namespace content {
17 class RenderViewImpl;
19 class LoadProgressTracker {
20 public:
21 explicit LoadProgressTracker(RenderViewImpl* render_view);
22 ~LoadProgressTracker();
24 void DidStopLoading();
26 void DidChangeLoadProgress(WebKit::WebFrame* frame, double progress);
28 private:
29 void ResetStates();
31 void SendChangeLoadProgress();
33 RenderViewImpl* render_view_;
35 WebKit::WebFrame* tracked_frame_;
37 double progress_;
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_