Chromium Code Reviews| 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 716801735cdce5efdc43cda24884a5fad9e2872a..857a55256889462ca34f4262d8164607182763f5 100644 |
| --- a/content/browser/browser_plugin/browser_plugin_guest.cc |
| +++ b/content/browser/browser_plugin/browser_plugin_guest.cc |
| @@ -43,7 +43,8 @@ BrowserPluginGuest::BrowserPluginGuest(int instance_id, |
| damage_buffer_scale_factor_(1.0f), |
| pending_update_counter_(0), |
| guest_hang_timeout_( |
| - base::TimeDelta::FromMilliseconds(kGuestHangTimeoutMs)) { |
| + base::TimeDelta::FromMilliseconds(kGuestHangTimeoutMs)), |
| + visible_(true) { |
| DCHECK(web_contents); |
| // |render_view_host| manages the ownership of this BrowserPluginGuestHelper. |
| new BrowserPluginGuestHelper(this, render_view_host); |
| @@ -98,6 +99,14 @@ void BrowserPluginGuest::SetIsAcceptingTouchEvents(bool accept) { |
| new BrowserPluginMsg_ShouldAcceptTouchEvents(instance_id(), accept)); |
| } |
| +void BrowserPluginGuest::SetVisibility(bool embedder_visible, bool visible) { |
| + visible_ = visible; |
| + if (embedder_visible && visible) |
| + web_contents()->WasShown(); |
| + else |
| + web_contents()->WasHidden(); |
|
Charlie Reis
2012/10/05 00:33:18
Just to be clear, does this notify the guest rende
Fady Samuel
2012/10/05 15:22:07
Done.
|
| +} |
| + |
| WebContents* BrowserPluginGuest::GetWebContents() { |
| return web_contents(); |
| } |