| 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 // Returns the service_manager::ServiceInfo for the child process & the | 98 // Returns the service_manager::ServiceInfo for the child process & the |
| 98 // browser process, once available. | 99 // browser process, once available. |
| 99 const service_manager::ServiceInfo& GetChildServiceInfo() const; | 100 const service_manager::ServiceInfo& GetChildServiceInfo() const; |
| 100 const service_manager::ServiceInfo& GetBrowserServiceInfo() const; | 101 const service_manager::ServiceInfo& GetBrowserServiceInfo() const; |
| 101 bool IsConnectedToBrowser() const; | 102 bool IsConnectedToBrowser() const; |
| 102 | 103 |
| 103 IPC::SyncChannel* channel() { return channel_.get(); } | 104 IPC::SyncChannel* channel() { return channel_.get(); } |
| 104 | 105 |
| 105 IPC::MessageRouter* GetRouter(); | 106 IPC::MessageRouter* GetRouter(); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 190 |
| 190 // IPC::Listener implementation: | 191 // IPC::Listener implementation: |
| 191 bool OnMessageReceived(const IPC::Message& msg) override; | 192 bool OnMessageReceived(const IPC::Message& msg) override; |
| 192 void OnAssociatedInterfaceRequest( | 193 void OnAssociatedInterfaceRequest( |
| 193 const std::string& interface_name, | 194 const std::string& interface_name, |
| 194 mojo::ScopedInterfaceEndpointHandle handle) override; | 195 mojo::ScopedInterfaceEndpointHandle handle) override; |
| 195 void OnChannelConnected(int32_t peer_pid) override; | 196 void OnChannelConnected(int32_t peer_pid) override; |
| 196 void OnChannelError() override; | 197 void OnChannelError() override; |
| 197 | 198 |
| 198 bool IsInBrowserProcess() const; | 199 bool IsInBrowserProcess() const; |
| 199 scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner(); | |
| 200 | 200 |
| 201 private: | 201 private: |
| 202 class ChildThreadMessageRouter : public IPC::MessageRouter { | 202 class ChildThreadMessageRouter : public IPC::MessageRouter { |
| 203 public: | 203 public: |
| 204 // |sender| must outlive this object. | 204 // |sender| must outlive this object. |
| 205 explicit ChildThreadMessageRouter(IPC::Sender* sender); | 205 explicit ChildThreadMessageRouter(IPC::Sender* sender); |
| 206 bool Send(IPC::Message* msg) override; | 206 bool Send(IPC::Message* msg) override; |
| 207 | 207 |
| 208 // MessageRouter overrides. | 208 // MessageRouter overrides. |
| 209 bool RouteMessage(const IPC::Message& msg) override; | 209 bool RouteMessage(const IPC::Message& msg) override; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 331 |
| 332 private: | 332 private: |
| 333 struct Options options_; | 333 struct Options options_; |
| 334 | 334 |
| 335 DISALLOW_COPY_AND_ASSIGN(Builder); | 335 DISALLOW_COPY_AND_ASSIGN(Builder); |
| 336 }; | 336 }; |
| 337 | 337 |
| 338 } // namespace content | 338 } // namespace content |
| 339 | 339 |
| 340 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ | 340 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
| OLD | NEW |