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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 10965017: Browser Plugin: Implement getProcessId (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed Nits Created 8 years, 3 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
Index: content/browser/browser_plugin/browser_plugin_guest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 374deec1ecc28b5ac3ede27f9ac94a7a8ef00eda..3d7b11127639cb7182afce5217399033887db893 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -129,7 +129,6 @@ void BrowserPluginGuest::UpdateRect(
memcpy(embedder_memory, guest_memory, size);
}
}
- DCHECK(embedder_render_process_host());
BrowserPluginMsg_UpdateRect_Params relay_params;
relay_params.bitmap_rect = params.bitmap_rect;
relay_params.dx = params.dx;
@@ -198,7 +197,7 @@ void BrowserPluginGuest::HandleInputEvent(RenderViewHost* render_view_host,
// embedder doesn't hang.
BrowserPluginHostMsg_HandleInputEvent::WriteReplyParams(
reply_message, false /* handled */, cursor_);
- embedder_render_process_host()->Send(reply_message);
+ SendMessageToEmbedder(reply_message);
return;
}
@@ -251,13 +250,15 @@ void BrowserPluginGuest::DidCommitProvisionalLoadForFrame(
PageTransition transition_type,
RenderViewHost* render_view_host) {
// Inform its embedder of the updated URL.
- DCHECK(embedder_render_process_host());
if (is_main_frame)
- SendMessageToEmbedder(new BrowserPluginMsg_DidNavigate(instance_id(), url));
+ SendMessageToEmbedder(
+ new BrowserPluginMsg_DidNavigate(
+ instance_id(),
+ url,
+ render_view_host->GetProcess()->GetID()));
Charlie Reis 2012/09/21 00:24:06 Interesting that we're piggy-backing on navigation
Fady Samuel 2012/09/21 14:48:46 Each navigation has the potential to be to a new p
}
void BrowserPluginGuest::RenderViewGone(base::TerminationStatus status) {
- DCHECK(embedder_render_process_host());
if (pending_input_event_reply_.get()) {
IPC::Message* reply_message = pending_input_event_reply_.release();
BrowserPluginHostMsg_HandleInputEvent::WriteReplyParams(reply_message,
@@ -274,6 +275,7 @@ void BrowserPluginGuest::RenderViewGone(base::TerminationStatus status) {
}
void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) {
+ DCHECK(embedder_render_process_host());
embedder_render_process_host()->Send(msg);
}
« no previous file with comments | « no previous file | content/common/browser_plugin_messages.h » ('j') | content/renderer/browser_plugin/browser_plugin.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698