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

Side by Side Diff: content/public/browser/render_view_host_observer.cc

Issue 8676032: Move RenderViewHostObserver to content/public/browser/ and put it into the content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add render_view_host.h to DEPS file Created 9 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
« no previous file with comments | « content/public/browser/render_view_host_observer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/renderer_host/render_view_host_observer.h" 5 #include "content/public/browser/render_view_host_observer.h"
6 6
7 #include "content/browser/renderer_host/render_view_host.h" 7 #include "content/browser/renderer_host/render_view_host.h"
8 8
9 namespace content {
10
9 RenderViewHostObserver::RenderViewHostObserver(RenderViewHost* render_view_host) 11 RenderViewHostObserver::RenderViewHostObserver(RenderViewHost* render_view_host)
10 : render_view_host_(render_view_host), 12 : render_view_host_(render_view_host),
11 routing_id_(render_view_host->routing_id()) { 13 routing_id_(render_view_host->routing_id()) {
12 render_view_host_->AddObserver(this); 14 render_view_host_->AddObserver(this);
13 } 15 }
14 16
15 RenderViewHostObserver::~RenderViewHostObserver() { 17 RenderViewHostObserver::~RenderViewHostObserver() {
16 if (render_view_host_) 18 if (render_view_host_)
17 render_view_host_->RemoveObserver(this); 19 render_view_host_->RemoveObserver(this);
18 } 20 }
(...skipping 20 matching lines...) Expand all
39 41
40 return render_view_host_->Send(message); 42 return render_view_host_->Send(message);
41 } 43 }
42 44
43 void RenderViewHostObserver::RenderViewHostDestruction() { 45 void RenderViewHostObserver::RenderViewHostDestruction() {
44 render_view_host_->RemoveObserver(this); 46 render_view_host_->RemoveObserver(this);
45 RenderViewHost* rvh = render_view_host_; 47 RenderViewHost* rvh = render_view_host_;
46 render_view_host_ = NULL; 48 render_view_host_ = NULL;
47 RenderViewHostDestroyed(rvh); 49 RenderViewHostDestroyed(rvh);
48 } 50 }
51
52 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/render_view_host_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698