| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 int* surface_id, | 219 int* surface_id, |
| 220 int64* cloned_session_storage_namespace_id) { | 220 int64* cloned_session_storage_namespace_id) { |
| 221 *route_id = new_window_routing_id_; | 221 *route_id = new_window_routing_id_; |
| 222 *main_frame_route_id = new_window_main_frame_routing_id_; | 222 *main_frame_route_id = new_window_main_frame_routing_id_; |
| 223 *surface_id = surface_id_; | 223 *surface_id = surface_id_; |
| 224 *cloned_session_storage_namespace_id = 0; | 224 *cloned_session_storage_namespace_id = 0; |
| 225 } | 225 } |
| 226 | 226 |
| 227 // The Frame expects to be returned a valid route_id different from its own. | 227 // The Frame expects to be returned a valid route_id different from its own. |
| 228 void MockRenderThread::OnCreateChildFrame(int new_frame_routing_id, | 228 void MockRenderThread::OnCreateChildFrame(int new_frame_routing_id, |
| 229 blink::WebTreeScopeType scope, |
| 229 const std::string& frame_name, | 230 const std::string& frame_name, |
| 230 SandboxFlags sandbox_flags, | 231 SandboxFlags sandbox_flags, |
| 231 int* new_render_frame_id) { | 232 int* new_render_frame_id) { |
| 232 *new_render_frame_id = new_frame_routing_id_++; | 233 *new_render_frame_id = new_frame_routing_id_++; |
| 233 } | 234 } |
| 234 | 235 |
| 235 bool MockRenderThread::OnControlMessageReceived(const IPC::Message& msg) { | 236 bool MockRenderThread::OnControlMessageReceived(const IPC::Message& msg) { |
| 236 ObserverListBase<RenderProcessObserver>::Iterator it(&observers_); | 237 ObserverListBase<RenderProcessObserver>::Iterator it(&observers_); |
| 237 RenderProcessObserver* observer; | 238 RenderProcessObserver* observer; |
| 238 while ((observer = it.GetNext()) != NULL) { | 239 while ((observer = it.GetNext()) != NULL) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 260 void MockRenderThread::OnDuplicateSection( | 261 void MockRenderThread::OnDuplicateSection( |
| 261 base::SharedMemoryHandle renderer_handle, | 262 base::SharedMemoryHandle renderer_handle, |
| 262 base::SharedMemoryHandle* browser_handle) { | 263 base::SharedMemoryHandle* browser_handle) { |
| 263 // We don't have to duplicate the input handles since RenderViewTest does not | 264 // We don't have to duplicate the input handles since RenderViewTest does not |
| 264 // separate a browser process from a renderer process. | 265 // separate a browser process from a renderer process. |
| 265 *browser_handle = renderer_handle; | 266 *browser_handle = renderer_handle; |
| 266 } | 267 } |
| 267 #endif // defined(OS_WIN) | 268 #endif // defined(OS_WIN) |
| 268 | 269 |
| 269 } // namespace content | 270 } // namespace content |
| OLD | NEW |