| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 if (msg->routing_id() == MSG_ROUTING_CONTROL) | 56 if (msg->routing_id() == MSG_ROUTING_CONTROL) |
| 57 OnControlMessageReceived(*msg); | 57 OnControlMessageReceived(*msg); |
| 58 else | 58 else |
| 59 OnMessageReceived(*msg); | 59 OnMessageReceived(*msg); |
| 60 } | 60 } |
| 61 delete msg; | 61 delete msg; |
| 62 return true; | 62 return true; |
| 63 } | 63 } |
| 64 | 64 |
| 65 scoped_refptr<base::SingleThreadTaskRunner> MockRenderThread::GetTaskRunner() { | 65 scoped_refptr<base::SingleThreadTaskRunner> MockRenderThread::GetTaskRunner() { |
| 66 return scoped_refptr<base::MessageLoopProxy>(); | 66 return base::MessageLoopProxy::current(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 IPC::SyncChannel* MockRenderThread::GetChannel() { | 69 IPC::SyncChannel* MockRenderThread::GetChannel() { |
| 70 return NULL; | 70 return NULL; |
| 71 } | 71 } |
| 72 | 72 |
| 73 std::string MockRenderThread::GetLocale() { | 73 std::string MockRenderThread::GetLocale() { |
| 74 return "en-US"; | 74 return "en-US"; |
| 75 } | 75 } |
| 76 | 76 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 void MockRenderThread::OnDuplicateSection( | 259 void MockRenderThread::OnDuplicateSection( |
| 260 base::SharedMemoryHandle renderer_handle, | 260 base::SharedMemoryHandle renderer_handle, |
| 261 base::SharedMemoryHandle* browser_handle) { | 261 base::SharedMemoryHandle* browser_handle) { |
| 262 // We don't have to duplicate the input handles since RenderViewTest does not | 262 // We don't have to duplicate the input handles since RenderViewTest does not |
| 263 // separate a browser process from a renderer process. | 263 // separate a browser process from a renderer process. |
| 264 *browser_handle = renderer_handle; | 264 *browser_handle = renderer_handle; |
| 265 } | 265 } |
| 266 #endif // defined(OS_WIN) | 266 #endif // defined(OS_WIN) |
| 267 | 267 |
| 268 } // namespace content | 268 } // namespace content |
| OLD | NEW |