Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.h

Issue 2680973006: Mojo EDK: Add safe process connection API (Closed)
Patch Set: . Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 15 matching lines...) Expand all
26 #include "content/browser/webrtc/webrtc_eventlog_host.h" 26 #include "content/browser/webrtc/webrtc_eventlog_host.h"
27 #include "content/common/associated_interfaces.mojom.h" 27 #include "content/common/associated_interfaces.mojom.h"
28 #include "content/common/content_export.h" 28 #include "content/common/content_export.h"
29 #include "content/common/indexed_db/indexed_db.mojom.h" 29 #include "content/common/indexed_db/indexed_db.mojom.h"
30 #include "content/common/renderer.mojom.h" 30 #include "content/common/renderer.mojom.h"
31 #include "content/public/browser/render_process_host.h" 31 #include "content/public/browser/render_process_host.h"
32 #include "content/public/common/service_manager_connection.h" 32 #include "content/public/common/service_manager_connection.h"
33 #include "ipc/ipc_channel_proxy.h" 33 #include "ipc/ipc_channel_proxy.h"
34 #include "ipc/ipc_platform_file.h" 34 #include "ipc/ipc_platform_file.h"
35 #include "media/media_features.h" 35 #include "media/media_features.h"
36 #include "mojo/edk/embedder/pending_process_connection.h"
36 #include "mojo/public/cpp/bindings/associated_binding.h" 37 #include "mojo/public/cpp/bindings/associated_binding.h"
37 #include "mojo/public/cpp/bindings/associated_binding_set.h" 38 #include "mojo/public/cpp/bindings/associated_binding_set.h"
38 #include "mojo/public/cpp/bindings/interface_ptr.h" 39 #include "mojo/public/cpp/bindings/interface_ptr.h"
39 #include "services/service_manager/public/cpp/interface_registry.h" 40 #include "services/service_manager/public/cpp/interface_registry.h"
40 #include "services/service_manager/public/interfaces/service.mojom.h" 41 #include "services/service_manager/public/interfaces/service.mojom.h"
41 #include "services/ui/public/interfaces/gpu.mojom.h" 42 #include "services/ui/public/interfaces/gpu.mojom.h"
42 #include "ui/gfx/gpu_memory_buffer.h" 43 #include "ui/gfx/gpu_memory_buffer.h"
43 #include "ui/gl/gpu_switching_observer.h" 44 #include "ui/gl/gpu_switching_observer.h"
44 45
45 #if defined(OS_ANDROID) 46 #if defined(OS_ANDROID)
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 // method will never run beyond the next invocation of Cleanup(). 422 // method will never run beyond the next invocation of Cleanup().
422 template <typename CallbackType> 423 template <typename CallbackType>
423 void AddUIThreadInterface(service_manager::InterfaceRegistry* registry, 424 void AddUIThreadInterface(service_manager::InterfaceRegistry* registry,
424 const CallbackType& callback) { 425 const CallbackType& callback) {
425 registry->AddInterface( 426 registry->AddInterface(
426 base::Bind(&InterfaceGetter<CallbackType>::GetInterfaceOnUIThread, 427 base::Bind(&InterfaceGetter<CallbackType>::GetInterfaceOnUIThread,
427 instance_weak_factory_->GetWeakPtr(), callback), 428 instance_weak_factory_->GetWeakPtr(), callback),
428 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)); 429 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI));
429 } 430 }
430 431
431 std::string child_token_; 432 std::unique_ptr<mojo::edk::PendingProcessConnection> pending_connection_;
432 433
433 std::unique_ptr<ChildConnection> child_connection_; 434 std::unique_ptr<ChildConnection> child_connection_;
434 int connection_filter_id_ = 435 int connection_filter_id_ =
435 ServiceManagerConnection::kInvalidConnectionFilterId; 436 ServiceManagerConnection::kInvalidConnectionFilterId;
436 scoped_refptr<ConnectionFilterController> connection_filter_controller_; 437 scoped_refptr<ConnectionFilterController> connection_filter_controller_;
437 service_manager::mojom::ServicePtr test_service_; 438 service_manager::mojom::ServicePtr test_service_;
438 439
439 // The number of service workers running in this process. 440 // The number of service workers running in this process.
440 size_t service_worker_ref_count_; 441 size_t service_worker_ref_count_;
441 // See comments for IncrementSharedWorkerRefCount() and 442 // See comments for IncrementSharedWorkerRefCount() and
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 instance_weak_factory_; 615 instance_weak_factory_;
615 616
616 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; 617 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_;
617 618
618 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); 619 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl);
619 }; 620 };
620 621
621 } // namespace content 622 } // namespace content
622 623
623 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ 624 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/child_process_launcher.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698