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

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

Issue 1685183004: Bootstrap Mojo IPC independent of Chrome IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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_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
11 #include <string> 11 #include <string>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/shared_memory.h" 15 #include "base/memory/shared_memory.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/power_monitor/power_monitor.h" 17 #include "base/power_monitor/power_monitor.h"
18 #include "base/sequenced_task_runner.h" 18 #include "base/sequenced_task_runner.h"
19 #include "base/tracked_objects.h" 19 #include "base/tracked_objects.h"
20 #include "build/build_config.h" 20 #include "build/build_config.h"
21 #include "content/child/mojo/mojo_application.h" 21 #include "content/child/mojo/mojo_application.h"
22 #include "content/common/content_export.h" 22 #include "content/common/content_export.h"
23 #include "content/common/mojo/channel_init.h"
24 #include "content/public/child/child_thread.h" 23 #include "content/public/child/child_thread.h"
25 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. 24 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED.
26 #include "ipc/ipc_platform_file.h" 25 #include "ipc/ipc_platform_file.h"
27 #include "ipc/message_router.h" 26 #include "ipc/message_router.h"
28 27
29 namespace base { 28 namespace base {
30 class MessageLoop; 29 class MessageLoop;
31 } // namespace base 30 } // namespace base
32 31
33 namespace IPC { 32 namespace IPC {
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 221
223 // We create the channel first without connecting it so we can add filters 222 // We create the channel first without connecting it so we can add filters
224 // prior to any messages being received, then connect it afterwards. 223 // prior to any messages being received, then connect it afterwards.
225 void ConnectChannel(bool use_mojo_channel); 224 void ConnectChannel(bool use_mojo_channel);
226 225
227 // IPC message handlers. 226 // IPC message handlers.
228 void OnShutdown(); 227 void OnShutdown();
229 void OnSetProfilerStatus(tracked_objects::ThreadData::Status status); 228 void OnSetProfilerStatus(tracked_objects::ThreadData::Status status);
230 void OnGetChildProfilerData(int sequence_number, int current_profiling_phase); 229 void OnGetChildProfilerData(int sequence_number, int current_profiling_phase);
231 void OnProfilingPhaseCompleted(int profiling_phase); 230 void OnProfilingPhaseCompleted(int profiling_phase);
232 void OnBindExternalMojoShellHandle(const IPC::PlatformFileForTransit& file);
233 void OnSetMojoParentPipeHandle(const IPC::PlatformFileForTransit& file);
234 #ifdef IPC_MESSAGE_LOG_ENABLED 231 #ifdef IPC_MESSAGE_LOG_ENABLED
235 void OnSetIPCLoggingEnabled(bool enable); 232 void OnSetIPCLoggingEnabled(bool enable);
236 #endif 233 #endif
237 234
238 void EnsureConnected(); 235 void EnsureConnected();
239 236
240 scoped_ptr<IPC::ScopedIPCSupport> mojo_ipc_support_; 237 scoped_ptr<IPC::ScopedIPCSupport> mojo_ipc_support_;
241 scoped_ptr<MojoApplication> mojo_application_; 238 scoped_ptr<MojoApplication> mojo_application_;
242 239
243 std::string channel_name_; 240 std::string channel_name_;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 282
286 scoped_ptr<ChildDiscardableSharedMemoryManager> 283 scoped_ptr<ChildDiscardableSharedMemoryManager>
287 discardable_shared_memory_manager_; 284 discardable_shared_memory_manager_;
288 285
289 scoped_ptr<base::PowerMonitor> power_monitor_; 286 scoped_ptr<base::PowerMonitor> power_monitor_;
290 287
291 scoped_refptr<ChildMessageFilter> geofencing_message_filter_; 288 scoped_refptr<ChildMessageFilter> geofencing_message_filter_;
292 289
293 scoped_refptr<base::SequencedTaskRunner> browser_process_io_runner_; 290 scoped_refptr<base::SequencedTaskRunner> browser_process_io_runner_;
294 291
295 ChannelInit mojo_shell_channel_init_;
296
297 base::WeakPtrFactory<ChildThreadImpl> channel_connected_factory_; 292 base::WeakPtrFactory<ChildThreadImpl> channel_connected_factory_;
298 293
299 DISALLOW_COPY_AND_ASSIGN(ChildThreadImpl); 294 DISALLOW_COPY_AND_ASSIGN(ChildThreadImpl);
300 }; 295 };
301 296
302 struct ChildThreadImpl::Options { 297 struct ChildThreadImpl::Options {
303 Options(const Options& other); 298 Options(const Options& other);
304 ~Options(); 299 ~Options();
305 300
306 class Builder; 301 class Builder;
(...skipping 20 matching lines...) Expand all
327 322
328 private: 323 private:
329 struct Options options_; 324 struct Options options_;
330 325
331 DISALLOW_COPY_AND_ASSIGN(Builder); 326 DISALLOW_COPY_AND_ASSIGN(Builder);
332 }; 327 };
333 328
334 } // namespace content 329 } // namespace content
335 330
336 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ 331 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/child/child_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698