| 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 5608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5619 // of loading and we don't want to save stats. | 5619 // of loading and we don't want to save stats. |
| 5620 if (!main_frame->provisionalDataSource()) { | 5620 if (!main_frame->provisionalDataSource()) { |
| 5621 WebDataSource* ds = main_frame->dataSource(); | 5621 WebDataSource* ds = main_frame->dataSource(); |
| 5622 DocumentState* document_state = DocumentState::FromDataSource(ds); | 5622 DocumentState* document_state = DocumentState::FromDataSource(ds); |
| 5623 | 5623 |
| 5624 // TODO(jar): The following code should all be inside a method, probably in | 5624 // TODO(jar): The following code should all be inside a method, probably in |
| 5625 // NavigatorState. | 5625 // NavigatorState. |
| 5626 Time now = Time::Now(); | 5626 Time now = Time::Now(); |
| 5627 if (document_state->first_paint_time().is_null()) { | 5627 if (document_state->first_paint_time().is_null()) { |
| 5628 document_state->set_first_paint_time(now); | 5628 document_state->set_first_paint_time(now); |
| 5629 Send(new ViewHostMsg_DidFirstPaint(routing_id())); |
| 5629 } | 5630 } |
| 5630 if (document_state->first_paint_after_load_time().is_null() && | 5631 if (document_state->first_paint_after_load_time().is_null() && |
| 5631 !document_state->finish_load_time().is_null()) { | 5632 !document_state->finish_load_time().is_null()) { |
| 5632 document_state->set_first_paint_after_load_time(now); | 5633 document_state->set_first_paint_after_load_time(now); |
| 5633 } | 5634 } |
| 5634 } | 5635 } |
| 5635 } | 5636 } |
| 5636 | 5637 |
| 5637 void RenderViewImpl::OnViewContextSwapBuffersPosted() { | 5638 void RenderViewImpl::OnViewContextSwapBuffersPosted() { |
| 5638 RenderWidget::OnSwapBuffersPosted(); | 5639 RenderWidget::OnSwapBuffersPosted(); |
| (...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6502 } | 6503 } |
| 6503 #endif | 6504 #endif |
| 6504 | 6505 |
| 6505 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6506 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
| 6506 TransportDIB::Handle dib_handle) { | 6507 TransportDIB::Handle dib_handle) { |
| 6507 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6508 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6508 RenderProcess::current()->ReleaseTransportDIB(dib); | 6509 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6509 } | 6510 } |
| 6510 | 6511 |
| 6511 } // namespace content | 6512 } // namespace content |
| OLD | NEW |