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_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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 // ChildThread implementation: | 87 // ChildThread implementation: |
88 #if defined(OS_WIN) | 88 #if defined(OS_WIN) |
89 void PreCacheFont(const LOGFONT& log_font) override; | 89 void PreCacheFont(const LOGFONT& log_font) override; |
90 void ReleaseCachedFonts() override; | 90 void ReleaseCachedFonts() override; |
91 #endif | 91 #endif |
92 void RecordAction(const base::UserMetricsAction& action) override; | 92 void RecordAction(const base::UserMetricsAction& action) override; |
93 void RecordComputedAction(const std::string& action) override; | 93 void RecordComputedAction(const std::string& action) override; |
94 ServiceManagerConnection* GetServiceManagerConnection() override; | 94 ServiceManagerConnection* GetServiceManagerConnection() override; |
95 service_manager::Connector* GetConnector() override; | 95 service_manager::Connector* GetConnector() override; |
| 96 scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner() override; |
96 | 97 |
97 IPC::SyncChannel* channel() { return channel_.get(); } | 98 IPC::SyncChannel* channel() { return channel_.get(); } |
98 | 99 |
99 IPC::MessageRouter* GetRouter(); | 100 IPC::MessageRouter* GetRouter(); |
100 | 101 |
101 mojom::RouteProvider* GetRemoteRouteProvider(); | 102 mojom::RouteProvider* GetRemoteRouteProvider(); |
102 | 103 |
103 // Allocates a block of shared memory of the given size. Returns nullptr on | 104 // Allocates a block of shared memory of the given size. Returns nullptr on |
104 // failure. | 105 // failure. |
105 static std::unique_ptr<base::SharedMemory> AllocateSharedMemory( | 106 static std::unique_ptr<base::SharedMemory> AllocateSharedMemory( |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 184 |
184 // IPC::Listener implementation: | 185 // IPC::Listener implementation: |
185 bool OnMessageReceived(const IPC::Message& msg) override; | 186 bool OnMessageReceived(const IPC::Message& msg) override; |
186 void OnAssociatedInterfaceRequest( | 187 void OnAssociatedInterfaceRequest( |
187 const std::string& interface_name, | 188 const std::string& interface_name, |
188 mojo::ScopedInterfaceEndpointHandle handle) override; | 189 mojo::ScopedInterfaceEndpointHandle handle) override; |
189 void OnChannelConnected(int32_t peer_pid) override; | 190 void OnChannelConnected(int32_t peer_pid) override; |
190 void OnChannelError() override; | 191 void OnChannelError() override; |
191 | 192 |
192 bool IsInBrowserProcess() const; | 193 bool IsInBrowserProcess() const; |
193 scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner(); | |
194 | 194 |
195 private: | 195 private: |
196 class ChildThreadMessageRouter : public IPC::MessageRouter { | 196 class ChildThreadMessageRouter : public IPC::MessageRouter { |
197 public: | 197 public: |
198 // |sender| must outlive this object. | 198 // |sender| must outlive this object. |
199 explicit ChildThreadMessageRouter(IPC::Sender* sender); | 199 explicit ChildThreadMessageRouter(IPC::Sender* sender); |
200 bool Send(IPC::Message* msg) override; | 200 bool Send(IPC::Message* msg) override; |
201 | 201 |
202 // MessageRouter overrides. | 202 // MessageRouter overrides. |
203 bool RouteMessage(const IPC::Message& msg) override; | 203 bool RouteMessage(const IPC::Message& msg) override; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 | 316 |
317 private: | 317 private: |
318 struct Options options_; | 318 struct Options options_; |
319 | 319 |
320 DISALLOW_COPY_AND_ASSIGN(Builder); | 320 DISALLOW_COPY_AND_ASSIGN(Builder); |
321 }; | 321 }; |
322 | 322 |
323 } // namespace content | 323 } // namespace content |
324 | 324 |
325 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ | 325 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
OLD | NEW |