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

Side by Side Diff: content/public/renderer/render_frame_observer.cc

Issue 107183002: Move more of the plugin code in the renderer to use RenderFrame instead of RenderView. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 7 years 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 | Annotate | Revision Log
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/public/renderer/render_frame_observer.h" 5 #include "content/public/renderer/render_frame_observer.h"
6 6
7 #include "content/renderer/render_frame_impl.h" 7 #include "content/renderer/render_frame_impl.h"
8 8
9 using blink::WebFrame; 9 using blink::WebFrame;
10 10
11 namespace content { 11 namespace content {
12 12
13 RenderFrameObserver::RenderFrameObserver(RenderFrame* render_frame) 13 RenderFrameObserver::RenderFrameObserver(RenderFrame* render_frame)
14 : render_frame_(render_frame), 14 : render_frame_(render_frame),
15 routing_id_(MSG_ROUTING_NONE) { 15 routing_id_(MSG_ROUTING_NONE) {
16 // |render_frame| can be NULL on unit testing. 16 // |render_frame| can be NULL on unit testing.
17 if (render_frame) { 17 if (render_frame) {
18 RenderFrameImpl* impl = static_cast<RenderFrameImpl*>(render_frame); 18 RenderFrameImpl* impl = static_cast<RenderFrameImpl*>(render_frame);
19 routing_id_ = impl->routing_id(); 19 routing_id_ = impl->GetRoutingID();
20 impl->AddObserver(this); 20 impl->AddObserver(this);
21 } 21 }
22 } 22 }
23 23
24 RenderFrameObserver::~RenderFrameObserver() { 24 RenderFrameObserver::~RenderFrameObserver() {
25 if (render_frame_) { 25 if (render_frame_) {
26 RenderFrameImpl* impl = static_cast<RenderFrameImpl*>(render_frame_); 26 RenderFrameImpl* impl = static_cast<RenderFrameImpl*>(render_frame_);
27 impl->RemoveObserver(this); 27 impl->RemoveObserver(this);
28 } 28 }
29 } 29 }
(...skipping 16 matching lines...) Expand all
46 46
47 RenderFrame* RenderFrameObserver::render_frame() const { 47 RenderFrame* RenderFrameObserver::render_frame() const {
48 return render_frame_; 48 return render_frame_;
49 } 49 }
50 50
51 void RenderFrameObserver::RenderFrameGone() { 51 void RenderFrameObserver::RenderFrameGone() {
52 render_frame_ = NULL; 52 render_frame_ = NULL;
53 } 53 }
54 54
55 } // namespace content 55 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/render_frame.h ('k') | content/renderer/npapi/webplugin_delegate_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698