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/bind.h" | 10 #include "base/bind.h" |
| (...skipping 5591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5602 // of loading and we don't want to save stats. | 5602 // of loading and we don't want to save stats. |
| 5603 if (!main_frame->provisionalDataSource()) { | 5603 if (!main_frame->provisionalDataSource()) { |
| 5604 WebDataSource* ds = main_frame->dataSource(); | 5604 WebDataSource* ds = main_frame->dataSource(); |
| 5605 DocumentState* document_state = DocumentState::FromDataSource(ds); | 5605 DocumentState* document_state = DocumentState::FromDataSource(ds); |
| 5606 | 5606 |
| 5607 // TODO(jar): The following code should all be inside a method, probably in | 5607 // TODO(jar): The following code should all be inside a method, probably in |
| 5608 // NavigatorState. | 5608 // NavigatorState. |
| 5609 Time now = Time::Now(); | 5609 Time now = Time::Now(); |
| 5610 if (document_state->first_paint_time().is_null()) { | 5610 if (document_state->first_paint_time().is_null()) { |
| 5611 document_state->set_first_paint_time(now); | 5611 document_state->set_first_paint_time(now); |
| 5612 Send(new ViewHostMsg_DidFirstPaint(routing_id())); | |
|
darin (slow to review)
2012/12/14 22:16:28
did you consider just watching for the first ViewH
James Simonsen
2012/12/15 02:58:57
Yeah, I did. You talked me out of it. :)
Let's se
| |
| 5612 } | 5613 } |
| 5613 if (document_state->first_paint_after_load_time().is_null() && | 5614 if (document_state->first_paint_after_load_time().is_null() && |
| 5614 !document_state->finish_load_time().is_null()) { | 5615 !document_state->finish_load_time().is_null()) { |
| 5615 document_state->set_first_paint_after_load_time(now); | 5616 document_state->set_first_paint_after_load_time(now); |
| 5616 } | 5617 } |
| 5617 } | 5618 } |
| 5618 } | 5619 } |
| 5619 | 5620 |
| 5620 void RenderViewImpl::OnViewContextSwapBuffersPosted() { | 5621 void RenderViewImpl::OnViewContextSwapBuffersPosted() { |
| 5621 RenderWidget::OnSwapBuffersPosted(); | 5622 RenderWidget::OnSwapBuffersPosted(); |
| (...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6485 } | 6486 } |
| 6486 #endif | 6487 #endif |
| 6487 | 6488 |
| 6488 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6489 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
| 6489 TransportDIB::Handle dib_handle) { | 6490 TransportDIB::Handle dib_handle) { |
| 6490 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6491 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6491 RenderProcess::current()->ReleaseTransportDIB(dib); | 6492 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6492 } | 6493 } |
| 6493 | 6494 |
| 6494 } // namespace content | 6495 } // namespace content |
| OLD | NEW |