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

Side by Side Diff: content/browser/tab_contents/tab_contents_observer.cc

Issue 6537015: Start moving core pieces of Chrome multi-process code to src\content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
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 "chrome/browser/tab_contents/tab_contents_observer.h" 5 #include "content/browser/tab_contents/tab_contents_observer.h"
6 6
7 #include "chrome/browser/renderer_host/render_view_host.h" 7 #include "chrome/browser/renderer_host/render_view_host.h"
8 #include "chrome/browser/tab_contents/tab_contents.h" 8 #include "content/browser/tab_contents/tab_contents.h"
9 9
10 TabContentsObserver::TabContentsObserver(TabContents* tab_contents) 10 TabContentsObserver::TabContentsObserver(TabContents* tab_contents)
11 : tab_contents_(tab_contents), 11 : tab_contents_(tab_contents),
12 routing_id_(tab_contents->render_view_host()->routing_id()) { 12 routing_id_(tab_contents->render_view_host()->routing_id()) {
13 tab_contents_->AddObserver(this); 13 tab_contents_->AddObserver(this);
14 } 14 }
15 15
16 TabContentsObserver::~TabContentsObserver() { 16 TabContentsObserver::~TabContentsObserver() {
17 if (tab_contents_) 17 if (tab_contents_)
18 tab_contents_->RemoveObserver(this); 18 tab_contents_->RemoveObserver(this);
19 } 19 }
20 20
21 bool TabContentsObserver::OnMessageReceived(const IPC::Message& message) { 21 bool TabContentsObserver::OnMessageReceived(const IPC::Message& message) {
22 return false; 22 return false;
23 } 23 }
24 24
25 bool TabContentsObserver::Send(IPC::Message* message) { 25 bool TabContentsObserver::Send(IPC::Message* message) {
26 if (!tab_contents_->render_view_host()) { 26 if (!tab_contents_->render_view_host()) {
27 delete message; 27 delete message;
28 return false; 28 return false;
29 } 29 }
30 30
31 return tab_contents_->render_view_host()->Send(message); 31 return tab_contents_->render_view_host()->Send(message);
32 } 32 }
OLDNEW
« no previous file with comments | « content/browser/tab_contents/tab_contents_observer.h ('k') | content/browser/tab_contents/tab_contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698