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

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: Addressed David'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
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 3912 matching lines...) Expand 10 before | Expand all | Expand 10 after
4388 player_map->erase(it); 4395 player_map->erase(it);
4389 } 4396 }
4390 4397
4391 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4398 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4392 force_disable_overscroll_content_ = force_disable; 4399 force_disable_overscroll_content_ = force_disable;
4393 if (view_) 4400 if (view_)
4394 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4401 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4395 } 4402 }
4396 4403
4397 } // namespace content 4404 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698