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 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 ResourceDispatcherDelegate* delegate) { | 827 ResourceDispatcherDelegate* delegate) { |
828 resource_dispatcher()->set_delegate(delegate); | 828 resource_dispatcher()->set_delegate(delegate); |
829 } | 829 } |
830 | 830 |
831 void RenderThreadImpl::EnsureWebKitInitialized() { | 831 void RenderThreadImpl::EnsureWebKitInitialized() { |
832 if (webkit_platform_support_) | 832 if (webkit_platform_support_) |
833 return; | 833 return; |
834 | 834 |
835 webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl); | 835 webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl); |
836 blink::initialize(webkit_platform_support_.get()); | 836 blink::initialize(webkit_platform_support_.get()); |
837 main_thread_compositor_task_runner_ = | 837 main_thread_compositor_task_runner_ = base::MessageLoopProxy::current(); |
838 make_scoped_refptr(new SchedulerProxyTaskRunner< | |
839 &blink::WebSchedulerProxy::postCompositorTask>()); | |
840 | 838 |
841 v8::Isolate* isolate = blink::mainThreadIsolate(); | 839 v8::Isolate* isolate = blink::mainThreadIsolate(); |
842 | 840 |
843 isolate->SetCounterFunction(base::StatsTable::FindLocation); | 841 isolate->SetCounterFunction(base::StatsTable::FindLocation); |
844 isolate->SetCreateHistogramFunction(CreateHistogram); | 842 isolate->SetCreateHistogramFunction(CreateHistogram); |
845 isolate->SetAddHistogramSampleFunction(AddHistogramSample); | 843 isolate->SetAddHistogramSampleFunction(AddHistogramSample); |
846 | 844 |
847 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 845 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
848 | 846 |
849 bool enable = !command_line.HasSwitch(switches::kDisableThreadedCompositing); | 847 bool enable = !command_line.HasSwitch(switches::kDisableThreadedCompositing); |
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1652 hidden_widget_count_--; | 1650 hidden_widget_count_--; |
1653 | 1651 |
1654 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1652 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1655 return; | 1653 return; |
1656 } | 1654 } |
1657 | 1655 |
1658 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1656 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1659 } | 1657 } |
1660 | 1658 |
1661 } // namespace content | 1659 } // namespace content |
OLD | NEW |