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

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

Issue 2053233002: Make sure FrameScheduler is cleared when LocalFrame::detach() finishes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make sure FrameScheduler is cleared when LocalFrame::detach() is done Created 4 years, 6 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 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 1201
1202 RegisterMojoServices(); 1202 RegisterMojoServices();
1203 1203
1204 // We delay calling this until we have the WebFrame so that any observer or 1204 // We delay calling this until we have the WebFrame so that any observer or
1205 // embedder can call GetWebFrame on any RenderFrame. 1205 // embedder can call GetWebFrame on any RenderFrame.
1206 GetContentClient()->renderer()->RenderFrameCreated(this); 1206 GetContentClient()->renderer()->RenderFrameCreated(this);
1207 } 1207 }
1208 1208
1209 void RenderFrameImpl::InitializeBlameContext(RenderFrameImpl* parent_frame) { 1209 void RenderFrameImpl::InitializeBlameContext(RenderFrameImpl* parent_frame) {
1210 DCHECK(!blame_context_); 1210 DCHECK(!blame_context_);
1211 blame_context_ = new FrameBlameContext(this, parent_frame); 1211 blame_context_ = base::WrapUnique(new FrameBlameContext(this, parent_frame));
1212 blame_context_->Initialize(); 1212 blame_context_->Initialize();
1213 } 1213 }
1214 1214
1215 RenderWidget* RenderFrameImpl::GetRenderWidget() { 1215 RenderWidget* RenderFrameImpl::GetRenderWidget() {
1216 RenderFrameImpl* local_root = 1216 RenderFrameImpl* local_root =
1217 RenderFrameImpl::FromWebFrame(frame_->localRoot()); 1217 RenderFrameImpl::FromWebFrame(frame_->localRoot());
1218 return local_root->render_widget_.get(); 1218 return local_root->render_widget_.get();
1219 } 1219 }
1220 1220
1221 #if defined(ENABLE_PLUGINS) 1221 #if defined(ENABLE_PLUGINS)
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
2677 return NULL; 2677 return NULL;
2678 #endif 2678 #endif
2679 } 2679 }
2680 2680
2681 blink::WebCookieJar* RenderFrameImpl::cookieJar() { 2681 blink::WebCookieJar* RenderFrameImpl::cookieJar() {
2682 return &cookie_jar_; 2682 return &cookie_jar_;
2683 } 2683 }
2684 2684
2685 blink::BlameContext* RenderFrameImpl::frameBlameContext() { 2685 blink::BlameContext* RenderFrameImpl::frameBlameContext() {
2686 DCHECK(blame_context_); 2686 DCHECK(blame_context_);
2687 return blame_context_; 2687 return blame_context_.get();
2688 } 2688 }
2689 2689
2690 blink::WebServiceWorkerProvider* 2690 blink::WebServiceWorkerProvider*
2691 RenderFrameImpl::createServiceWorkerProvider() { 2691 RenderFrameImpl::createServiceWorkerProvider() {
2692 // At this point we should have non-null data source. 2692 // At this point we should have non-null data source.
2693 DCHECK(frame_->dataSource()); 2693 DCHECK(frame_->dataSource());
2694 if (!ChildThreadImpl::current()) 2694 if (!ChildThreadImpl::current())
2695 return nullptr; // May be null in some tests. 2695 return nullptr; // May be null in some tests.
2696 ServiceWorkerNetworkProvider* provider = 2696 ServiceWorkerNetworkProvider* provider =
2697 ServiceWorkerNetworkProvider::FromDocumentState( 2697 ServiceWorkerNetworkProvider::FromDocumentState(
(...skipping 3520 matching lines...) Expand 10 before | Expand all | Expand 10 after
6218 // event target. Potentially a Pepper plugin will receive the event. 6218 // event target. Potentially a Pepper plugin will receive the event.
6219 // In order to tell whether a plugin gets the last mouse event and which it 6219 // In order to tell whether a plugin gets the last mouse event and which it
6220 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6220 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6221 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6221 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6222 // |pepper_last_mouse_event_target_|. 6222 // |pepper_last_mouse_event_target_|.
6223 pepper_last_mouse_event_target_ = nullptr; 6223 pepper_last_mouse_event_target_ = nullptr;
6224 #endif 6224 #endif
6225 } 6225 }
6226 6226
6227 } // namespace content 6227 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698