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 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <map> | |
11 #include <memory> | 12 #include <memory> |
12 #include <set> | 13 #include <set> |
13 #include <string> | 14 #include <string> |
15 #include <utility> | |
14 #include <vector> | 16 #include <vector> |
15 | 17 |
16 #include "base/cancelable_callback.h" | 18 #include "base/cancelable_callback.h" |
17 #include "base/macros.h" | 19 #include "base/macros.h" |
18 #include "base/memory/memory_coordinator_client.h" | 20 #include "base/memory/memory_coordinator_client.h" |
19 #include "base/memory/memory_pressure_listener.h" | 21 #include "base/memory/memory_pressure_listener.h" |
20 #include "base/memory/ref_counted.h" | 22 #include "base/memory/ref_counted.h" |
21 #include "base/metrics/field_trial.h" | 23 #include "base/metrics/field_trial.h" |
22 #include "base/metrics/user_metrics_action.h" | 24 #include "base/metrics/user_metrics_action.h" |
23 #include "base/observer_list.h" | 25 #include "base/observer_list.h" |
26 #include "base/optional.h" | |
24 #include "base/strings/string16.h" | 27 #include "base/strings/string16.h" |
25 #include "base/threading/thread_checker.h" | 28 #include "base/threading/thread_checker.h" |
26 #include "base/timer/timer.h" | 29 #include "base/timer/timer.h" |
27 #include "build/build_config.h" | 30 #include "build/build_config.h" |
28 #include "components/variations/child_process_field_trial_syncer.h" | 31 #include "components/variations/child_process_field_trial_syncer.h" |
29 #include "content/child/child_thread_impl.h" | 32 #include "content/child/child_thread_impl.h" |
30 #include "content/child/memory/child_memory_coordinator_impl.h" | 33 #include "content/child/memory/child_memory_coordinator_impl.h" |
31 #include "content/common/associated_interface_registry_impl.h" | 34 #include "content/common/associated_interface_registry_impl.h" |
32 #include "content/common/content_export.h" | 35 #include "content/common/content_export.h" |
33 #include "content/common/frame.mojom.h" | 36 #include "content/common/frame.mojom.h" |
34 #include "content/common/frame_replication_state.h" | 37 #include "content/common/frame_replication_state.h" |
35 #include "content/common/frame_sink_provider.mojom.h" | 38 #include "content/common/frame_sink_provider.mojom.h" |
36 #include "content/common/render_frame_message_filter.mojom.h" | 39 #include "content/common/render_frame_message_filter.mojom.h" |
37 #include "content/common/render_message_filter.mojom.h" | 40 #include "content/common/render_message_filter.mojom.h" |
38 #include "content/common/renderer.mojom.h" | 41 #include "content/common/renderer.mojom.h" |
39 #include "content/common/storage_partition_service.mojom.h" | 42 #include "content/common/storage_partition_service.mojom.h" |
40 #include "content/public/renderer/render_thread.h" | 43 #include "content/public/renderer/render_thread.h" |
41 #include "content/renderer/gpu/compositor_dependencies.h" | 44 #include "content/renderer/gpu/compositor_dependencies.h" |
42 #include "content/renderer/layout_test_dependencies.h" | 45 #include "content/renderer/layout_test_dependencies.h" |
46 #include "content/renderer/media/audio_ipc_factory.h" | |
43 #include "gpu/ipc/client/gpu_channel_host.h" | 47 #include "gpu/ipc/client/gpu_channel_host.h" |
44 #include "media/media_features.h" | 48 #include "media/media_features.h" |
45 #include "mojo/public/cpp/bindings/associated_binding.h" | 49 #include "mojo/public/cpp/bindings/associated_binding.h" |
46 #include "mojo/public/cpp/bindings/binding.h" | 50 #include "mojo/public/cpp/bindings/binding.h" |
47 #include "mojo/public/cpp/bindings/thread_safe_interface_ptr.h" | 51 #include "mojo/public/cpp/bindings/thread_safe_interface_ptr.h" |
48 #include "net/base/network_change_notifier.h" | 52 #include "net/base/network_change_notifier.h" |
49 #include "third_party/WebKit/public/platform/WebConnectionType.h" | 53 #include "third_party/WebKit/public/platform/WebConnectionType.h" |
50 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul er.h" | 54 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul er.h" |
51 #include "third_party/WebKit/public/web/WebMemoryStatistics.h" | 55 #include "third_party/WebKit/public/web/WebMemoryStatistics.h" |
52 #include "ui/gfx/native_widget_types.h" | 56 #include "ui/gfx/native_widget_types.h" |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
307 } | 311 } |
308 | 312 |
309 DomStorageDispatcher* dom_storage_dispatcher() const { | 313 DomStorageDispatcher* dom_storage_dispatcher() const { |
310 return dom_storage_dispatcher_.get(); | 314 return dom_storage_dispatcher_.get(); |
311 } | 315 } |
312 | 316 |
313 AudioInputMessageFilter* audio_input_message_filter() { | 317 AudioInputMessageFilter* audio_input_message_filter() { |
314 return audio_input_message_filter_.get(); | 318 return audio_input_message_filter_.get(); |
315 } | 319 } |
316 | 320 |
317 AudioMessageFilter* audio_message_filter() { | |
318 return audio_message_filter_.get(); | |
319 } | |
320 | |
321 MidiMessageFilter* midi_message_filter() { | 321 MidiMessageFilter* midi_message_filter() { |
322 return midi_message_filter_.get(); | 322 return midi_message_filter_.get(); |
323 } | 323 } |
324 | 324 |
325 #if defined(OS_ANDROID) | 325 #if defined(OS_ANDROID) |
326 SynchronousCompositorFilter* sync_compositor_message_filter() { | 326 SynchronousCompositorFilter* sync_compositor_message_filter() { |
327 return sync_compositor_message_filter_.get(); | 327 return sync_compositor_message_filter_.get(); |
328 } | 328 } |
329 | 329 |
330 scoped_refptr<StreamTextureFactory> GetStreamTexureFactory(); | 330 scoped_refptr<StreamTextureFactory> GetStreamTexureFactory(); |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
628 // Dispatches all P2P sockets. | 628 // Dispatches all P2P sockets. |
629 scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_; | 629 scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_; |
630 | 630 |
631 // Used for communicating registering AEC dump consumers with the browser and | 631 // Used for communicating registering AEC dump consumers with the browser and |
632 // receving AEC dump file handles when AEC dump is enabled. An AEC dump is | 632 // receving AEC dump file handles when AEC dump is enabled. An AEC dump is |
633 // diagnostic audio data for WebRTC stored locally when enabled by the user in | 633 // diagnostic audio data for WebRTC stored locally when enabled by the user in |
634 // chrome://webrtc-internals. | 634 // chrome://webrtc-internals. |
635 scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_; | 635 scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_; |
636 #endif | 636 #endif |
637 | 637 |
638 // Provides AudioOutputIPC objects for audio output devices. It either uses | |
639 // |audio_message_filter_| for this or provides MojoAudioOutputIPC objects. | |
640 base::Optional<AudioIPCFactory> audio_ipc_factory_; | |
o1ka
2017/05/11 10:58:41
Would unique_ptr<> be enough for that?
And under w
Max Morin
2017/05/11 15:31:18
There's no need for unique_ptr, since Optional is
| |
641 | |
638 // Used on the render thread. | 642 // Used on the render thread. |
639 std::unique_ptr<VideoCaptureImplManager> vc_manager_; | 643 std::unique_ptr<VideoCaptureImplManager> vc_manager_; |
640 | 644 |
641 std::unique_ptr<ui::ChildSharedBitmapManager> shared_bitmap_manager_; | 645 std::unique_ptr<ui::ChildSharedBitmapManager> shared_bitmap_manager_; |
642 | 646 |
643 // The count of RenderWidgets running through this thread. | 647 // The count of RenderWidgets running through this thread. |
644 int widget_count_; | 648 int widget_count_; |
645 | 649 |
646 // The count of hidden RenderWidgets running through this thread. | 650 // The count of hidden RenderWidgets running through this thread. |
647 int hidden_widget_count_; | 651 int hidden_widget_count_; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
795 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 799 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
796 }; | 800 }; |
797 | 801 |
798 #if defined(COMPILER_MSVC) | 802 #if defined(COMPILER_MSVC) |
799 #pragma warning(pop) | 803 #pragma warning(pop) |
800 #endif | 804 #endif |
801 | 805 |
802 } // namespace content | 806 } // namespace content |
803 | 807 |
804 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 808 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
OLD | NEW |