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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1079163008: PlzNavigate: provide the FrameTreeNode ID to the network stack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-unittests
Patch Set: Rebase + addressed Nasko's comments Created 5 years, 7 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/browser/web_contents/web_contents_impl.h ('k') | no next file » | 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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 continue; 456 continue;
457 WebContentsImpl* wci = static_cast<WebContentsImpl*>(web_contents); 457 WebContentsImpl* wci = static_cast<WebContentsImpl*>(web_contents);
458 if (web_contents_set.find(wci) == web_contents_set.end()) { 458 if (web_contents_set.find(wci) == web_contents_set.end()) {
459 web_contents_set.insert(wci); 459 web_contents_set.insert(wci);
460 result.push_back(wci); 460 result.push_back(wci);
461 } 461 }
462 } 462 }
463 return result; 463 return result;
464 } 464 }
465 465
466 // static
467 WebContentsImpl* WebContentsImpl::FromFrameTreeNode(
468 FrameTreeNode* frame_tree_node) {
469 return static_cast<WebContentsImpl*>(
470 WebContents::FromRenderFrameHost(frame_tree_node->current_frame_host()));
471 }
472
466 RenderFrameHostManager* WebContentsImpl::GetRenderManagerForTesting() { 473 RenderFrameHostManager* WebContentsImpl::GetRenderManagerForTesting() {
467 return GetRenderManager(); 474 return GetRenderManager();
468 } 475 }
469 476
470 bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host, 477 bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host,
471 const IPC::Message& message) { 478 const IPC::Message& message) {
472 return OnMessageReceived(render_view_host, NULL, message); 479 return OnMessageReceived(render_view_host, NULL, message);
473 } 480 }
474 481
475 bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host, 482 bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host,
(...skipping 3916 matching lines...) Expand 10 before | Expand all | Expand 10 after
4392 player_map->erase(it); 4399 player_map->erase(it);
4393 } 4400 }
4394 4401
4395 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4402 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4396 force_disable_overscroll_content_ = force_disable; 4403 force_disable_overscroll_content_ = force_disable;
4397 if (view_) 4404 if (view_)
4398 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4405 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4399 } 4406 }
4400 4407
4401 } // namespace content 4408 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698