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 3941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3952 TRACE_EVENT_SCOPE_PROCESS); | 3952 TRACE_EVENT_SCOPE_PROCESS); |
3953 } | 3953 } |
3954 | 3954 |
3955 for (auto& observer : render_view_->observers()) | 3955 for (auto& observer : render_view_->observers()) |
3956 observer.DidFinishLoad(frame); | 3956 observer.DidFinishLoad(frame); |
3957 for (auto& observer : observers_) | 3957 for (auto& observer : observers_) |
3958 observer.DidFinishLoad(); | 3958 observer.DidFinishLoad(); |
3959 | 3959 |
3960 WebDataSource* ds = frame->dataSource(); | 3960 WebDataSource* ds = frame->dataSource(); |
3961 Send(new FrameHostMsg_DidFinishLoad(routing_id_, ds->getRequest().url())); | 3961 Send(new FrameHostMsg_DidFinishLoad(routing_id_, ds->getRequest().url())); |
| 3962 |
| 3963 if (RenderThreadImpl::current()) { |
| 3964 RenderThreadImpl::RendererMemoryMetrics memory_metrics; |
| 3965 RenderThreadImpl::current()->GetRendererMemoryMetrics(&memory_metrics); |
| 3966 UMA_HISTOGRAM_MEMORY_MB( |
| 3967 "Memory.Experimental.Renderer.PartitionAlloc.DidFinishLoad", |
| 3968 memory_metrics.partition_alloc_kb / 1024); |
| 3969 UMA_HISTOGRAM_MEMORY_MB( |
| 3970 "Memory.Experimental.Renderer.BlinkGC.DidFinishLoad", |
| 3971 memory_metrics.blink_gc_kb / 1024); |
| 3972 UMA_HISTOGRAM_MEMORY_MB( |
| 3973 "Memory.Experimental.Renderer.Malloc.DidFinishLoad", |
| 3974 memory_metrics.malloc_mb); |
| 3975 UMA_HISTOGRAM_MEMORY_MB( |
| 3976 "Memory.Experimental.Renderer.Discardable.DidFinishLoad", |
| 3977 memory_metrics.discardable_kb / 1024); |
| 3978 UMA_HISTOGRAM_MEMORY_MB( |
| 3979 "Memory.Experimental.Renderer.V8MainThreadIsolate.DidFinishLoad", |
| 3980 memory_metrics.v8_main_thread_isolate_mb); |
| 3981 UMA_HISTOGRAM_MEMORY_MB( |
| 3982 "Memory.Experimental.Renderer.TotalAllocated.DidFinishLoad", |
| 3983 memory_metrics.total_allocated_mb); |
| 3984 UMA_HISTOGRAM_MEMORY_MB( |
| 3985 "Memory.Experimental.Renderer.NonDiscardableTotalAllocated." |
| 3986 "DidFinishLoad", |
| 3987 memory_metrics.non_discardable_total_allocated_mb); |
| 3988 UMA_HISTOGRAM_MEMORY_MB( |
| 3989 "Memory.Experimental.Renderer.TotalAllocatedPerRenderView." |
| 3990 "DidFinishLoad", |
| 3991 memory_metrics.total_allocated_per_render_view_mb); |
| 3992 if (IsMainFrame()) { |
| 3993 UMA_HISTOGRAM_MEMORY_MB( |
| 3994 "Memory.Experimental.Renderer.PartitionAlloc." |
| 3995 "MainFrameDidFinishLoad", |
| 3996 memory_metrics.partition_alloc_kb / 1024); |
| 3997 UMA_HISTOGRAM_MEMORY_MB( |
| 3998 "Memory.Experimental.Renderer.BlinkGC.MainFrameDidFinishLoad", |
| 3999 memory_metrics.blink_gc_kb / 1024); |
| 4000 UMA_HISTOGRAM_MEMORY_MB( |
| 4001 "Memory.Experimental.Renderer.Malloc.MainFrameDidFinishLoad", |
| 4002 memory_metrics.malloc_mb); |
| 4003 UMA_HISTOGRAM_MEMORY_MB( |
| 4004 "Memory.Experimental.Renderer.Discardable.MainFrameDidFinishLoad", |
| 4005 memory_metrics.discardable_kb / 1024); |
| 4006 UMA_HISTOGRAM_MEMORY_MB( |
| 4007 "Memory.Experimental.Renderer.V8MainThreadIsolate." |
| 4008 "MainFrameDidFinishLoad", |
| 4009 memory_metrics.v8_main_thread_isolate_mb); |
| 4010 UMA_HISTOGRAM_MEMORY_MB( |
| 4011 "Memory.Experimental.Renderer.TotalAllocated." |
| 4012 "MainFrameDidFinishLoad", |
| 4013 memory_metrics.total_allocated_mb); |
| 4014 UMA_HISTOGRAM_MEMORY_MB( |
| 4015 "Memory.Experimental.Renderer.NonDiscardableTotalAllocated." |
| 4016 "MainFrameDidFinishLoad", |
| 4017 memory_metrics.non_discardable_total_allocated_mb); |
| 4018 UMA_HISTOGRAM_MEMORY_MB( |
| 4019 "Memory.Experimental.Renderer.TotalAllocatedPerRenderView." |
| 4020 "MainFrameDidFinishLoad", |
| 4021 memory_metrics.total_allocated_per_render_view_mb); |
| 4022 } |
| 4023 } |
3962 } | 4024 } |
3963 | 4025 |
3964 void RenderFrameImpl::didNavigateWithinPage( | 4026 void RenderFrameImpl::didNavigateWithinPage( |
3965 blink::WebLocalFrame* frame, | 4027 blink::WebLocalFrame* frame, |
3966 const blink::WebHistoryItem& item, | 4028 const blink::WebHistoryItem& item, |
3967 blink::WebHistoryCommitType commit_type, | 4029 blink::WebHistoryCommitType commit_type, |
3968 bool content_initiated) { | 4030 bool content_initiated) { |
3969 TRACE_EVENT1("navigation,rail", "RenderFrameImpl::didNavigateWithinPage", | 4031 TRACE_EVENT1("navigation,rail", "RenderFrameImpl::didNavigateWithinPage", |
3970 "id", routing_id_); | 4032 "id", routing_id_); |
3971 DCHECK_EQ(frame_, frame); | 4033 DCHECK_EQ(frame_, frame); |
(...skipping 2829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6801 // event target. Potentially a Pepper plugin will receive the event. | 6863 // event target. Potentially a Pepper plugin will receive the event. |
6802 // In order to tell whether a plugin gets the last mouse event and which it | 6864 // In order to tell whether a plugin gets the last mouse event and which it |
6803 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6865 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6804 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6866 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6805 // |pepper_last_mouse_event_target_|. | 6867 // |pepper_last_mouse_event_target_|. |
6806 pepper_last_mouse_event_target_ = nullptr; | 6868 pepper_last_mouse_event_target_ = nullptr; |
6807 #endif | 6869 #endif |
6808 } | 6870 } |
6809 | 6871 |
6810 } // namespace content | 6872 } // namespace content |
OLD | NEW |