| 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_COMMON_CHILD_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ |
| 6 #define CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 friend class ChildProcessHost; | 71 friend class ChildProcessHost; |
| 72 | 72 |
| 73 explicit ChildProcessHostImpl(ChildProcessHostDelegate* delegate); | 73 explicit ChildProcessHostImpl(ChildProcessHostDelegate* delegate); |
| 74 | 74 |
| 75 // IPC::Listener methods: | 75 // IPC::Listener methods: |
| 76 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 76 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 77 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 77 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
| 78 virtual void OnChannelError() OVERRIDE; | 78 virtual void OnChannelError() OVERRIDE; |
| 79 virtual void OnBadMessageReceived(const IPC::Message& message) OVERRIDE; |
| 79 | 80 |
| 80 // Message handlers: | 81 // Message handlers: |
| 81 void OnShutdownRequest(); | 82 void OnShutdownRequest(); |
| 82 void OnAllocateSharedMemory(uint32 buffer_size, | 83 void OnAllocateSharedMemory(uint32 buffer_size, |
| 83 base::SharedMemoryHandle* handle); | 84 base::SharedMemoryHandle* handle); |
| 84 void OnAllocateGpuMemoryBuffer(uint32 width, | 85 void OnAllocateGpuMemoryBuffer(uint32 width, |
| 85 uint32 height, | 86 uint32 height, |
| 86 uint32 internalformat, | 87 uint32 internalformat, |
| 87 uint32 usage, | 88 uint32 usage, |
| 88 gfx::GpuMemoryBufferHandle* handle); | 89 gfx::GpuMemoryBufferHandle* handle); |
| 89 | 90 |
| 90 ChildProcessHostDelegate* delegate_; | 91 ChildProcessHostDelegate* delegate_; |
| 91 base::ProcessHandle peer_handle_; | 92 base::ProcessHandle peer_handle_; |
| 92 bool opening_channel_; // True while we're waiting the channel to be opened. | 93 bool opening_channel_; // True while we're waiting the channel to be opened. |
| 93 scoped_ptr<IPC::Channel> channel_; | 94 scoped_ptr<IPC::Channel> channel_; |
| 94 std::string channel_id_; | 95 std::string channel_id_; |
| 95 | 96 |
| 96 // Holds all the IPC message filters. Since this object lives on the IO | 97 // Holds all the IPC message filters. Since this object lives on the IO |
| 97 // thread, we don't have a IPC::ChannelProxy and so we manage filters | 98 // thread, we don't have a IPC::ChannelProxy and so we manage filters |
| 98 // manually. | 99 // manually. |
| 99 std::vector<scoped_refptr<IPC::MessageFilter> > filters_; | 100 std::vector<scoped_refptr<IPC::MessageFilter> > filters_; |
| 100 | 101 |
| 101 DISALLOW_COPY_AND_ASSIGN(ChildProcessHostImpl); | 102 DISALLOW_COPY_AND_ASSIGN(ChildProcessHostImpl); |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 } // namespace content | 105 } // namespace content |
| 105 | 106 |
| 106 #endif // CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ | 107 #endif // CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |