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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 return static_cast<WebContentsImpl*>(web_contents_)->GetAccessibilityMode(); | 424 return static_cast<WebContentsImpl*>(web_contents_)->GetAccessibilityMode(); |
425 else | 425 else |
426 return AccessibilityMode(); | 426 return AccessibilityMode(); |
427 } | 427 } |
428 | 428 |
429 void InterstitialPageImpl::Cut() { | 429 void InterstitialPageImpl::Cut() { |
430 FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame(); | 430 FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame(); |
431 if (!focused_node) | 431 if (!focused_node) |
432 return; | 432 return; |
433 | 433 |
434 focused_node->current_frame_host()->Send( | 434 focused_node->current_frame_host()->GetFrameInputHandler()->Cut(); |
435 new InputMsg_Cut(focused_node->current_frame_host()->GetRoutingID())); | |
436 RecordAction(base::UserMetricsAction("Cut")); | 435 RecordAction(base::UserMetricsAction("Cut")); |
437 } | 436 } |
438 | 437 |
439 void InterstitialPageImpl::Copy() { | 438 void InterstitialPageImpl::Copy() { |
440 FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame(); | 439 FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame(); |
441 if (!focused_node) | 440 if (!focused_node) |
442 return; | 441 return; |
443 | 442 |
444 focused_node->current_frame_host()->Send( | 443 focused_node->current_frame_host()->GetFrameInputHandler()->Copy(); |
445 new InputMsg_Copy(focused_node->current_frame_host()->GetRoutingID())); | |
446 RecordAction(base::UserMetricsAction("Copy")); | 444 RecordAction(base::UserMetricsAction("Copy")); |
447 } | 445 } |
448 | 446 |
449 void InterstitialPageImpl::Paste() { | 447 void InterstitialPageImpl::Paste() { |
450 FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame(); | 448 FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame(); |
451 if (!focused_node) | 449 if (!focused_node) |
452 return; | 450 return; |
453 | 451 |
454 focused_node->current_frame_host()->Send( | 452 focused_node->current_frame_host()->GetFrameInputHandler()->Paste(); |
455 new InputMsg_Paste(focused_node->current_frame_host()->GetRoutingID())); | |
456 RecordAction(base::UserMetricsAction("Paste")); | 453 RecordAction(base::UserMetricsAction("Paste")); |
457 } | 454 } |
458 | 455 |
459 void InterstitialPageImpl::SelectAll() { | 456 void InterstitialPageImpl::SelectAll() { |
460 FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame(); | 457 FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame(); |
461 if (!focused_node) | 458 if (!focused_node) |
462 return; | 459 return; |
463 | 460 |
464 focused_node->current_frame_host()->Send(new InputMsg_SelectAll( | 461 focused_node->current_frame_host()->GetFrameInputHandler()->SelectAll(); |
465 focused_node->current_frame_host()->GetRoutingID())); | |
466 RecordAction(base::UserMetricsAction("SelectAll")); | 462 RecordAction(base::UserMetricsAction("SelectAll")); |
467 } | 463 } |
468 | 464 |
469 RenderViewHostDelegateView* InterstitialPageImpl::GetDelegateView() { | 465 RenderViewHostDelegateView* InterstitialPageImpl::GetDelegateView() { |
470 return rvh_delegate_view_.get(); | 466 return rvh_delegate_view_.get(); |
471 } | 467 } |
472 | 468 |
473 WebContents* InterstitialPageImpl::GetWebContents() const { | 469 WebContents* InterstitialPageImpl::GetWebContents() const { |
474 return web_contents(); | 470 return web_contents(); |
475 } | 471 } |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 RenderWidgetHostInputEventRouter* InterstitialPageImpl::GetInputEventRouter() { | 981 RenderWidgetHostInputEventRouter* InterstitialPageImpl::GetInputEventRouter() { |
986 WebContentsImpl* web_contents_impl = | 982 WebContentsImpl* web_contents_impl = |
987 static_cast<WebContentsImpl*>(web_contents_); | 983 static_cast<WebContentsImpl*>(web_contents_); |
988 if (!web_contents_impl) | 984 if (!web_contents_impl) |
989 return nullptr; | 985 return nullptr; |
990 | 986 |
991 return web_contents_impl->GetInputEventRouter(); | 987 return web_contents_impl->GetInputEventRouter(); |
992 } | 988 } |
993 | 989 |
994 } // namespace content | 990 } // namespace content |
OLD | NEW |