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

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

Issue 1307013004: Propagate scrolling/marginwidth/marginheight property values to child frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content_unittests compile fix Created 5 years, 1 month 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 "content/common/frame_messages.h" 9 #include "content/common/frame_messages.h"
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 void MockRenderThread::OnCreateWindow( 209 void MockRenderThread::OnCreateWindow(
210 const ViewHostMsg_CreateWindow_Params& params, 210 const ViewHostMsg_CreateWindow_Params& params,
211 ViewHostMsg_CreateWindow_Reply* reply) { 211 ViewHostMsg_CreateWindow_Reply* reply) {
212 reply->route_id = new_window_routing_id_; 212 reply->route_id = new_window_routing_id_;
213 reply->main_frame_route_id = new_window_main_frame_routing_id_; 213 reply->main_frame_route_id = new_window_main_frame_routing_id_;
214 reply->main_frame_widget_route_id = new_window_main_frame_widget_routing_id_; 214 reply->main_frame_widget_route_id = new_window_main_frame_widget_routing_id_;
215 reply->cloned_session_storage_namespace_id = 0; 215 reply->cloned_session_storage_namespace_id = 0;
216 } 216 }
217 217
218 // The Frame expects to be returned a valid route_id different from its own. 218 // The Frame expects to be returned a valid route_id different from its own.
219 void MockRenderThread::OnCreateChildFrame(int new_frame_routing_id, 219 void MockRenderThread::OnCreateChildFrame(
220 blink::WebTreeScopeType scope, 220 int new_frame_routing_id,
221 const std::string& frame_name, 221 blink::WebTreeScopeType scope,
222 blink::WebSandboxFlags sandbox_flags, 222 const std::string& frame_name,
223 int* new_render_frame_id) { 223 blink::WebSandboxFlags sandbox_flags,
224 const blink::WebFrameOwnerProperties& frame_owner_properties,
225 int* new_render_frame_id) {
224 *new_render_frame_id = new_frame_routing_id_++; 226 *new_render_frame_id = new_frame_routing_id_++;
225 } 227 }
226 228
227 bool MockRenderThread::OnControlMessageReceived(const IPC::Message& msg) { 229 bool MockRenderThread::OnControlMessageReceived(const IPC::Message& msg) {
228 base::ObserverListBase<RenderProcessObserver>::Iterator it(&observers_); 230 base::ObserverListBase<RenderProcessObserver>::Iterator it(&observers_);
229 RenderProcessObserver* observer; 231 RenderProcessObserver* observer;
230 while ((observer = it.GetNext()) != NULL) { 232 while ((observer = it.GetNext()) != NULL) {
231 if (observer->OnControlMessageReceived(msg)) 233 if (observer->OnControlMessageReceived(msg))
232 return true; 234 return true;
233 } 235 }
(...skipping 18 matching lines...) Expand all
252 void MockRenderThread::OnDuplicateSection( 254 void MockRenderThread::OnDuplicateSection(
253 base::SharedMemoryHandle renderer_handle, 255 base::SharedMemoryHandle renderer_handle,
254 base::SharedMemoryHandle* browser_handle) { 256 base::SharedMemoryHandle* browser_handle) {
255 // We don't have to duplicate the input handles since RenderViewTest does not 257 // We don't have to duplicate the input handles since RenderViewTest does not
256 // separate a browser process from a renderer process. 258 // separate a browser process from a renderer process.
257 *browser_handle = renderer_handle; 259 *browser_handle = renderer_handle;
258 } 260 }
259 #endif // defined(OS_WIN) 261 #endif // defined(OS_WIN)
260 262
261 } // namespace content 263 } // 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