Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 1078173002: Remove obsolete SharedTimer code in chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/child/blink_platform_impl_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 } 832 }
833 833
834 bool notify_webkit_of_modal_loop = true; // default value 834 bool notify_webkit_of_modal_loop = true; // default value
835 std::swap(notify_webkit_of_modal_loop, notify_webkit_of_modal_loop_); 835 std::swap(notify_webkit_of_modal_loop, notify_webkit_of_modal_loop_);
836 836
837 #if defined(ENABLE_PLUGINS) 837 #if defined(ENABLE_PLUGINS)
838 int render_view_id = MSG_ROUTING_NONE; 838 int render_view_id = MSG_ROUTING_NONE;
839 #endif 839 #endif
840 840
841 if (pumping_events) { 841 if (pumping_events) {
842 // TODO(alexclarke): Remove the shared timer.
843 blink_platform_impl_->SuspendSharedTimer();
844 renderer_scheduler_->SuspendTimerQueue(); 842 renderer_scheduler_->SuspendTimerQueue();
845 843
846 if (notify_webkit_of_modal_loop) 844 if (notify_webkit_of_modal_loop)
847 WebView::willEnterModalLoop(); 845 WebView::willEnterModalLoop();
848 #if defined(ENABLE_PLUGINS) 846 #if defined(ENABLE_PLUGINS)
849 RenderViewImpl* render_view = 847 RenderViewImpl* render_view =
850 RenderViewImpl::FromRoutingID(msg->routing_id()); 848 RenderViewImpl::FromRoutingID(msg->routing_id());
851 if (render_view) { 849 if (render_view) {
852 render_view_id = msg->routing_id(); 850 render_view_id = msg->routing_id();
853 PluginChannelHost::Broadcast( 851 PluginChannelHost::Broadcast(
854 new PluginMsg_SignalModalDialogEvent(render_view_id)); 852 new PluginMsg_SignalModalDialogEvent(render_view_id));
855 } 853 }
856 #endif 854 #endif
857 } 855 }
858 856
859 bool rv = ChildThreadImpl::Send(msg); 857 bool rv = ChildThreadImpl::Send(msg);
860 858
861 if (pumping_events) { 859 if (pumping_events) {
862 #if defined(ENABLE_PLUGINS) 860 #if defined(ENABLE_PLUGINS)
863 if (render_view_id != MSG_ROUTING_NONE) { 861 if (render_view_id != MSG_ROUTING_NONE) {
864 PluginChannelHost::Broadcast( 862 PluginChannelHost::Broadcast(
865 new PluginMsg_ResetModalDialogEvent(render_view_id)); 863 new PluginMsg_ResetModalDialogEvent(render_view_id));
866 } 864 }
867 #endif 865 #endif
868 866
869 if (notify_webkit_of_modal_loop) 867 if (notify_webkit_of_modal_loop)
870 WebView::didExitModalLoop(); 868 WebView::didExitModalLoop();
871 869
872 // TODO(alexclarke): Remove the shared timer.
873 blink_platform_impl_->ResumeSharedTimer();
874 renderer_scheduler_->ResumeTimerQueue(); 870 renderer_scheduler_->ResumeTimerQueue();
875 } 871 }
876 872
877 return rv; 873 return rv;
878 } 874 }
879 875
880 scoped_refptr<base::SingleThreadTaskRunner> RenderThreadImpl::GetTaskRunner() { 876 scoped_refptr<base::SingleThreadTaskRunner> RenderThreadImpl::GetTaskRunner() {
881 return GetRendererScheduler()->DefaultTaskRunner(); 877 return GetRendererScheduler()->DefaultTaskRunner();
882 } 878 }
883 879
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 icu::UnicodeString::fromUTF8(zone_id)); 1691 icu::UnicodeString::fromUTF8(zone_id));
1696 icu::TimeZone::adoptDefault(new_zone); 1692 icu::TimeZone::adoptDefault(new_zone);
1697 VLOG(1) << "ICU default timezone is set to " << zone_id; 1693 VLOG(1) << "ICU default timezone is set to " << zone_id;
1698 } 1694 }
1699 NotifyTimezoneChange(); 1695 NotifyTimezoneChange();
1700 } 1696 }
1701 1697
1702 #if defined(OS_ANDROID) 1698 #if defined(OS_ANDROID)
1703 void RenderThreadImpl::OnSetWebKitSharedTimersSuspended(bool suspend) { 1699 void RenderThreadImpl::OnSetWebKitSharedTimersSuspended(bool suspend) {
1704 EnsureWebKitInitialized(); 1700 EnsureWebKitInitialized();
1705 // TODO(alexclarke): Remove the shared timer.
1706 if (suspend) { 1701 if (suspend) {
1707 blink_platform_impl_->SuspendSharedTimer();
1708 renderer_scheduler_->SuspendTimerQueue(); 1702 renderer_scheduler_->SuspendTimerQueue();
1709 } else { 1703 } else {
1710 blink_platform_impl_->ResumeSharedTimer();
1711 renderer_scheduler_->ResumeTimerQueue(); 1704 renderer_scheduler_->ResumeTimerQueue();
1712 } 1705 }
1713 webkit_shared_timer_suspended_ = suspend; 1706 webkit_shared_timer_suspended_ = suspend;
1714 } 1707 }
1715 #endif 1708 #endif
1716 1709
1717 #if defined(OS_MACOSX) 1710 #if defined(OS_MACOSX)
1718 void RenderThreadImpl::OnUpdateScrollbarTheme( 1711 void RenderThreadImpl::OnUpdateScrollbarTheme(
1719 float initial_button_delay, 1712 float initial_button_delay,
1720 float autoscroll_button_delay, 1713 float autoscroll_button_delay,
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1882 } 1875 }
1883 1876
1884 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 1877 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
1885 size_t erased = 1878 size_t erased =
1886 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 1879 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
1887 routing_id_); 1880 routing_id_);
1888 DCHECK_EQ(1u, erased); 1881 DCHECK_EQ(1u, erased);
1889 } 1882 }
1890 1883
1891 } // namespace content 1884 } // namespace content
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698