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

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

Issue 2099063002: Migrate RenderProcessHost, ChildThread to InterfaceRegistry/Provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | content/child/child_thread_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // IPC::Sender implementation: 89 // IPC::Sender implementation:
90 bool Send(IPC::Message* msg) override; 90 bool Send(IPC::Message* msg) override;
91 91
92 // ChildThread implementation: 92 // ChildThread implementation:
93 #if defined(OS_WIN) 93 #if defined(OS_WIN)
94 void PreCacheFont(const LOGFONT& log_font) override; 94 void PreCacheFont(const LOGFONT& log_font) override;
95 void ReleaseCachedFonts() override; 95 void ReleaseCachedFonts() override;
96 #endif 96 #endif
97 void RecordAction(const base::UserMetricsAction& action) override; 97 void RecordAction(const base::UserMetricsAction& action) override;
98 void RecordComputedAction(const std::string& action) override; 98 void RecordComputedAction(const std::string& action) override;
99 shell::InterfaceRegistry* GetInterfaceRegistry() override;
100 shell::InterfaceProvider* GetRemoteInterfaces() override;
99 101
100 IPC::SyncChannel* channel() { return channel_.get(); } 102 IPC::SyncChannel* channel() { return channel_.get(); }
101 103
102 IPC::MessageRouter* GetRouter(); 104 IPC::MessageRouter* GetRouter();
103 105
104 // Allocates a block of shared memory of the given size. Returns NULL on 106 // Allocates a block of shared memory of the given size. Returns NULL on
105 // failure. 107 // failure.
106 // Note: On posix, this requires a sync IPC to the browser process, 108 // Note: On posix, this requires a sync IPC to the browser process,
107 // but on windows the child process directly allocates the block. 109 // but on windows the child process directly allocates the block.
108 std::unique_ptr<base::SharedMemory> AllocateSharedMemory(size_t buf_size); 110 std::unique_ptr<base::SharedMemory> AllocateSharedMemory(size_t buf_size);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 190
189 // Returns the one child thread. Can only be called on the main thread. 191 // Returns the one child thread. Can only be called on the main thread.
190 static ChildThreadImpl* current(); 192 static ChildThreadImpl* current();
191 193
192 #if defined(OS_ANDROID) 194 #if defined(OS_ANDROID)
193 // Called on Android's service thread to shutdown the main thread of this 195 // Called on Android's service thread to shutdown the main thread of this
194 // process. 196 // process.
195 static void ShutdownThread(); 197 static void ShutdownThread();
196 #endif 198 #endif
197 199
198 shell::InterfaceRegistry* interface_registry() {
199 return mojo_application_->interface_registry();
200 }
201
202 shell::InterfaceProvider* remote_interfaces() const {
203 return mojo_application_->remote_interfaces();
204 }
205
206 protected: 200 protected:
207 friend class ChildProcess; 201 friend class ChildProcess;
208 202
209 // Called when the process refcount is 0. 203 // Called when the process refcount is 0.
210 void OnProcessFinalRelease(); 204 void OnProcessFinalRelease();
211 205
212 virtual bool OnControlMessageReceived(const IPC::Message& msg); 206 virtual bool OnControlMessageReceived(const IPC::Message& msg);
213 virtual void OnProcessBackgrounded(bool backgrounded); 207 virtual void OnProcessBackgrounded(bool backgrounded);
214 virtual void OnProcessPurgeAndSuspend(); 208 virtual void OnProcessPurgeAndSuspend();
215 209
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 336
343 private: 337 private:
344 struct Options options_; 338 struct Options options_;
345 339
346 DISALLOW_COPY_AND_ASSIGN(Builder); 340 DISALLOW_COPY_AND_ASSIGN(Builder);
347 }; 341 };
348 342
349 } // namespace content 343 } // namespace content
350 344
351 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ 345 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | content/child/child_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698