OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 3930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3941 TRACE_EVENT_SCOPE_PROCESS); | 3941 TRACE_EVENT_SCOPE_PROCESS); |
3942 } | 3942 } |
3943 | 3943 |
3944 for (auto& observer : render_view_->observers()) | 3944 for (auto& observer : render_view_->observers()) |
3945 observer.DidFinishLoad(frame); | 3945 observer.DidFinishLoad(frame); |
3946 for (auto& observer : observers_) | 3946 for (auto& observer : observers_) |
3947 observer.DidFinishLoad(); | 3947 observer.DidFinishLoad(); |
3948 | 3948 |
3949 WebDataSource* ds = frame->dataSource(); | 3949 WebDataSource* ds = frame->dataSource(); |
3950 Send(new FrameHostMsg_DidFinishLoad(routing_id_, ds->getRequest().url())); | 3950 Send(new FrameHostMsg_DidFinishLoad(routing_id_, ds->getRequest().url())); |
| 3951 |
| 3952 { |
| 3953 RenderThreadImpl::RendererMemoryMetrics memory_metrics; |
| 3954 RenderThreadImpl::current()->GetRendererMemoryMetrics(&memory_metrics); |
| 3955 UMA_HISTOGRAM_MEMORY_MB( |
| 3956 "Memory.Experimental.Renderer.DidFinishLoad.PartitionAllocMB", |
| 3957 memory_metrics.partition_alloc_kb / 1024); |
| 3958 UMA_HISTOGRAM_MEMORY_MB( |
| 3959 "Memory.Experimental.Renderer.DidFinishLoad.BlinkGCMB", |
| 3960 memory_metrics.blink_gc_kb / 1024); |
| 3961 UMA_HISTOGRAM_MEMORY_MB( |
| 3962 "Memory.Experimental.Renderer.DidFinishLoad.MallocMB", |
| 3963 memory_metrics.malloc_mb); |
| 3964 UMA_HISTOGRAM_MEMORY_MB( |
| 3965 "Memory.Experimental.Renderer.DidFinishLoad.DiscardableMB", |
| 3966 memory_metrics.discardable_kb / 1024); |
| 3967 UMA_HISTOGRAM_MEMORY_MB( |
| 3968 "Memory.Experimental.Renderer.DidFinishLoad.V8MainThreadIsolateMB", |
| 3969 memory_metrics.v8_main_thread_isolate_mb); |
| 3970 UMA_HISTOGRAM_MEMORY_MB( |
| 3971 "Memory.Experimental.Renderer.DidFinishLoad.TotalAllocatedMB", |
| 3972 memory_metrics.total_allocated_mb); |
| 3973 UMA_HISTOGRAM_MEMORY_MB( |
| 3974 "Memory.Experimental.Renderer.DidFinishLoad." |
| 3975 "NonDiscardableTotalAllocatedMB", |
| 3976 memory_metrics.non_discardable_total_allocated_mb); |
| 3977 UMA_HISTOGRAM_MEMORY_MB( |
| 3978 "Memory.Experimental.Renderer.DidFinishLoad." |
| 3979 "TotalAllocatedPerRenderViewMB", |
| 3980 memory_metrics.total_allocated_per_render_view_mb); |
| 3981 } |
3951 } | 3982 } |
3952 | 3983 |
3953 void RenderFrameImpl::didNavigateWithinPage( | 3984 void RenderFrameImpl::didNavigateWithinPage( |
3954 blink::WebLocalFrame* frame, | 3985 blink::WebLocalFrame* frame, |
3955 const blink::WebHistoryItem& item, | 3986 const blink::WebHistoryItem& item, |
3956 blink::WebHistoryCommitType commit_type, | 3987 blink::WebHistoryCommitType commit_type, |
3957 bool content_initiated) { | 3988 bool content_initiated) { |
3958 TRACE_EVENT1("navigation,rail", "RenderFrameImpl::didNavigateWithinPage", | 3989 TRACE_EVENT1("navigation,rail", "RenderFrameImpl::didNavigateWithinPage", |
3959 "id", routing_id_); | 3990 "id", routing_id_); |
3960 DCHECK_EQ(frame_, frame); | 3991 DCHECK_EQ(frame_, frame); |
(...skipping 2800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6761 // event target. Potentially a Pepper plugin will receive the event. | 6792 // event target. Potentially a Pepper plugin will receive the event. |
6762 // In order to tell whether a plugin gets the last mouse event and which it | 6793 // In order to tell whether a plugin gets the last mouse event and which it |
6763 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6794 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6764 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6795 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6765 // |pepper_last_mouse_event_target_|. | 6796 // |pepper_last_mouse_event_target_|. |
6766 pepper_last_mouse_event_target_ = nullptr; | 6797 pepper_last_mouse_event_target_ = nullptr; |
6767 #endif | 6798 #endif |
6768 } | 6799 } |
6769 | 6800 |
6770 } // namespace content | 6801 } // namespace content |
OLD | NEW |