| 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/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 | 817 |
| 818 bool notify_webkit_of_modal_loop = true; // default value | 818 bool notify_webkit_of_modal_loop = true; // default value |
| 819 std::swap(notify_webkit_of_modal_loop, notify_webkit_of_modal_loop_); | 819 std::swap(notify_webkit_of_modal_loop, notify_webkit_of_modal_loop_); |
| 820 | 820 |
| 821 #if defined(ENABLE_PLUGINS) | 821 #if defined(ENABLE_PLUGINS) |
| 822 int render_view_id = MSG_ROUTING_NONE; | 822 int render_view_id = MSG_ROUTING_NONE; |
| 823 #endif | 823 #endif |
| 824 | 824 |
| 825 if (pumping_events) { | 825 if (pumping_events) { |
| 826 if (suspend_webkit_shared_timer) | 826 if (suspend_webkit_shared_timer) |
| 827 blink_platform_impl_->SuspendSharedTimer(); | 827 renderer_scheduler_->SuspendTimerQueue(); |
| 828 | 828 |
| 829 if (notify_webkit_of_modal_loop) | 829 if (notify_webkit_of_modal_loop) |
| 830 WebView::willEnterModalLoop(); | 830 WebView::willEnterModalLoop(); |
| 831 #if defined(ENABLE_PLUGINS) | 831 #if defined(ENABLE_PLUGINS) |
| 832 RenderViewImpl* render_view = | 832 RenderViewImpl* render_view = |
| 833 RenderViewImpl::FromRoutingID(msg->routing_id()); | 833 RenderViewImpl::FromRoutingID(msg->routing_id()); |
| 834 if (render_view) { | 834 if (render_view) { |
| 835 render_view_id = msg->routing_id(); | 835 render_view_id = msg->routing_id(); |
| 836 PluginChannelHost::Broadcast( | 836 PluginChannelHost::Broadcast( |
| 837 new PluginMsg_SignalModalDialogEvent(render_view_id)); | 837 new PluginMsg_SignalModalDialogEvent(render_view_id)); |
| 838 } | 838 } |
| 839 #endif | 839 #endif |
| 840 } | 840 } |
| 841 | 841 |
| 842 bool rv = ChildThreadImpl::Send(msg); | 842 bool rv = ChildThreadImpl::Send(msg); |
| 843 | 843 |
| 844 if (pumping_events) { | 844 if (pumping_events) { |
| 845 #if defined(ENABLE_PLUGINS) | 845 #if defined(ENABLE_PLUGINS) |
| 846 if (render_view_id != MSG_ROUTING_NONE) { | 846 if (render_view_id != MSG_ROUTING_NONE) { |
| 847 PluginChannelHost::Broadcast( | 847 PluginChannelHost::Broadcast( |
| 848 new PluginMsg_ResetModalDialogEvent(render_view_id)); | 848 new PluginMsg_ResetModalDialogEvent(render_view_id)); |
| 849 } | 849 } |
| 850 #endif | 850 #endif |
| 851 | 851 |
| 852 if (notify_webkit_of_modal_loop) | 852 if (notify_webkit_of_modal_loop) |
| 853 WebView::didExitModalLoop(); | 853 WebView::didExitModalLoop(); |
| 854 | 854 |
| 855 if (suspend_webkit_shared_timer) | 855 if (suspend_webkit_shared_timer) |
| 856 blink_platform_impl_->ResumeSharedTimer(); | 856 renderer_scheduler_->ResumeTimerQueue(); |
| 857 } | 857 } |
| 858 | 858 |
| 859 return rv; | 859 return rv; |
| 860 } | 860 } |
| 861 | 861 |
| 862 scoped_refptr<base::SingleThreadTaskRunner> RenderThreadImpl::GetTaskRunner() { | 862 scoped_refptr<base::SingleThreadTaskRunner> RenderThreadImpl::GetTaskRunner() { |
| 863 return GetRendererScheduler()->DefaultTaskRunner(); | 863 return GetRendererScheduler()->DefaultTaskRunner(); |
| 864 } | 864 } |
| 865 | 865 |
| 866 IPC::SyncChannel* RenderThreadImpl::GetChannel() { | 866 IPC::SyncChannel* RenderThreadImpl::GetChannel() { |
| (...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1685 if (!blink_platform_impl_) | 1685 if (!blink_platform_impl_) |
| 1686 return; | 1686 return; |
| 1687 NotifyTimezoneChange(); | 1687 NotifyTimezoneChange(); |
| 1688 } | 1688 } |
| 1689 | 1689 |
| 1690 #if defined(OS_ANDROID) | 1690 #if defined(OS_ANDROID) |
| 1691 void RenderThreadImpl::OnSetWebKitSharedTimersSuspended(bool suspend) { | 1691 void RenderThreadImpl::OnSetWebKitSharedTimersSuspended(bool suspend) { |
| 1692 if (suspend_webkit_shared_timer_) { | 1692 if (suspend_webkit_shared_timer_) { |
| 1693 EnsureWebKitInitialized(); | 1693 EnsureWebKitInitialized(); |
| 1694 if (suspend) { | 1694 if (suspend) { |
| 1695 blink_platform_impl_->SuspendSharedTimer(); | 1695 renderer_scheduler_->SuspendTimerQueue(); |
| 1696 } else { | 1696 } else { |
| 1697 blink_platform_impl_->ResumeSharedTimer(); | 1697 renderer_scheduler_->ResumeTimerQueue(); |
| 1698 } | 1698 } |
| 1699 webkit_shared_timer_suspended_ = suspend; | 1699 webkit_shared_timer_suspended_ = suspend; |
| 1700 } | 1700 } |
| 1701 } | 1701 } |
| 1702 #endif | 1702 #endif |
| 1703 | 1703 |
| 1704 #if defined(OS_MACOSX) | 1704 #if defined(OS_MACOSX) |
| 1705 void RenderThreadImpl::OnUpdateScrollbarTheme( | 1705 void RenderThreadImpl::OnUpdateScrollbarTheme( |
| 1706 float initial_button_delay, | 1706 float initial_button_delay, |
| 1707 float autoscroll_button_delay, | 1707 float autoscroll_button_delay, |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1829 mojo::InterfaceRequest<mojo::ServiceProvider> services, | 1829 mojo::InterfaceRequest<mojo::ServiceProvider> services, |
| 1830 mojo::ServiceProviderPtr exposed_services) | 1830 mojo::ServiceProviderPtr exposed_services) |
| 1831 : services(services.Pass()), | 1831 : services(services.Pass()), |
| 1832 exposed_services(exposed_services.Pass()) { | 1832 exposed_services(exposed_services.Pass()) { |
| 1833 } | 1833 } |
| 1834 | 1834 |
| 1835 RenderThreadImpl::PendingRenderFrameConnect::~PendingRenderFrameConnect() { | 1835 RenderThreadImpl::PendingRenderFrameConnect::~PendingRenderFrameConnect() { |
| 1836 } | 1836 } |
| 1837 | 1837 |
| 1838 } // namespace content | 1838 } // namespace content |
| OLD | NEW |