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

Unified Diff: content/public/browser/web_contents_observer.cc

Issue 10830337: Add IPC::Sender and GetRoutingID() to WebContents for convenience and safety. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/web_contents.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/web_contents_observer.cc
diff --git a/content/public/browser/web_contents_observer.cc b/content/public/browser/web_contents_observer.cc
index 07b4592599a7590b7ae99830a4535b16954429b9..14790293040c0f89c1893579653e5b9d1ca9ac39 100644
--- a/content/public/browser/web_contents_observer.cc
+++ b/content/public/browser/web_contents_observer.cc
@@ -42,19 +42,19 @@ bool WebContentsObserver::OnMessageReceived(const IPC::Message& message) {
}
bool WebContentsObserver::Send(IPC::Message* message) {
- if (!web_contents_ || !web_contents_->GetRenderViewHost()) {
+ if (!web_contents_) {
delete message;
return false;
}
- return web_contents_->GetRenderViewHost()->Send(message);
+ return web_contents_->Send(message);
}
int WebContentsObserver::routing_id() const {
- if (!web_contents_ || !web_contents_->GetRenderViewHost())
+ if (!web_contents_)
return MSG_ROUTING_NONE;
- return web_contents_->GetRenderViewHost()->GetRoutingID();
+ return web_contents_->GetRoutingID();
}
void WebContentsObserver::WebContentsImplDestroyed() {
« no previous file with comments | « content/public/browser/web_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698