| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 | 227 |
| 228 void AddHistogramSample(void* hist, int sample) { | 228 void AddHistogramSample(void* hist, int sample) { |
| 229 base::Histogram* histogram = static_cast<base::Histogram*>(hist); | 229 base::Histogram* histogram = static_cast<base::Histogram*>(hist); |
| 230 histogram->Add(sample); | 230 histogram->Add(sample); |
| 231 } | 231 } |
| 232 | 232 |
| 233 scoped_ptr<base::SharedMemory> AllocateSharedMemoryFunction(size_t size) { | 233 scoped_ptr<base::SharedMemory> AllocateSharedMemoryFunction(size_t size) { |
| 234 return RenderThreadImpl::Get()->HostAllocateSharedMemoryBuffer(size); | 234 return RenderThreadImpl::Get()->HostAllocateSharedMemoryBuffer(size); |
| 235 } | 235 } |
| 236 | 236 |
| 237 void EnableWebCoreLogChannels(const std::string& channels) { | 237 void EnableBlinkPlatformLogChannels(const std::string& channels) { |
| 238 if (channels.empty()) | 238 if (channels.empty()) |
| 239 return; | 239 return; |
| 240 base::StringTokenizer t(channels, ", "); | 240 base::StringTokenizer t(channels, ", "); |
| 241 while (t.GetNext()) | 241 while (t.GetNext()) |
| 242 blink::enableLogChannel(t.token().c_str()); | 242 blink::enableLogChannel(t.token().c_str()); |
| 243 } | 243 } |
| 244 | 244 |
| 245 } // namespace | 245 } // namespace |
| 246 | 246 |
| 247 RenderThreadImpl::HistogramCustomizer::HistogramCustomizer() { | 247 RenderThreadImpl::HistogramCustomizer::HistogramCustomizer() { |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 output_surface_loop = base::MessageLoopProxy::current(); | 698 output_surface_loop = base::MessageLoopProxy::current(); |
| 699 | 699 |
| 700 compositor_output_surface_filter_ = | 700 compositor_output_surface_filter_ = |
| 701 CompositorOutputSurface::CreateFilter(output_surface_loop.get()); | 701 CompositorOutputSurface::CreateFilter(output_surface_loop.get()); |
| 702 AddFilter(compositor_output_surface_filter_.get()); | 702 AddFilter(compositor_output_surface_filter_.get()); |
| 703 | 703 |
| 704 WebScriptController::enableV8SingleThreadMode(); | 704 WebScriptController::enableV8SingleThreadMode(); |
| 705 | 705 |
| 706 RenderThreadImpl::RegisterSchemes(); | 706 RenderThreadImpl::RegisterSchemes(); |
| 707 | 707 |
| 708 EnableWebCoreLogChannels( | 708 EnableBlinkPlatformLogChannels( |
| 709 command_line.GetSwitchValueASCII(switches::kWebCoreLogChannels)); | 709 command_line.GetSwitchValueASCII(switches::kBlinkPlatformLogChannels)); |
| 710 | 710 |
| 711 SetRuntimeFeaturesDefaultsAndUpdateFromArgs(command_line); | 711 SetRuntimeFeaturesDefaultsAndUpdateFromArgs(command_line); |
| 712 | 712 |
| 713 if (!media::IsMediaLibraryInitialized()) { | 713 if (!media::IsMediaLibraryInitialized()) { |
| 714 WebRuntimeFeatures::enableMediaPlayer(false); | 714 WebRuntimeFeatures::enableMediaPlayer(false); |
| 715 WebRuntimeFeatures::enableWebAudio(false); | 715 WebRuntimeFeatures::enableWebAudio(false); |
| 716 } | 716 } |
| 717 | 717 |
| 718 FOR_EACH_OBSERVER(RenderProcessObserver, observers_, WebKitInitialized()); | 718 FOR_EACH_OBSERVER(RenderProcessObserver, observers_, WebKitInitialized()); |
| 719 | 719 |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 hidden_widget_count_--; | 1408 hidden_widget_count_--; |
| 1409 | 1409 |
| 1410 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1410 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
| 1411 return; | 1411 return; |
| 1412 } | 1412 } |
| 1413 | 1413 |
| 1414 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1414 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
| 1415 } | 1415 } |
| 1416 | 1416 |
| 1417 } // namespace content | 1417 } // namespace content |
| OLD | NEW |