OLD | NEW |
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/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <utility> | 10 #include <utility> |
(...skipping 4200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4211 Navigator* navigator = frame_tree_.root()->navigator(); | 4211 Navigator* navigator = frame_tree_.root()->navigator(); |
4212 | 4212 |
4213 // An entry may not exist for a stop when loading an initial blank page or | 4213 // An entry may not exist for a stop when loading an initial blank page or |
4214 // if an iframe injected by script into a blank page finishes loading. | 4214 // if an iframe injected by script into a blank page finishes loading. |
4215 if (entry) { | 4215 if (entry) { |
4216 base::TimeDelta elapsed = | 4216 base::TimeDelta elapsed = |
4217 base::TimeTicks::Now() - navigator->GetCurrentLoadStart(); | 4217 base::TimeTicks::Now() - navigator->GetCurrentLoadStart(); |
4218 | 4218 |
4219 details.reset(new LoadNotificationDetails( | 4219 details.reset(new LoadNotificationDetails( |
4220 entry->GetVirtualURL(), | 4220 entry->GetVirtualURL(), |
4221 entry->GetTransitionType(), | |
4222 elapsed, | 4221 elapsed, |
4223 &controller_, | 4222 &controller_, |
4224 controller_.GetCurrentEntryIndex())); | 4223 controller_.GetCurrentEntryIndex())); |
4225 } | 4224 } |
4226 | 4225 |
4227 LoadingStateChanged(true, false, details.get()); | 4226 LoadingStateChanged(true, false, details.get()); |
4228 } | 4227 } |
4229 | 4228 |
4230 void WebContentsImpl::DidChangeLoadProgress() { | 4229 void WebContentsImpl::DidChangeLoadProgress() { |
4231 double load_progress = frame_tree_.load_progress(); | 4230 double load_progress = frame_tree_.load_progress(); |
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4958 for (RenderViewHost* render_view_host : render_view_host_set) | 4957 for (RenderViewHost* render_view_host : render_view_host_set) |
4959 render_view_host->OnWebkitPreferencesChanged(); | 4958 render_view_host->OnWebkitPreferencesChanged(); |
4960 } | 4959 } |
4961 | 4960 |
4962 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 4961 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
4963 JavaScriptDialogManager* dialog_manager) { | 4962 JavaScriptDialogManager* dialog_manager) { |
4964 dialog_manager_ = dialog_manager; | 4963 dialog_manager_ = dialog_manager; |
4965 } | 4964 } |
4966 | 4965 |
4967 } // namespace content | 4966 } // namespace content |
OLD | NEW |