Chromium Code Reviews| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 258 return delegate_view_override_; | 258 return delegate_view_override_; |
| 259 return WebContentsImpl::GetDelegateView(); | 259 return WebContentsImpl::GetDelegateView(); |
| 260 } | 260 } |
| 261 | 261 |
| 262 void TestWebContents::SetOpener(TestWebContents* opener) { | 262 void TestWebContents::SetOpener(TestWebContents* opener) { |
| 263 frame_tree_.root()->SetOpener(opener->GetFrameTree()->root()); | 263 frame_tree_.root()->SetOpener(opener->GetFrameTree()->root()); |
| 264 } | 264 } |
| 265 | 265 |
| 266 void TestWebContents::AddPendingContents(TestWebContents* contents) { | 266 void TestWebContents::AddPendingContents(TestWebContents* contents) { |
| 267 // This is normally only done in WebContentsImpl::CreateNewWindow. | 267 // This is normally only done in WebContentsImpl::CreateNewWindow. |
| 268 ProcessRoutingIdPair key(contents->GetRenderViewHost()->GetProcess()->GetID(), | 268 ProcessRoutingIdPair key(contents->GetMainFrame()->GetProcess()->GetID(), |
|
Charlie Reis
2016/11/28 21:00:41
We shouldn't change this one. We should always ge
Lei Zhang
2016/11/30 10:27:00
Reverted.
| |
| 269 contents->GetRenderViewHost()->GetRoutingID()); | 269 contents->GetRenderViewHost()->GetRoutingID()); |
| 270 pending_contents_[key] = contents; | 270 pending_contents_[key] = contents; |
| 271 AddDestructionObserver(contents); | 271 AddDestructionObserver(contents); |
| 272 } | 272 } |
| 273 | 273 |
| 274 void TestWebContents::ExpectSetHistoryOffsetAndLength(int history_offset, | 274 void TestWebContents::ExpectSetHistoryOffsetAndLength(int history_offset, |
| 275 int history_length) { | 275 int history_length) { |
| 276 expect_set_history_offset_and_length_ = true; | 276 expect_set_history_offset_and_length_ = true; |
| 277 expect_set_history_offset_and_length_history_offset_ = history_offset; | 277 expect_set_history_offset_and_length_history_offset_ = history_offset; |
| 278 expect_set_history_offset_and_length_history_length_ = history_length; | 278 expect_set_history_offset_and_length_history_length_ = history_length; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 341 int route_id) { | 341 int route_id) { |
| 342 } | 342 } |
| 343 | 343 |
| 344 void TestWebContents::SaveFrameWithHeaders(const GURL& url, | 344 void TestWebContents::SaveFrameWithHeaders(const GURL& url, |
| 345 const Referrer& referrer, | 345 const Referrer& referrer, |
| 346 const std::string& headers) { | 346 const std::string& headers) { |
| 347 save_frame_headers_ = headers; | 347 save_frame_headers_ = headers; |
| 348 } | 348 } |
| 349 | 349 |
| 350 } // namespace content | 350 } // namespace content |
| OLD | NEW |