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/test/test_web_contents.h" | 5 #include "content/test/test_web_contents.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "content/browser/browser_url_handler_impl.h" | 9 #include "content/browser/browser_url_handler_impl.h" |
10 #include "content/browser/frame_host/cross_process_frame_connector.h" | 10 #include "content/browser/frame_host/cross_process_frame_connector.h" |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 return delegate_view_override_; | 272 return delegate_view_override_; |
273 return WebContentsImpl::GetDelegateView(); | 273 return WebContentsImpl::GetDelegateView(); |
274 } | 274 } |
275 | 275 |
276 void TestWebContents::SetOpener(TestWebContents* opener) { | 276 void TestWebContents::SetOpener(TestWebContents* opener) { |
277 frame_tree_.root()->SetOpener(opener->GetFrameTree()->root()); | 277 frame_tree_.root()->SetOpener(opener->GetFrameTree()->root()); |
278 } | 278 } |
279 | 279 |
280 void TestWebContents::AddPendingContents(TestWebContents* contents) { | 280 void TestWebContents::AddPendingContents(TestWebContents* contents) { |
281 // This is normally only done in WebContentsImpl::CreateNewWindow. | 281 // This is normally only done in WebContentsImpl::CreateNewWindow. |
282 pending_contents_[contents->GetRenderViewHost()->GetRoutingID()] = contents; | 282 ProcessRoutingIdPair key(contents->GetRenderViewHost()->GetProcess()->GetID(), |
| 283 contents->GetRenderViewHost()->GetRoutingID()); |
| 284 pending_contents_[key] = contents; |
283 AddDestructionObserver(contents); | 285 AddDestructionObserver(contents); |
284 } | 286 } |
285 | 287 |
286 void TestWebContents::ExpectSetHistoryOffsetAndLength(int history_offset, | 288 void TestWebContents::ExpectSetHistoryOffsetAndLength(int history_offset, |
287 int history_length) { | 289 int history_length) { |
288 expect_set_history_offset_and_length_ = true; | 290 expect_set_history_offset_and_length_ = true; |
289 expect_set_history_offset_and_length_history_offset_ = history_offset; | 291 expect_set_history_offset_and_length_history_offset_ = history_offset; |
290 expect_set_history_offset_and_length_history_length_ = history_length; | 292 expect_set_history_offset_and_length_history_length_ = history_length; |
291 } | 293 } |
292 | 294 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 const ViewHostMsg_CreateWindow_Params& params, | 332 const ViewHostMsg_CreateWindow_Params& params, |
331 SessionStorageNamespace* session_storage_namespace) {} | 333 SessionStorageNamespace* session_storage_namespace) {} |
332 | 334 |
333 void TestWebContents::CreateNewWidget(int32_t render_process_id, | 335 void TestWebContents::CreateNewWidget(int32_t render_process_id, |
334 int32_t route_id, | 336 int32_t route_id, |
335 blink::WebPopupType popup_type) {} | 337 blink::WebPopupType popup_type) {} |
336 | 338 |
337 void TestWebContents::CreateNewFullscreenWidget(int32_t render_process_id, | 339 void TestWebContents::CreateNewFullscreenWidget(int32_t render_process_id, |
338 int32_t route_id) {} | 340 int32_t route_id) {} |
339 | 341 |
340 void TestWebContents::ShowCreatedWindow(int route_id, | 342 void TestWebContents::ShowCreatedWindow(int process_id, |
| 343 int route_id, |
341 WindowOpenDisposition disposition, | 344 WindowOpenDisposition disposition, |
342 const gfx::Rect& initial_rect, | 345 const gfx::Rect& initial_rect, |
343 bool user_gesture) { | 346 bool user_gesture) { |
344 } | 347 } |
345 | 348 |
346 void TestWebContents::ShowCreatedWidget(int route_id, | 349 void TestWebContents::ShowCreatedWidget(int process_id, |
| 350 int route_id, |
347 const gfx::Rect& initial_rect) { | 351 const gfx::Rect& initial_rect) { |
348 } | 352 } |
349 | 353 |
350 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { | 354 void TestWebContents::ShowCreatedFullscreenWidget(int process_id, |
| 355 int route_id) { |
351 } | 356 } |
352 | 357 |
353 void TestWebContents::SaveFrameWithHeaders(const GURL& url, | 358 void TestWebContents::SaveFrameWithHeaders(const GURL& url, |
354 const Referrer& referrer, | 359 const Referrer& referrer, |
355 const std::string& headers) { | 360 const std::string& headers) { |
356 save_frame_headers_ = headers; | 361 save_frame_headers_ = headers; |
357 } | 362 } |
358 | 363 |
359 } // namespace content | 364 } // namespace content |
OLD | NEW |