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_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_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 <map> |
12 #include <memory> | 12 #include <memory> |
13 #include <queue> | 13 #include <queue> |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
18 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
19 #include "base/process/process.h" | 19 #include "base/process/process.h" |
| 20 #include "base/single_thread_task_runner.h" |
20 #include "base/synchronization/waitable_event.h" | 21 #include "base/synchronization/waitable_event.h" |
21 #include "build/build_config.h" | 22 #include "build/build_config.h" |
22 #include "content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h" | 23 #include "content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h" |
23 #include "content/browser/child_process_launcher.h" | 24 #include "content/browser/child_process_launcher.h" |
24 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 25 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
25 #include "content/browser/power_monitor_message_broadcaster.h" | 26 #include "content/browser/power_monitor_message_broadcaster.h" |
26 #include "content/common/content_export.h" | 27 #include "content/common/content_export.h" |
27 #include "content/common/mojo/service_registry_impl.h" | 28 #include "content/common/mojo/service_registry_impl.h" |
28 #include "content/public/browser/render_process_host.h" | 29 #include "content/public/browser/render_process_host.h" |
29 #include "ipc/ipc_channel_proxy.h" | 30 #include "ipc/ipc_channel_proxy.h" |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 void SendAecDumpFileToRenderer(int id, | 364 void SendAecDumpFileToRenderer(int id, |
364 IPC::PlatformFileForTransit file_for_transit); | 365 IPC::PlatformFileForTransit file_for_transit); |
365 void SendEventLogFileToRenderer(int id, | 366 void SendEventLogFileToRenderer(int id, |
366 IPC::PlatformFileForTransit file_for_transit); | 367 IPC::PlatformFileForTransit file_for_transit); |
367 void SendDisableAecDumpToRenderer(); | 368 void SendDisableAecDumpToRenderer(); |
368 void SendDisableEventLogToRenderer(); | 369 void SendDisableEventLogToRenderer(); |
369 base::FilePath GetAecDumpFilePathWithExtensions(const base::FilePath& file); | 370 base::FilePath GetAecDumpFilePathWithExtensions(const base::FilePath& file); |
370 base::FilePath GetEventLogFilePathWithExtensions(const base::FilePath& file); | 371 base::FilePath GetEventLogFilePathWithExtensions(const base::FilePath& file); |
371 #endif | 372 #endif |
372 | 373 |
| 374 static void OnMojoError( |
| 375 base::WeakPtr<RenderProcessHostImpl> process, |
| 376 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 377 const std::string& error); |
| 378 |
373 // IPC::Senders which live as long as this RPH and provide safe, opaque | 379 // IPC::Senders which live as long as this RPH and provide safe, opaque |
374 // access to ChannelProxy SendNow() and SendOnIOThread() respectively. | 380 // access to ChannelProxy SendNow() and SendOnIOThread() respectively. |
375 const std::unique_ptr<SafeSenderProxy> immediate_sender_; | 381 const std::unique_ptr<SafeSenderProxy> immediate_sender_; |
376 const std::unique_ptr<SafeSenderProxy> io_thread_sender_; | 382 const std::unique_ptr<SafeSenderProxy> io_thread_sender_; |
377 | 383 |
378 std::string child_token_; | 384 std::string child_token_; |
379 std::unique_ptr<MojoChildConnection> mojo_child_connection_; | 385 std::unique_ptr<MojoChildConnection> mojo_child_connection_; |
380 std::unique_ptr<MojoApplicationHost> mojo_application_host_; | 386 std::unique_ptr<MojoApplicationHost> mojo_application_host_; |
381 | 387 |
382 // The registered IPC listener objects. When this list is empty, we should | 388 // The registered IPC listener objects. When this list is empty, we should |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 mojo::ScopedMessagePipeHandle in_process_renderer_handle_; | 534 mojo::ScopedMessagePipeHandle in_process_renderer_handle_; |
529 | 535 |
530 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 536 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
531 | 537 |
532 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 538 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
533 }; | 539 }; |
534 | 540 |
535 } // namespace content | 541 } // namespace content |
536 | 542 |
537 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 543 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
OLD | NEW |