Chromium Code Reviews| 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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 3680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3691 WebDataSource* ds = frame->dataSource(); | 3691 WebDataSource* ds = frame->dataSource(); |
| 3692 DocumentState* document_state = DocumentState::FromDataSource(ds); | 3692 DocumentState* document_state = DocumentState::FromDataSource(ds); |
| 3693 document_state->set_finish_document_load_time(Time::Now()); | 3693 document_state->set_finish_document_load_time(Time::Now()); |
| 3694 | 3694 |
| 3695 Send(new ViewHostMsg_DocumentLoadedInFrame(routing_id_, frame->identifier())); | 3695 Send(new ViewHostMsg_DocumentLoadedInFrame(routing_id_, frame->identifier())); |
| 3696 | 3696 |
| 3697 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 3697 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
| 3698 DidFinishDocumentLoad(frame)); | 3698 DidFinishDocumentLoad(frame)); |
| 3699 | 3699 |
| 3700 // Check whether we have new encoding name. | 3700 // Check whether we have new encoding name. |
| 3701 UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); | 3701 if (frame->view()) |
|
dcheng
2014/02/07 16:53:37
Might be good to add a comment on why you need to
| |
| 3702 UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); | |
| 3702 } | 3703 } |
| 3703 | 3704 |
| 3704 void RenderViewImpl::didHandleOnloadEvents(WebFrame* frame) { | 3705 void RenderViewImpl::didHandleOnloadEvents(WebFrame* frame) { |
| 3705 if (webview()->mainFrame() == frame) { | 3706 if (webview()->mainFrame() == frame) { |
| 3706 Send(new ViewHostMsg_DocumentOnLoadCompletedInMainFrame(routing_id_, | 3707 Send(new ViewHostMsg_DocumentOnLoadCompletedInMainFrame(routing_id_, |
| 3707 page_id_)); | 3708 page_id_)); |
| 3708 } | 3709 } |
| 3709 } | 3710 } |
| 3710 | 3711 |
| 3711 void RenderViewImpl::didFailLoad(WebFrame* frame, const WebURLError& error) { | 3712 void RenderViewImpl::didFailLoad(WebFrame* frame, const WebURLError& error) { |
| (...skipping 2529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6241 for (size_t i = 0; i < icon_urls.size(); i++) { | 6242 for (size_t i = 0; i < icon_urls.size(); i++) { |
| 6242 WebURL url = icon_urls[i].iconURL(); | 6243 WebURL url = icon_urls[i].iconURL(); |
| 6243 if (!url.isEmpty()) | 6244 if (!url.isEmpty()) |
| 6244 urls.push_back(FaviconURL(url, | 6245 urls.push_back(FaviconURL(url, |
| 6245 ToFaviconType(icon_urls[i].iconType()))); | 6246 ToFaviconType(icon_urls[i].iconType()))); |
| 6246 } | 6247 } |
| 6247 SendUpdateFaviconURL(urls); | 6248 SendUpdateFaviconURL(urls); |
| 6248 } | 6249 } |
| 6249 | 6250 |
| 6250 } // namespace content | 6251 } // namespace content |
| OLD | NEW |