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 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1755 void WebContentsImpl::ForwardCompositorProto( | 1755 void WebContentsImpl::ForwardCompositorProto( |
1756 RenderWidgetHostImpl* render_widget_host, | 1756 RenderWidgetHostImpl* render_widget_host, |
1757 const std::vector<uint8_t>& proto) { | 1757 const std::vector<uint8_t>& proto) { |
1758 if (render_widget_host != GetRenderViewHost()->GetWidget()) | 1758 if (render_widget_host != GetRenderViewHost()->GetWidget()) |
1759 return; | 1759 return; |
1760 | 1760 |
1761 if (delegate_) | 1761 if (delegate_) |
1762 delegate_->ForwardCompositorProto(proto); | 1762 delegate_->ForwardCompositorProto(proto); |
1763 } | 1763 } |
1764 | 1764 |
| 1765 void WebContentsImpl::ForwardVisibilityChange(bool visible) { |
| 1766 if (visible) |
| 1767 WasShown(); |
| 1768 else |
| 1769 WasHidden(); |
| 1770 } |
| 1771 |
1765 void WebContentsImpl::CreateNewWindow( | 1772 void WebContentsImpl::CreateNewWindow( |
1766 SiteInstance* source_site_instance, | 1773 SiteInstance* source_site_instance, |
1767 int32_t route_id, | 1774 int32_t route_id, |
1768 int32_t main_frame_route_id, | 1775 int32_t main_frame_route_id, |
1769 int32_t main_frame_widget_route_id, | 1776 int32_t main_frame_widget_route_id, |
1770 const ViewHostMsg_CreateWindow_Params& params, | 1777 const ViewHostMsg_CreateWindow_Params& params, |
1771 SessionStorageNamespace* session_storage_namespace) { | 1778 SessionStorageNamespace* session_storage_namespace) { |
1772 // We usually create the new window in the same BrowsingInstance (group of | 1779 // We usually create the new window in the same BrowsingInstance (group of |
1773 // script-related windows), by passing in the current SiteInstance. However, | 1780 // script-related windows), by passing in the current SiteInstance. However, |
1774 // if the opener is being suppressed (in a non-guest), we create a new | 1781 // if the opener is being suppressed (in a non-guest), we create a new |
(...skipping 2964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4739 const WebContentsObserver::MediaPlayerId& id) { | 4746 const WebContentsObserver::MediaPlayerId& id) { |
4740 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); | 4747 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); |
4741 } | 4748 } |
4742 | 4749 |
4743 void WebContentsImpl::MediaStoppedPlaying( | 4750 void WebContentsImpl::MediaStoppedPlaying( |
4744 const WebContentsObserver::MediaPlayerId& id) { | 4751 const WebContentsObserver::MediaPlayerId& id) { |
4745 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); | 4752 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); |
4746 } | 4753 } |
4747 | 4754 |
4748 } // namespace content | 4755 } // namespace content |
OLD | NEW |