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

Side by Side Diff: content/renderer/load_progress_tracker.cc

Issue 63253002: Rename WebKit namespace to blink (part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/load_progress_tracker.h ('k') | content/renderer/media/active_loader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/load_progress_tracker.h" 5 #include "content/renderer/load_progress_tracker.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "content/common/view_messages.h" 9 #include "content/common/view_messages.h"
10 #include "content/renderer/render_view_impl.h" 10 #include "content/renderer/render_view_impl.h"
(...skipping 20 matching lines...) Expand all
31 return; 31 return;
32 32
33 // Load stopped while we were still tracking load. Make sure we notify the 33 // Load stopped while we were still tracking load. Make sure we notify the
34 // browser that load is complete. 34 // browser that load is complete.
35 progress_ = 1.0; 35 progress_ = 1.0;
36 SendChangeLoadProgress(); 36 SendChangeLoadProgress();
37 // Then we clean-up our states. 37 // Then we clean-up our states.
38 ResetStates(); 38 ResetStates();
39 } 39 }
40 40
41 void LoadProgressTracker::DidChangeLoadProgress(WebKit::WebFrame* frame, 41 void LoadProgressTracker::DidChangeLoadProgress(blink::WebFrame* frame,
42 double progress) { 42 double progress) {
43 if (tracked_frame_ && frame != tracked_frame_) 43 if (tracked_frame_ && frame != tracked_frame_)
44 return; 44 return;
45 45
46 if (!tracked_frame_) 46 if (!tracked_frame_)
47 tracked_frame_ = frame; 47 tracked_frame_ = frame;
48 48
49 progress_ = progress; 49 progress_ = progress;
50 50
51 // We send the progress change to the browser immediately for the first and 51 // We send the progress change to the browser immediately for the first and
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 void LoadProgressTracker::ResetStates() { 85 void LoadProgressTracker::ResetStates() {
86 tracked_frame_ = NULL; 86 tracked_frame_ = NULL;
87 progress_ = 0.0; 87 progress_ = 0.0;
88 weak_factory_.InvalidateWeakPtrs(); 88 weak_factory_.InvalidateWeakPtrs();
89 last_time_progress_sent_ = base::TimeTicks(); 89 last_time_progress_sent_ = base::TimeTicks();
90 } 90 }
91 91
92 } // namespace content 92 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/load_progress_tracker.h ('k') | content/renderer/media/active_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698