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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1772 void WebContentsImpl::ForwardCompositorProto( | 1772 void WebContentsImpl::ForwardCompositorProto( |
1773 RenderWidgetHostImpl* render_widget_host, | 1773 RenderWidgetHostImpl* render_widget_host, |
1774 const std::vector<uint8_t>& proto) { | 1774 const std::vector<uint8_t>& proto) { |
1775 if (render_widget_host != GetRenderViewHost()->GetWidget()) | 1775 if (render_widget_host != GetRenderViewHost()->GetWidget()) |
1776 return; | 1776 return; |
1777 | 1777 |
1778 if (delegate_) | 1778 if (delegate_) |
1779 delegate_->ForwardCompositorProto(proto); | 1779 delegate_->ForwardCompositorProto(proto); |
1780 } | 1780 } |
1781 | 1781 |
| 1782 void WebContentsImpl::OnRenderFrameProxyVisibilityChanged(bool visible) { |
| 1783 if (visible) |
| 1784 WasShown(); |
| 1785 else |
| 1786 WasHidden(); |
| 1787 } |
| 1788 |
1782 void WebContentsImpl::CreateNewWindow( | 1789 void WebContentsImpl::CreateNewWindow( |
1783 SiteInstance* source_site_instance, | 1790 SiteInstance* source_site_instance, |
1784 int32_t route_id, | 1791 int32_t route_id, |
1785 int32_t main_frame_route_id, | 1792 int32_t main_frame_route_id, |
1786 int32_t main_frame_widget_route_id, | 1793 int32_t main_frame_widget_route_id, |
1787 const ViewHostMsg_CreateWindow_Params& params, | 1794 const ViewHostMsg_CreateWindow_Params& params, |
1788 SessionStorageNamespace* session_storage_namespace) { | 1795 SessionStorageNamespace* session_storage_namespace) { |
1789 // We usually create the new window in the same BrowsingInstance (group of | 1796 // We usually create the new window in the same BrowsingInstance (group of |
1790 // script-related windows), by passing in the current SiteInstance. However, | 1797 // script-related windows), by passing in the current SiteInstance. However, |
1791 // if the opener is being suppressed (in a non-guest), we create a new | 1798 // if the opener is being suppressed (in a non-guest), we create a new |
(...skipping 2960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4752 const WebContentsObserver::MediaPlayerId& id) { | 4759 const WebContentsObserver::MediaPlayerId& id) { |
4753 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); | 4760 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); |
4754 } | 4761 } |
4755 | 4762 |
4756 void WebContentsImpl::MediaStoppedPlaying( | 4763 void WebContentsImpl::MediaStoppedPlaying( |
4757 const WebContentsObserver::MediaPlayerId& id) { | 4764 const WebContentsObserver::MediaPlayerId& id) { |
4758 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); | 4765 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); |
4759 } | 4766 } |
4760 | 4767 |
4761 } // namespace content | 4768 } // namespace content |
OLD | NEW |