| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/frame_host/interstitial_page_impl.h" | 5 #include "content/browser/frame_host/interstitial_page_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 return static_cast<WebContentsImpl*>(web_contents_)->GetAccessibilityMode(); | 431 return static_cast<WebContentsImpl*>(web_contents_)->GetAccessibilityMode(); |
| 432 else | 432 else |
| 433 return AccessibilityMode(); | 433 return AccessibilityMode(); |
| 434 } | 434 } |
| 435 | 435 |
| 436 void InterstitialPageImpl::Cut() { | 436 void InterstitialPageImpl::Cut() { |
| 437 FrameTreeNode* focused_node = frame_tree_->GetFocusedFrame(); | 437 FrameTreeNode* focused_node = frame_tree_->GetFocusedFrame(); |
| 438 if (!focused_node) | 438 if (!focused_node) |
| 439 return; | 439 return; |
| 440 | 440 |
| 441 focused_node->current_frame_host()->Send( | 441 focused_node->current_frame_host()->GetFrameInputHandler()->Cut(); |
| 442 new InputMsg_Cut(focused_node->current_frame_host()->GetRoutingID())); | |
| 443 RecordAction(base::UserMetricsAction("Cut")); | 442 RecordAction(base::UserMetricsAction("Cut")); |
| 444 } | 443 } |
| 445 | 444 |
| 446 void InterstitialPageImpl::Copy() { | 445 void InterstitialPageImpl::Copy() { |
| 447 FrameTreeNode* focused_node = frame_tree_->GetFocusedFrame(); | 446 FrameTreeNode* focused_node = frame_tree_->GetFocusedFrame(); |
| 448 if (!focused_node) | 447 if (!focused_node) |
| 449 return; | 448 return; |
| 450 | 449 |
| 451 focused_node->current_frame_host()->Send( | 450 focused_node->current_frame_host()->GetFrameInputHandler()->Copy(); |
| 452 new InputMsg_Copy(focused_node->current_frame_host()->GetRoutingID())); | |
| 453 RecordAction(base::UserMetricsAction("Copy")); | 451 RecordAction(base::UserMetricsAction("Copy")); |
| 454 } | 452 } |
| 455 | 453 |
| 456 void InterstitialPageImpl::Paste() { | 454 void InterstitialPageImpl::Paste() { |
| 457 FrameTreeNode* focused_node = frame_tree_->GetFocusedFrame(); | 455 FrameTreeNode* focused_node = frame_tree_->GetFocusedFrame(); |
| 458 if (!focused_node) | 456 if (!focused_node) |
| 459 return; | 457 return; |
| 460 | 458 |
| 461 focused_node->current_frame_host()->Send( | 459 focused_node->current_frame_host()->GetFrameInputHandler()->Paste(); |
| 462 new InputMsg_Paste(focused_node->current_frame_host()->GetRoutingID())); | |
| 463 RecordAction(base::UserMetricsAction("Paste")); | 460 RecordAction(base::UserMetricsAction("Paste")); |
| 464 } | 461 } |
| 465 | 462 |
| 466 void InterstitialPageImpl::SelectAll() { | 463 void InterstitialPageImpl::SelectAll() { |
| 467 FrameTreeNode* focused_node = frame_tree_->GetFocusedFrame(); | 464 FrameTreeNode* focused_node = frame_tree_->GetFocusedFrame(); |
| 468 if (!focused_node) | 465 if (!focused_node) |
| 469 return; | 466 return; |
| 470 | 467 |
| 471 focused_node->current_frame_host()->Send(new InputMsg_SelectAll( | 468 focused_node->current_frame_host()->GetFrameInputHandler()->SelectAll(); |
| 472 focused_node->current_frame_host()->GetRoutingID())); | |
| 473 RecordAction(base::UserMetricsAction("SelectAll")); | 469 RecordAction(base::UserMetricsAction("SelectAll")); |
| 474 } | 470 } |
| 475 | 471 |
| 476 RenderViewHostDelegateView* InterstitialPageImpl::GetDelegateView() { | 472 RenderViewHostDelegateView* InterstitialPageImpl::GetDelegateView() { |
| 477 return rvh_delegate_view_.get(); | 473 return rvh_delegate_view_.get(); |
| 478 } | 474 } |
| 479 | 475 |
| 480 WebContents* InterstitialPageImpl::GetWebContents() const { | 476 WebContents* InterstitialPageImpl::GetWebContents() const { |
| 481 return web_contents(); | 477 return web_contents(); |
| 482 } | 478 } |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 RenderWidgetHostInputEventRouter* InterstitialPageImpl::GetInputEventRouter() { | 988 RenderWidgetHostInputEventRouter* InterstitialPageImpl::GetInputEventRouter() { |
| 993 WebContentsImpl* web_contents_impl = | 989 WebContentsImpl* web_contents_impl = |
| 994 static_cast<WebContentsImpl*>(web_contents_); | 990 static_cast<WebContentsImpl*>(web_contents_); |
| 995 if (!web_contents_impl) | 991 if (!web_contents_impl) |
| 996 return nullptr; | 992 return nullptr; |
| 997 | 993 |
| 998 return web_contents_impl->GetInputEventRouter(); | 994 return web_contents_impl->GetInputEventRouter(); |
| 999 } | 995 } |
| 1000 | 996 |
| 1001 } // namespace content | 997 } // namespace content |
| OLD | NEW |