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

Side by Side Diff: chrome/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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/tab_contents/tab_contents_observer.h"
6
7 #include "chrome/browser/renderer_host/render_view_host.h"
8 #include "chrome/browser/tab_contents/tab_contents.h"
9
10 TabContentsObserver::TabContentsObserver(TabContents* tab_contents)
11 : tab_contents_(tab_contents),
12 routing_id_(tab_contents->render_view_host()->routing_id()) {
13 tab_contents_->AddObserver(this);
14 }
15
16 TabContentsObserver::~TabContentsObserver() {
17 if (tab_contents_)
18 tab_contents_->RemoveObserver(this);
19 }
20
21 bool TabContentsObserver::OnMessageReceived(const IPC::Message& message) {
22 return false;
23 }
24
25 bool TabContentsObserver::Send(IPC::Message* message) {
26 if (!tab_contents_->render_view_host()) {
27 delete message;
28 return false;
29 }
30
31 return tab_contents_->render_view_host()->Send(message);
32 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_observer.h ('k') | chrome/browser/tab_contents/tab_contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698