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

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

Issue 690703002: WebThreadImplForMessageLoop to use blink scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a TODO, removed stray whitespace Created 6 years, 1 month 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
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 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 void RenderThreadImpl::SetResourceDispatcherDelegate( 839 void RenderThreadImpl::SetResourceDispatcherDelegate(
840 ResourceDispatcherDelegate* delegate) { 840 ResourceDispatcherDelegate* delegate) {
841 resource_dispatcher()->set_delegate(delegate); 841 resource_dispatcher()->set_delegate(delegate);
842 } 842 }
843 843
844 void RenderThreadImpl::EnsureWebKitInitialized() { 844 void RenderThreadImpl::EnsureWebKitInitialized() {
845 if (blink_platform_impl_) 845 if (blink_platform_impl_)
846 return; 846 return;
847 847
848 blink_platform_impl_.reset( 848 blink_platform_impl_.reset(
849 new RendererBlinkPlatformImpl(renderer_scheduler_.get())); 849 new RendererBlinkPlatformImpl(renderer_scheduler_.get(),
850 renderer_scheduler()->DefaultTaskRunner()));
850 blink::initialize(blink_platform_impl_.get()); 851 blink::initialize(blink_platform_impl_.get());
851 852
852 v8::Isolate* isolate = blink::mainThreadIsolate(); 853 v8::Isolate* isolate = blink::mainThreadIsolate();
853 854
854 isolate->SetCounterFunction(base::StatsTable::FindLocation); 855 isolate->SetCounterFunction(base::StatsTable::FindLocation);
855 isolate->SetCreateHistogramFunction(CreateHistogram); 856 isolate->SetCreateHistogramFunction(CreateHistogram);
856 isolate->SetAddHistogramSampleFunction(AddHistogramSample); 857 isolate->SetAddHistogramSampleFunction(AddHistogramSample);
857 858
858 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 859 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
859 860
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
1593 hidden_widget_count_--; 1594 hidden_widget_count_--;
1594 1595
1595 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { 1596 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) {
1596 return; 1597 return;
1597 } 1598 }
1598 1599
1599 ScheduleIdleHandler(kLongIdleHandlerDelayMs); 1600 ScheduleIdleHandler(kLongIdleHandlerDelayMs);
1600 } 1601 }
1601 1602
1602 } // namespace content 1603 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698