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