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 3935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3946 TRACE_EVENT_SCOPE_PROCESS); | 3946 TRACE_EVENT_SCOPE_PROCESS); |
3947 } | 3947 } |
3948 | 3948 |
3949 for (auto& observer : render_view_->observers()) | 3949 for (auto& observer : render_view_->observers()) |
3950 observer.DidFinishLoad(frame); | 3950 observer.DidFinishLoad(frame); |
3951 for (auto& observer : observers_) | 3951 for (auto& observer : observers_) |
3952 observer.DidFinishLoad(); | 3952 observer.DidFinishLoad(); |
3953 | 3953 |
3954 WebDataSource* ds = frame->dataSource(); | 3954 WebDataSource* ds = frame->dataSource(); |
3955 Send(new FrameHostMsg_DidFinishLoad(routing_id_, ds->getRequest().url())); | 3955 Send(new FrameHostMsg_DidFinishLoad(routing_id_, ds->getRequest().url())); |
| 3956 |
| 3957 { |
| 3958 RenderThreadImpl::RendererMemoryMetrics memory_metrics; |
| 3959 RenderThreadImpl::current()->GetRendererMemoryMetrics(&memory_metrics); |
| 3960 UMA_HISTOGRAM_MEMORY_MB( |
| 3961 "Memory.Experimental.Renderer.PartitionAllocMB_DidFinishLoad", |
| 3962 memory_metrics.partition_alloc_kb / 1024); |
| 3963 UMA_HISTOGRAM_MEMORY_MB( |
| 3964 "Memory.Experimental.Renderer.BlinkGCMB_DidFinishLoad", |
| 3965 memory_metrics.blink_gc_kb / 1024); |
| 3966 UMA_HISTOGRAM_MEMORY_MB( |
| 3967 "Memory.Experimental.Renderer.MallocMB_DidFinishLoad", |
| 3968 memory_metrics.malloc_mb); |
| 3969 UMA_HISTOGRAM_MEMORY_MB( |
| 3970 "Memory.Experimental.Renderer.DiscardableMB_DidFinishLoad", |
| 3971 memory_metrics.discardable_kb / 1024); |
| 3972 UMA_HISTOGRAM_MEMORY_MB( |
| 3973 "Memory.Experimental.Renderer.V8MainThreadIsolateMB_DidFinishLoad", |
| 3974 memory_metrics.v8_main_thread_isolate_mb); |
| 3975 UMA_HISTOGRAM_MEMORY_MB( |
| 3976 "Memory.Experimental.Renderer.TotalAllocatedMB_DidFinishLoad", |
| 3977 memory_metrics.total_allocated_mb); |
| 3978 UMA_HISTOGRAM_MEMORY_MB( |
| 3979 "Memory.Experimental.Renderer.NonDiscardableTotalAllocatedMB_" |
| 3980 "DidFinishLoad", |
| 3981 memory_metrics.non_discardable_total_allocated_mb); |
| 3982 UMA_HISTOGRAM_MEMORY_MB( |
| 3983 "Memory.Experimental.Renderer.TotalAllocatedPerRenderViewMB_" |
| 3984 "DidFinishLoad", |
| 3985 memory_metrics.total_allocated_per_render_view_mb); |
| 3986 if (IsMainFrame()) { |
| 3987 UMA_HISTOGRAM_MEMORY_MB( |
| 3988 "Memory.Experimental.Renderer.PartitionAllocMB_" |
| 3989 "MainFrameDidFinishLoad", |
| 3990 memory_metrics.partition_alloc_kb / 1024); |
| 3991 UMA_HISTOGRAM_MEMORY_MB( |
| 3992 "Memory.Experimental.Renderer.BlinkGCMB_MainFrameDidFinishLoad", |
| 3993 memory_metrics.blink_gc_kb / 1024); |
| 3994 UMA_HISTOGRAM_MEMORY_MB( |
| 3995 "Memory.Experimental.Renderer.MallocMB_MainFrameDidFinishLoad", |
| 3996 memory_metrics.malloc_mb); |
| 3997 UMA_HISTOGRAM_MEMORY_MB( |
| 3998 "Memory.Experimental.Renderer.DiscardableMB_MainFrameDidFinishLoad", |
| 3999 memory_metrics.discardable_kb / 1024); |
| 4000 UMA_HISTOGRAM_MEMORY_MB( |
| 4001 "Memory.Experimental.Renderer.V8MainThreadIsolateMB_" |
| 4002 "MainFrameDidFinishLoad", |
| 4003 memory_metrics.v8_main_thread_isolate_mb); |
| 4004 UMA_HISTOGRAM_MEMORY_MB( |
| 4005 "Memory.Experimental.Renderer.TotalAllocatedMB_" |
| 4006 "MainFrameDidFinishLoad", |
| 4007 memory_metrics.total_allocated_mb); |
| 4008 UMA_HISTOGRAM_MEMORY_MB( |
| 4009 "Memory.Experimental.Renderer.NonDiscardableTotalAllocatedMB_" |
| 4010 "MainFrameDidFinishLoad", |
| 4011 memory_metrics.non_discardable_total_allocated_mb); |
| 4012 UMA_HISTOGRAM_MEMORY_MB( |
| 4013 "Memory.Experimental.Renderer.TotalAllocatedPerRenderViewMB_" |
| 4014 "MainFrameDidFinishLoad", |
| 4015 memory_metrics.total_allocated_per_render_view_mb); |
| 4016 } |
| 4017 } |
3956 } | 4018 } |
3957 | 4019 |
3958 void RenderFrameImpl::didNavigateWithinPage( | 4020 void RenderFrameImpl::didNavigateWithinPage( |
3959 blink::WebLocalFrame* frame, | 4021 blink::WebLocalFrame* frame, |
3960 const blink::WebHistoryItem& item, | 4022 const blink::WebHistoryItem& item, |
3961 blink::WebHistoryCommitType commit_type, | 4023 blink::WebHistoryCommitType commit_type, |
3962 bool content_initiated) { | 4024 bool content_initiated) { |
3963 TRACE_EVENT1("navigation,rail", "RenderFrameImpl::didNavigateWithinPage", | 4025 TRACE_EVENT1("navigation,rail", "RenderFrameImpl::didNavigateWithinPage", |
3964 "id", routing_id_); | 4026 "id", routing_id_); |
3965 DCHECK_EQ(frame_, frame); | 4027 DCHECK_EQ(frame_, frame); |
(...skipping 2810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6776 // event target. Potentially a Pepper plugin will receive the event. | 6838 // event target. Potentially a Pepper plugin will receive the event. |
6777 // In order to tell whether a plugin gets the last mouse event and which it | 6839 // In order to tell whether a plugin gets the last mouse event and which it |
6778 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6840 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6779 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6841 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6780 // |pepper_last_mouse_event_target_|. | 6842 // |pepper_last_mouse_event_target_|. |
6781 pepper_last_mouse_event_target_ = nullptr; | 6843 pepper_last_mouse_event_target_ = nullptr; |
6782 #endif | 6844 #endif |
6783 } | 6845 } |
6784 | 6846 |
6785 } // namespace content | 6847 } // namespace content |
OLD | NEW |