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

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

Powered by Google App Engine
This is Rietveld 408576698