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 4182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4193 Navigator* navigator = frame_tree_.root()->navigator(); | 4193 Navigator* navigator = frame_tree_.root()->navigator(); |
4194 | 4194 |
4195 // An entry may not exist for a stop when loading an initial blank page or | 4195 // An entry may not exist for a stop when loading an initial blank page or |
4196 // if an iframe injected by script into a blank page finishes loading. | 4196 // if an iframe injected by script into a blank page finishes loading. |
4197 if (entry) { | 4197 if (entry) { |
4198 base::TimeDelta elapsed = | 4198 base::TimeDelta elapsed = |
4199 base::TimeTicks::Now() - navigator->GetCurrentLoadStart(); | 4199 base::TimeTicks::Now() - navigator->GetCurrentLoadStart(); |
4200 | 4200 |
4201 details.reset(new LoadNotificationDetails( | 4201 details.reset(new LoadNotificationDetails( |
4202 entry->GetVirtualURL(), | 4202 entry->GetVirtualURL(), |
4203 entry->GetTransitionType(), | |
4204 elapsed, | 4203 elapsed, |
4205 &controller_, | 4204 &controller_, |
4206 controller_.GetCurrentEntryIndex())); | 4205 controller_.GetCurrentEntryIndex())); |
4207 } | 4206 } |
4208 | 4207 |
4209 LoadingStateChanged(true, false, details.get()); | 4208 LoadingStateChanged(true, false, details.get()); |
4210 } | 4209 } |
4211 | 4210 |
4212 void WebContentsImpl::DidChangeLoadProgress() { | 4211 void WebContentsImpl::DidChangeLoadProgress() { |
4213 double load_progress = frame_tree_.load_progress(); | 4212 double load_progress = frame_tree_.load_progress(); |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4909 for (RenderViewHost* render_view_host : render_view_host_set) | 4908 for (RenderViewHost* render_view_host : render_view_host_set) |
4910 render_view_host->OnWebkitPreferencesChanged(); | 4909 render_view_host->OnWebkitPreferencesChanged(); |
4911 } | 4910 } |
4912 | 4911 |
4913 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 4912 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
4914 JavaScriptDialogManager* dialog_manager) { | 4913 JavaScriptDialogManager* dialog_manager) { |
4915 dialog_manager_ = dialog_manager; | 4914 dialog_manager_ = dialog_manager; |
4916 } | 4915 } |
4917 | 4916 |
4918 } // namespace content | 4917 } // namespace content |
OLD | NEW |