OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/browser_plugin/old/browser_plugin_host.h" | 5 #include "content/browser/browser_plugin/old/browser_plugin_host.h" |
6 | 6 |
7 #include "content/browser/browser_plugin/old/browser_plugin_host_helper.h" | 7 #include "content/browser/browser_plugin/old/browser_plugin_host_helper.h" |
8 #include "content/browser/renderer_host/render_view_host_impl.h" | 8 #include "content/browser/renderer_host/render_view_host_impl.h" |
9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
10 #include "content/common/browser_plugin_messages.h" | 10 #include "content/common/browser_plugin_messages.h" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 new BrowserPluginHostHelper(this, render_view_host); | 216 new BrowserPluginHostHelper(this, render_view_host); |
217 break; | 217 break; |
218 } | 218 } |
219 case NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED: { | 219 case NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED: { |
220 bool visible = *Details<bool>(details).ptr(); | 220 bool visible = *Details<bool>(details).ptr(); |
221 // If the embedder is hidden we need to hide the guests as well. | 221 // If the embedder is hidden we need to hide the guests as well. |
222 for (GuestMap::const_iterator it = guests_.begin(); | 222 for (GuestMap::const_iterator it = guests_.begin(); |
223 it != guests_.end(); ++it) { | 223 it != guests_.end(); ++it) { |
224 WebContentsImpl* web_contents = it->first; | 224 WebContentsImpl* web_contents = it->first; |
225 if (visible) | 225 if (visible) |
226 web_contents->WasRestored(); | 226 web_contents->WasShown(); |
227 else | 227 else |
228 web_contents->WasHidden(); | 228 web_contents->WasHidden(); |
229 } | 229 } |
230 break; | 230 break; |
231 } | 231 } |
232 default: | 232 default: |
233 NOTREACHED() << "Unexpected notification type: " << type; | 233 NOTREACHED() << "Unexpected notification type: " << type; |
234 } | 234 } |
235 } | 235 } |
236 | 236 |
237 } // namespace content | 237 } // namespace content |
OLD | NEW |