Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2712773002: Add trace event for detecting main frame in loading metrics. (Closed)
Patch Set: comment Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 render_frame->blink_interface_provider_.get(), 933 render_frame->blink_interface_provider_.get(),
934 render_frame->blink_interface_registry_.get(), opener); 934 render_frame->blink_interface_registry_.get(), opener);
935 render_frame->BindToWebFrame(web_frame); 935 render_frame->BindToWebFrame(web_frame);
936 render_view->webview()->setMainFrame(web_frame); 936 render_view->webview()->setMainFrame(web_frame);
937 render_frame->render_widget_ = RenderWidget::CreateForFrame( 937 render_frame->render_widget_ = RenderWidget::CreateForFrame(
938 widget_routing_id, hidden, screen_info, compositor_deps, web_frame); 938 widget_routing_id, hidden, screen_info, compositor_deps, web_frame);
939 // TODO(avi): This DCHECK is to track cleanup for https://crbug.com/545684 939 // TODO(avi): This DCHECK is to track cleanup for https://crbug.com/545684
940 DCHECK_EQ(render_view->GetWidget(), render_frame->render_widget_) 940 DCHECK_EQ(render_view->GetWidget(), render_frame->render_widget_)
941 << "Main frame is no longer reusing the RenderView as its widget! " 941 << "Main frame is no longer reusing the RenderView as its widget! "
942 << "Does the RenderFrame need to register itself with the RenderWidget?"; 942 << "Does the RenderFrame need to register itself with the RenderWidget?";
943 TRACE_EVENT_INSTANT1("loading", "createMainFrame", TRACE_EVENT_SCOPE_THREAD,
944 "frame", web_frame->frameIdForTracing());
945
943 return render_frame; 946 return render_frame;
944 } 947 }
945 948
946 // static 949 // static
947 void RenderFrameImpl::CreateFrame( 950 void RenderFrameImpl::CreateFrame(
948 int routing_id, 951 int routing_id,
949 int proxy_routing_id, 952 int proxy_routing_id,
950 int opener_routing_id, 953 int opener_routing_id,
951 int parent_routing_id, 954 int parent_routing_id,
952 int previous_sibling_routing_id, 955 int previous_sibling_routing_id,
(...skipping 5916 matching lines...) Expand 10 before | Expand all | Expand 10 after
6869 // event target. Potentially a Pepper plugin will receive the event. 6872 // event target. Potentially a Pepper plugin will receive the event.
6870 // In order to tell whether a plugin gets the last mouse event and which it 6873 // In order to tell whether a plugin gets the last mouse event and which it
6871 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6874 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6872 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6875 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6873 // |pepper_last_mouse_event_target_|. 6876 // |pepper_last_mouse_event_target_|.
6874 pepper_last_mouse_event_target_ = nullptr; 6877 pepper_last_mouse_event_target_ = nullptr;
6875 #endif 6878 #endif
6876 } 6879 }
6877 6880
6878 } // namespace content 6881 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | third_party/WebKit/public/web/WebLocalFrame.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698