| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |