| 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 <utility> | 10 #include <utility> |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 AddFilter(audio_message_filter_.get()); | 701 AddFilter(audio_message_filter_.get()); |
| 702 | 702 |
| 703 midi_message_filter_ = new MidiMessageFilter(GetIOTaskRunner()); | 703 midi_message_filter_ = new MidiMessageFilter(GetIOTaskRunner()); |
| 704 AddFilter(midi_message_filter_.get()); | 704 AddFilter(midi_message_filter_.get()); |
| 705 | 705 |
| 706 AddFilter((new CacheStorageMessageFilter(thread_safe_sender()))->GetFilter()); | 706 AddFilter((new CacheStorageMessageFilter(thread_safe_sender()))->GetFilter()); |
| 707 | 707 |
| 708 AddFilter((new ServiceWorkerContextMessageFilter())->GetFilter()); | 708 AddFilter((new ServiceWorkerContextMessageFilter())->GetFilter()); |
| 709 | 709 |
| 710 #if defined(USE_AURA) | 710 #if defined(USE_AURA) |
| 711 if (IsRunningInMash() && | 711 if (IsRunningInMash()) { |
| 712 !base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 713 switches::kNoUseMusInRenderer)) { | |
| 714 CreateRenderWidgetWindowTreeClientFactory(GetServiceManagerConnection()); | 712 CreateRenderWidgetWindowTreeClientFactory(GetServiceManagerConnection()); |
| 715 } | 713 } |
| 716 #endif | 714 #endif |
| 717 | 715 |
| 718 // Must be called before RenderThreadStarted() below. | 716 // Must be called before RenderThreadStarted() below. |
| 719 StartServiceManagerConnection(); | 717 StartServiceManagerConnection(); |
| 720 | 718 |
| 721 GetContentClient()->renderer()->RenderThreadStarted(); | 719 GetContentClient()->renderer()->RenderThreadStarted(); |
| 722 | 720 |
| 723 field_trial_syncer_.InitFieldTrialObserving( | 721 field_trial_syncer_.InitFieldTrialObserving( |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1876 int routing_id, | 1874 int routing_id, |
| 1877 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue, | 1875 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue, |
| 1878 const GURL& url, | 1876 const GURL& url, |
| 1879 const CompositorFrameSinkCallback& callback) { | 1877 const CompositorFrameSinkCallback& callback) { |
| 1880 const base::CommandLine& command_line = | 1878 const base::CommandLine& command_line = |
| 1881 *base::CommandLine::ForCurrentProcess(); | 1879 *base::CommandLine::ForCurrentProcess(); |
| 1882 if (command_line.HasSwitch(switches::kDisableGpuCompositing)) | 1880 if (command_line.HasSwitch(switches::kDisableGpuCompositing)) |
| 1883 use_software = true; | 1881 use_software = true; |
| 1884 | 1882 |
| 1885 #if defined(USE_AURA) | 1883 #if defined(USE_AURA) |
| 1886 if (!use_software && IsRunningInMash() && | 1884 if (!use_software && IsRunningInMash()) { |
| 1887 !command_line.HasSwitch(switches::kNoUseMusInRenderer)) { | |
| 1888 scoped_refptr<gpu::GpuChannelHost> channel = EstablishGpuChannelSync(); | 1885 scoped_refptr<gpu::GpuChannelHost> channel = EstablishGpuChannelSync(); |
| 1889 // If the channel could not be established correctly, then return null. This | 1886 // If the channel could not be established correctly, then return null. This |
| 1890 // would cause the compositor to wait and try again at a later time. | 1887 // would cause the compositor to wait and try again at a later time. |
| 1891 if (!channel) { | 1888 if (!channel) { |
| 1892 callback.Run(nullptr); | 1889 callback.Run(nullptr); |
| 1893 return; | 1890 return; |
| 1894 } | 1891 } |
| 1895 callback.Run(RendererWindowTreeClient::Get(routing_id) | 1892 callback.Run(RendererWindowTreeClient::Get(routing_id) |
| 1896 ->CreateCompositorFrameSink( | 1893 ->CreateCompositorFrameSink( |
| 1897 cc::FrameSinkId(client_id_, routing_id), | 1894 cc::FrameSinkId(client_id_, routing_id), |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2431 } | 2428 } |
| 2432 } | 2429 } |
| 2433 | 2430 |
| 2434 void RenderThreadImpl::OnRendererInterfaceRequest( | 2431 void RenderThreadImpl::OnRendererInterfaceRequest( |
| 2435 mojom::RendererAssociatedRequest request) { | 2432 mojom::RendererAssociatedRequest request) { |
| 2436 DCHECK(!renderer_binding_.is_bound()); | 2433 DCHECK(!renderer_binding_.is_bound()); |
| 2437 renderer_binding_.Bind(std::move(request)); | 2434 renderer_binding_.Bind(std::move(request)); |
| 2438 } | 2435 } |
| 2439 | 2436 |
| 2440 } // namespace content | 2437 } // namespace content |
| OLD | NEW |