Chromium Code Reviews| Index: content/browser/frame_host/interstitial_page_impl.cc |
| diff --git a/content/browser/frame_host/interstitial_page_impl.cc b/content/browser/frame_host/interstitial_page_impl.cc |
| index 4bf1b1781da1bd9d25ad4a914b88636b76e7af8e..2c91202368118cb5e5425850eb3981a78004c34d 100644 |
| --- a/content/browser/frame_host/interstitial_page_impl.cc |
| +++ b/content/browser/frame_host/interstitial_page_impl.cc |
| @@ -29,6 +29,7 @@ |
| #include "content/browser/web_contents/web_contents_impl.h" |
| #include "content/browser/web_contents/web_contents_view.h" |
| #include "content/common/frame_messages.h" |
| +#include "content/common/input_messages.h" |
| #include "content/common/view_messages.h" |
| #include "content/public/browser/browser_context.h" |
| #include "content/public/browser/browser_thread.h" |
| @@ -426,6 +427,39 @@ AccessibilityMode InterstitialPageImpl::GetAccessibilityMode() const { |
| return AccessibilityModeOff; |
| } |
| +void InterstitialPageImpl::Cut() { |
| + FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame(); |
| + RenderFrameHostImpl* focused_frame = |
| + focused_node ? focused_node->current_frame_host() : nullptr; |
| + if (!focused_frame) |
|
dcheng
2015/06/29 17:58:02
Question: can you have a situation where focused_n
mohsen
2015/06/29 21:46:53
This is the case I saw in tests and that's why I e
|
| + return; |
| + |
| + focused_frame->Send(new InputMsg_Cut(focused_frame->GetRoutingID())); |
| + RecordAction(base::UserMetricsAction("Cut")); |
| +} |
| + |
| +void InterstitialPageImpl::Copy() { |
| + FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame(); |
| + RenderFrameHostImpl* focused_frame = |
| + focused_node ? focused_node->current_frame_host() : nullptr; |
| + if (!focused_frame) |
| + return; |
| + |
| + focused_frame->Send(new InputMsg_Copy(focused_frame->GetRoutingID())); |
| + RecordAction(base::UserMetricsAction("Copy")); |
| +} |
| + |
| +void InterstitialPageImpl::Paste() { |
| + FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame(); |
| + RenderFrameHostImpl* focused_frame = |
| + focused_node ? focused_node->current_frame_host() : nullptr; |
| + if (!focused_frame) |
| + return; |
|
dcheng
2015/06/29 17:58:02
It almost seems like we should have a helper for t
mohsen
2015/06/29 21:46:53
Not applicable, anymore, I guess.
|
| + |
| + focused_frame->Send(new InputMsg_Paste(focused_frame->GetRoutingID())); |
| + RecordAction(base::UserMetricsAction("Paste")); |
| +} |
| + |
| RenderViewHostDelegateView* InterstitialPageImpl::GetDelegateView() { |
| return rvh_delegate_view_.get(); |
| } |