| 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 #include "content/public/test/mock_render_thread.h" | 5 #include "content/public/test/mock_render_thread.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop_proxy.h" | 7 #include "base/message_loop/message_loop_proxy.h" |
| 8 #include "content/common/frame_messages.h" | 8 #include "content/common/frame_messages.h" |
| 9 #include "content/common/view_messages.h" | 9 #include "content/common/view_messages.h" |
| 10 #include "content/public/renderer/render_process_observer.h" | 10 #include "content/public/renderer/render_process_observer.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 127 |
| 128 void MockRenderThread::EnsureWebKitInitialized() { | 128 void MockRenderThread::EnsureWebKitInitialized() { |
| 129 } | 129 } |
| 130 | 130 |
| 131 void MockRenderThread::RecordAction(const base::UserMetricsAction& action) { | 131 void MockRenderThread::RecordAction(const base::UserMetricsAction& action) { |
| 132 } | 132 } |
| 133 | 133 |
| 134 void MockRenderThread::RecordComputedAction(const std::string& action) { | 134 void MockRenderThread::RecordComputedAction(const std::string& action) { |
| 135 } | 135 } |
| 136 | 136 |
| 137 void MockRenderThread::RecordRappor( |
| 138 const std::string& metric, |
| 139 const std::string& sample) { |
| 140 } |
| 141 |
| 137 scoped_ptr<base::SharedMemory> | 142 scoped_ptr<base::SharedMemory> |
| 138 MockRenderThread::HostAllocateSharedMemoryBuffer( | 143 MockRenderThread::HostAllocateSharedMemoryBuffer( |
| 139 size_t buffer_size) { | 144 size_t buffer_size) { |
| 140 scoped_ptr<base::SharedMemory> shared_buf(new base::SharedMemory); | 145 scoped_ptr<base::SharedMemory> shared_buf(new base::SharedMemory); |
| 141 if (!shared_buf->CreateAnonymous(buffer_size)) { | 146 if (!shared_buf->CreateAnonymous(buffer_size)) { |
| 142 NOTREACHED() << "Cannot map shared memory buffer"; | 147 NOTREACHED() << "Cannot map shared memory buffer"; |
| 143 return scoped_ptr<base::SharedMemory>(); | 148 return scoped_ptr<base::SharedMemory>(); |
| 144 } | 149 } |
| 145 | 150 |
| 146 return scoped_ptr<base::SharedMemory>(shared_buf.release()); | 151 return scoped_ptr<base::SharedMemory>(shared_buf.release()); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 void MockRenderThread::OnDuplicateSection( | 265 void MockRenderThread::OnDuplicateSection( |
| 261 base::SharedMemoryHandle renderer_handle, | 266 base::SharedMemoryHandle renderer_handle, |
| 262 base::SharedMemoryHandle* browser_handle) { | 267 base::SharedMemoryHandle* browser_handle) { |
| 263 // We don't have to duplicate the input handles since RenderViewTest does not | 268 // We don't have to duplicate the input handles since RenderViewTest does not |
| 264 // separate a browser process from a renderer process. | 269 // separate a browser process from a renderer process. |
| 265 *browser_handle = renderer_handle; | 270 *browser_handle = renderer_handle; |
| 266 } | 271 } |
| 267 #endif // defined(OS_WIN) | 272 #endif // defined(OS_WIN) |
| 268 | 273 |
| 269 } // namespace content | 274 } // namespace content |
| OLD | NEW |