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

Unified Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 10868012: Browser Plugin: New Implementation (Browser Side) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master-trial-obrowser
Patch Set: Fixed tests. Also fixed a case where UpdateRect was being sent from bp renderer before NavigateGues… 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
Index: content/renderer/browser_plugin/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index 8ba5421f33aa700fe63e733024d9a5185ed74684..23e7a8b98c9ad1d7510f9cfb7eeffdd03bf7c3d9 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -92,11 +92,12 @@ void BrowserPlugin::SetSrcAttribute(const std::string& src) {
return;
if (!src.empty()) {
BrowserPluginManager::Get()->Send(
- new BrowserPluginHostMsg_NavigateOrCreateGuest(
+ new BrowserPluginHostMsg_NavigateGuest(
render_view_->GetRoutingID(),
instance_id_,
parent_frame_,
- src));
+ src,
+ gfx::Size(width(), height())));
}
src_ = src;
guest_crashed_ = false;
@@ -329,6 +330,10 @@ void BrowserPlugin::updateGeometry(
if (old_width == window_rect.width &&
old_height == window_rect.height)
return;
+ // TODO(fsamuel): Check if this is correct: When src is not set, we shouldn't
+ // send UpdateRect messages to the host.
+ if (src_.empty())
+ return;
const size_t stride = skia::PlatformCanvas::StrideForWidth(window_rect.width);
const size_t size = window_rect.height *
@@ -353,7 +358,6 @@ void BrowserPlugin::updateGeometry(
instance_id_,
params));
resize_pending_ = true;
-
rjkroege 2012/08/22 21:57:38 superfluous?
lazyboy 2012/08/23 00:45:22 Reverted. Done.
if (damage_buffer_) {
RenderProcess::current()->FreeTransportDIB(damage_buffer_);
damage_buffer_ = NULL;

Powered by Google App Engine
This is Rietveld 408576698