Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: content/public/test/mock_render_thread.cc

Issue 1635873003: Replicating WebFrame::uniqueName across renderers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dump-render-tree3
Patch Set: Rebasing... Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/public/test/mock_render_thread.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "base/thread_task_runner_handle.h" 8 #include "base/thread_task_runner_handle.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/common/frame_messages.h" 10 #include "content/common/frame_messages.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 const ViewHostMsg_CreateWindow_Params& params, 207 const ViewHostMsg_CreateWindow_Params& params,
208 ViewHostMsg_CreateWindow_Reply* reply) { 208 ViewHostMsg_CreateWindow_Reply* reply) {
209 reply->route_id = new_window_routing_id_; 209 reply->route_id = new_window_routing_id_;
210 reply->main_frame_route_id = new_window_main_frame_routing_id_; 210 reply->main_frame_route_id = new_window_main_frame_routing_id_;
211 reply->main_frame_widget_route_id = new_window_main_frame_widget_routing_id_; 211 reply->main_frame_widget_route_id = new_window_main_frame_widget_routing_id_;
212 reply->cloned_session_storage_namespace_id = 0; 212 reply->cloned_session_storage_namespace_id = 0;
213 } 213 }
214 214
215 // The Frame expects to be returned a valid route_id different from its own. 215 // The Frame expects to be returned a valid route_id different from its own.
216 void MockRenderThread::OnCreateChildFrame( 216 void MockRenderThread::OnCreateChildFrame(
217 int new_frame_routing_id, 217 const FrameHostMsg_CreateChildFrame_Params& params,
218 blink::WebTreeScopeType scope,
219 const std::string& frame_name,
220 blink::WebSandboxFlags sandbox_flags,
221 const blink::WebFrameOwnerProperties& frame_owner_properties,
222 int* new_render_frame_id) { 218 int* new_render_frame_id) {
223 *new_render_frame_id = new_frame_routing_id_++; 219 *new_render_frame_id = new_frame_routing_id_++;
224 } 220 }
225 221
226 bool MockRenderThread::OnControlMessageReceived(const IPC::Message& msg) { 222 bool MockRenderThread::OnControlMessageReceived(const IPC::Message& msg) {
227 base::ObserverListBase<RenderProcessObserver>::Iterator it(&observers_); 223 base::ObserverListBase<RenderProcessObserver>::Iterator it(&observers_);
228 RenderProcessObserver* observer; 224 RenderProcessObserver* observer;
229 while ((observer = it.GetNext()) != NULL) { 225 while ((observer = it.GetNext()) != NULL) {
230 if (observer->OnControlMessageReceived(msg)) 226 if (observer->OnControlMessageReceived(msg))
231 return true; 227 return true;
(...skipping 19 matching lines...) Expand all
251 void MockRenderThread::OnDuplicateSection( 247 void MockRenderThread::OnDuplicateSection(
252 base::SharedMemoryHandle renderer_handle, 248 base::SharedMemoryHandle renderer_handle,
253 base::SharedMemoryHandle* browser_handle) { 249 base::SharedMemoryHandle* browser_handle) {
254 // We don't have to duplicate the input handles since RenderViewTest does not 250 // We don't have to duplicate the input handles since RenderViewTest does not
255 // separate a browser process from a renderer process. 251 // separate a browser process from a renderer process.
256 *browser_handle = renderer_handle; 252 *browser_handle = renderer_handle;
257 } 253 }
258 #endif // defined(OS_WIN) 254 #endif // defined(OS_WIN)
259 255
260 } // namespace content 256 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/mock_render_thread.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698