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

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

Issue 11066032: Browser Plugin: Update Guest WebContents Visibility on BrowserPlugin Visiblity Change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 years, 2 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/renderer/browser_plugin/browser_plugin.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 acdea505531f3c687f84dc5f68770e90ef04c081..ed0f293678b2d13a4c5398ce6640fec90470115a 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -71,7 +71,8 @@ BrowserPlugin::BrowserPlugin(
resize_pending_(false),
navigate_src_sent_(false),
process_id_(-1),
- persist_storage_(false) {
+ persist_storage_(false),
+ visible_(true) {
BrowserPluginManager::Get()->AddBrowserPlugin(instance_id, this);
bindings_.reset(new BrowserPluginBindings(this));
@@ -685,6 +686,17 @@ void BrowserPlugin::updateFocus(bool focused) {
}
void BrowserPlugin::updateVisibility(bool visible) {
+ if (visible_ == visible)
+ return;
+
+ visible_ = visible;
+ if (!navigate_src_sent_)
+ return;
+
+ BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_SetVisibility(
+ render_view_->GetRoutingID(),
+ instance_id_,
+ visible));
}
bool BrowserPlugin::acceptsInputEvents() {
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698