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

Side by Side Diff: content/child/child_thread_impl.h

Issue 2456493003: Add frame-specific InterfaceProviderSpec. (Closed)
Patch Set: . Created 4 years, 1 month 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_CHILD_CHILD_THREAD_IMPL_H_ 5 #ifndef CONTENT_CHILD_CHILD_THREAD_IMPL_H_
6 #define CONTENT_CHILD_CHILD_THREAD_IMPL_H_ 6 #define CONTENT_CHILD_CHILD_THREAD_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 #if defined(OS_WIN) 99 #if defined(OS_WIN)
100 void PreCacheFont(const LOGFONT& log_font) override; 100 void PreCacheFont(const LOGFONT& log_font) override;
101 void ReleaseCachedFonts() override; 101 void ReleaseCachedFonts() override;
102 #endif 102 #endif
103 void RecordAction(const base::UserMetricsAction& action) override; 103 void RecordAction(const base::UserMetricsAction& action) override;
104 void RecordComputedAction(const std::string& action) override; 104 void RecordComputedAction(const std::string& action) override;
105 ServiceManagerConnection* GetServiceManagerConnection() override; 105 ServiceManagerConnection* GetServiceManagerConnection() override;
106 service_manager::InterfaceRegistry* GetInterfaceRegistry() override; 106 service_manager::InterfaceRegistry* GetInterfaceRegistry() override;
107 service_manager::InterfaceProvider* GetRemoteInterfaces() override; 107 service_manager::InterfaceProvider* GetRemoteInterfaces() override;
108 108
109 // Returns the service_manager::ServiceInfo for the child process & the
110 // browser process, once available.
111 const service_manager::ServiceInfo& GetChildServiceInfo() const;
Ken Rockot(use gerrit already) 2016/10/27 05:12:52 nit: Could you also expose a bool IsConnectedToBro
112 const service_manager::ServiceInfo& GetBrowserServiceInfo() const;
113
109 IPC::SyncChannel* channel() { return channel_.get(); } 114 IPC::SyncChannel* channel() { return channel_.get(); }
110 115
111 IPC::MessageRouter* GetRouter(); 116 IPC::MessageRouter* GetRouter();
112 117
113 mojom::RouteProvider* GetRemoteRouteProvider(); 118 mojom::RouteProvider* GetRemoteRouteProvider();
114 119
115 // Allocates a block of shared memory of the given size. Returns NULL on 120 // Allocates a block of shared memory of the given size. Returns NULL on
116 // failure. 121 // failure.
117 // Note: On posix, this requires a sync IPC to the browser process, 122 // Note: On posix, this requires a sync IPC to the browser process,
118 // but on windows the child process directly allocates the block. 123 // but on windows the child process directly allocates the block.
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 // mojom::RouteProvider: 264 // mojom::RouteProvider:
260 void GetRoute( 265 void GetRoute(
261 int32_t routing_id, 266 int32_t routing_id,
262 mojom::AssociatedInterfaceProviderAssociatedRequest request) override; 267 mojom::AssociatedInterfaceProviderAssociatedRequest request) override;
263 268
264 // mojom::AssociatedInterfaceProvider: 269 // mojom::AssociatedInterfaceProvider:
265 void GetAssociatedInterface( 270 void GetAssociatedInterface(
266 const std::string& name, 271 const std::string& name,
267 mojom::AssociatedInterfaceAssociatedRequest request) override; 272 mojom::AssociatedInterfaceAssociatedRequest request) override;
268 273
274 // Called when a connection is received from another service. When that other
275 // service is the browser process, stores the remote's info.
276 void OnConnect(const service_manager::ServiceInfo& local_info,
Ken Rockot(use gerrit already) 2016/10/27 05:12:52 Maybe a more descriptive name like OnServiceConnec
277 const service_manager::ServiceInfo& remote_info);
278
269 std::unique_ptr<mojo::edk::ScopedIPCSupport> mojo_ipc_support_; 279 std::unique_ptr<mojo::edk::ScopedIPCSupport> mojo_ipc_support_;
270 std::unique_ptr<service_manager::InterfaceRegistry> interface_registry_; 280 std::unique_ptr<service_manager::InterfaceRegistry> interface_registry_;
271 std::unique_ptr<service_manager::InterfaceProvider> remote_interfaces_; 281 std::unique_ptr<service_manager::InterfaceProvider> remote_interfaces_;
272 std::unique_ptr<ServiceManagerConnection> service_manager_connection_; 282 std::unique_ptr<ServiceManagerConnection> service_manager_connection_;
273 std::unique_ptr<service_manager::Connection> browser_connection_; 283 std::unique_ptr<service_manager::Connection> browser_connection_;
274 284
285 service_manager::ServiceInfo child_info_;
286 service_manager::ServiceInfo browser_info_;
287
275 mojo::AssociatedBinding<mojom::RouteProvider> route_provider_binding_; 288 mojo::AssociatedBinding<mojom::RouteProvider> route_provider_binding_;
276 mojo::AssociatedBindingSet<mojom::AssociatedInterfaceProvider> 289 mojo::AssociatedBindingSet<mojom::AssociatedInterfaceProvider>
277 associated_interface_provider_bindings_; 290 associated_interface_provider_bindings_;
278 mojom::RouteProviderAssociatedPtr remote_route_provider_; 291 mojom::RouteProviderAssociatedPtr remote_route_provider_;
279 292
280 std::unique_ptr<IPC::SyncChannel> channel_; 293 std::unique_ptr<IPC::SyncChannel> channel_;
281 294
282 // Allows threads other than the main thread to send sync messages. 295 // Allows threads other than the main thread to send sync messages.
283 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_; 296 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_;
284 297
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 372
360 private: 373 private:
361 struct Options options_; 374 struct Options options_;
362 375
363 DISALLOW_COPY_AND_ASSIGN(Builder); 376 DISALLOW_COPY_AND_ASSIGN(Builder);
364 }; 377 };
365 378
366 } // namespace content 379 } // namespace content
367 380
368 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ 381 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698