| 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 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "content/common/renderer.mojom.h" | 31 #include "content/common/renderer.mojom.h" |
| 32 #include "content/public/browser/render_process_host.h" | 32 #include "content/public/browser/render_process_host.h" |
| 33 #include "content/public/common/service_manager_connection.h" | 33 #include "content/public/common/service_manager_connection.h" |
| 34 #include "ipc/ipc_channel_proxy.h" | 34 #include "ipc/ipc_channel_proxy.h" |
| 35 #include "ipc/ipc_platform_file.h" | 35 #include "ipc/ipc_platform_file.h" |
| 36 #include "media/media_features.h" | 36 #include "media/media_features.h" |
| 37 #include "mojo/edk/embedder/pending_process_connection.h" | 37 #include "mojo/edk/embedder/pending_process_connection.h" |
| 38 #include "mojo/public/cpp/bindings/associated_binding.h" | 38 #include "mojo/public/cpp/bindings/associated_binding.h" |
| 39 #include "mojo/public/cpp/bindings/associated_binding_set.h" | 39 #include "mojo/public/cpp/bindings/associated_binding_set.h" |
| 40 #include "mojo/public/cpp/bindings/interface_ptr.h" | 40 #include "mojo/public/cpp/bindings/interface_ptr.h" |
| 41 #include "services/service_manager/public/cpp/interface_registry.h" | 41 #include "services/service_manager/public/cpp/binder_registry.h" |
| 42 #include "services/service_manager/public/interfaces/service.mojom.h" | 42 #include "services/service_manager/public/interfaces/service.mojom.h" |
| 43 #include "services/ui/public/interfaces/gpu.mojom.h" | 43 #include "services/ui/public/interfaces/gpu.mojom.h" |
| 44 #include "ui/gfx/gpu_memory_buffer.h" | 44 #include "ui/gfx/gpu_memory_buffer.h" |
| 45 #include "ui/gl/gpu_switching_observer.h" | 45 #include "ui/gl/gpu_switching_observer.h" |
| 46 | 46 |
| 47 #if defined(OS_ANDROID) | 47 #if defined(OS_ANDROID) |
| 48 #include "content/browser/android/synchronous_compositor_browser_filter.h" | 48 #include "content/browser/android/synchronous_compositor_browser_filter.h" |
| 49 #endif | 49 #endif |
| 50 | 50 |
| 51 namespace base { | 51 namespace base { |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 bool StopWebRTCEventLog() override; | 158 bool StopWebRTCEventLog() override; |
| 159 void SetWebRtcLogMessageCallback( | 159 void SetWebRtcLogMessageCallback( |
| 160 base::Callback<void(const std::string&)> callback) override; | 160 base::Callback<void(const std::string&)> callback) override; |
| 161 void ClearWebRtcLogMessageCallback() override; | 161 void ClearWebRtcLogMessageCallback() override; |
| 162 WebRtcStopRtpDumpCallback StartRtpDump( | 162 WebRtcStopRtpDumpCallback StartRtpDump( |
| 163 bool incoming, | 163 bool incoming, |
| 164 bool outgoing, | 164 bool outgoing, |
| 165 const WebRtcRtpPacketCallback& packet_callback) override; | 165 const WebRtcRtpPacketCallback& packet_callback) override; |
| 166 #endif | 166 #endif |
| 167 void ResumeDeferredNavigation(const GlobalRequestID& request_id) override; | 167 void ResumeDeferredNavigation(const GlobalRequestID& request_id) override; |
| 168 service_manager::InterfaceProvider* GetRemoteInterfaces() override; | 168 void BindInterface(const std::string& interface_name, |
| 169 mojo::ScopedMessagePipeHandle interface_pipe) override; |
| 169 std::unique_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator() | 170 std::unique_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator() |
| 170 override; | 171 override; |
| 171 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; | 172 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; |
| 172 bool IsProcessBackgrounded() const override; | 173 bool IsProcessBackgrounded() const override; |
| 173 size_t GetWorkerRefCount() const override; | 174 size_t GetWorkerRefCount() const override; |
| 174 void IncrementServiceWorkerRefCount() override; | 175 void IncrementServiceWorkerRefCount() override; |
| 175 void DecrementServiceWorkerRefCount() override; | 176 void DecrementServiceWorkerRefCount() override; |
| 176 void IncrementSharedWorkerRefCount() override; | 177 void IncrementSharedWorkerRefCount() override; |
| 177 void DecrementSharedWorkerRefCount() override; | 178 void DecrementSharedWorkerRefCount() override; |
| 178 void ForceReleaseWorkerRefCounts() override; | 179 void ForceReleaseWorkerRefCounts() override; |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 if (!weak_host) | 415 if (!weak_host) |
| 415 return; | 416 return; |
| 416 callback.Run(std::move(request)); | 417 callback.Run(std::move(request)); |
| 417 } | 418 } |
| 418 }; | 419 }; |
| 419 | 420 |
| 420 // Helper to bind an interface callback whose lifetime is limited to that of | 421 // Helper to bind an interface callback whose lifetime is limited to that of |
| 421 // the render process currently hosted by the RPHI. Callbacks added by this | 422 // the render process currently hosted by the RPHI. Callbacks added by this |
| 422 // method will never run beyond the next invocation of Cleanup(). | 423 // method will never run beyond the next invocation of Cleanup(). |
| 423 template <typename CallbackType> | 424 template <typename CallbackType> |
| 424 void AddUIThreadInterface(service_manager::InterfaceRegistry* registry, | 425 void AddUIThreadInterface(service_manager::BinderRegistry* registry, |
| 425 const CallbackType& callback) { | 426 const CallbackType& callback) { |
| 426 registry->AddInterface( | 427 registry->AddInterface( |
| 427 base::Bind(&InterfaceGetter<CallbackType>::GetInterfaceOnUIThread, | 428 base::Bind(&InterfaceGetter<CallbackType>::GetInterfaceOnUIThread, |
| 428 instance_weak_factory_->GetWeakPtr(), callback), | 429 instance_weak_factory_->GetWeakPtr(), callback), |
| 429 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)); | 430 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)); |
| 430 } | 431 } |
| 431 | 432 |
| 432 std::unique_ptr<mojo::edk::PendingProcessConnection> pending_connection_; | 433 std::unique_ptr<mojo::edk::PendingProcessConnection> pending_connection_; |
| 433 | 434 |
| 434 std::unique_ptr<ChildConnection> child_connection_; | 435 std::unique_ptr<ChildConnection> child_connection_; |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 instance_weak_factory_; | 618 instance_weak_factory_; |
| 618 | 619 |
| 619 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 620 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
| 620 | 621 |
| 621 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 622 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 622 }; | 623 }; |
| 623 | 624 |
| 624 } // namespace content | 625 } // namespace content |
| 625 | 626 |
| 626 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 627 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |