| 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 455ac74ebe69af1b12b14baa007d0263557c2beb..744b095b59491e90919c8006911b7d5f13d8852b 100644
|
| --- a/content/browser/frame_host/interstitial_page_impl.cc
|
| +++ b/content/browser/frame_host/interstitial_page_impl.cc
|
| @@ -27,6 +27,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"
|
| @@ -190,6 +191,91 @@ InterstitialPageImpl::InterstitialPageImpl(
|
| InterstitialPageImpl::~InterstitialPageImpl() {
|
| }
|
|
|
| +void InterstitialPageImpl::Undo() {
|
| + RenderFrameHostImpl* focused_frame =
|
| + frame_tree_.GetFocusedFrame()->current_frame_host();
|
| + if (!focused_frame)
|
| + return;
|
| +
|
| + focused_frame->Send(new InputMsg_Undo(focused_frame->GetRoutingID()));
|
| + RecordAction(base::UserMetricsAction("Undo"));
|
| +}
|
| +
|
| +void InterstitialPageImpl::Redo() {
|
| + RenderFrameHostImpl* focused_frame =
|
| + frame_tree_.GetFocusedFrame()->current_frame_host();
|
| + if (!focused_frame)
|
| + return;
|
| +
|
| + focused_frame->Send(new InputMsg_Redo(focused_frame->GetRoutingID()));
|
| + RecordAction(base::UserMetricsAction("Redo"));
|
| +}
|
| +
|
| +void InterstitialPageImpl::Cut() {
|
| + RenderFrameHostImpl* focused_frame =
|
| + frame_tree_.GetFocusedFrame()->current_frame_host();
|
| + if (!focused_frame)
|
| + return;
|
| +
|
| + focused_frame->Send(new InputMsg_Cut(focused_frame->GetRoutingID()));
|
| + RecordAction(base::UserMetricsAction("Cut"));
|
| +}
|
| +
|
| +void InterstitialPageImpl::Copy() {
|
| + RenderFrameHostImpl* focused_frame =
|
| + frame_tree_.GetFocusedFrame()->current_frame_host();
|
| + if (!focused_frame)
|
| + return;
|
| +
|
| + focused_frame->Send(new InputMsg_Copy(focused_frame->GetRoutingID()));
|
| + RecordAction(base::UserMetricsAction("Copy"));
|
| +}
|
| +
|
| +void InterstitialPageImpl::CopyToFindPboard() {
|
| +#if defined(OS_MACOSX)
|
| + RenderFrameHostImpl* focused_frame =
|
| + frame_tree_.GetFocusedFrame()->current_frame_host();
|
| + if (!focused_frame)
|
| + return;
|
| +
|
| + // Windows/Linux don't have the concept of a find pasteboard.
|
| + focused_frame->Send(
|
| + new InputMsg_CopyToFindPboard(focused_frame->GetRoutingID()));
|
| + RecordAction(base::UserMetricsAction("CopyToFindPboard"));
|
| +#endif
|
| +}
|
| +
|
| +void InterstitialPageImpl::Paste() {
|
| + RenderFrameHostImpl* focused_frame =
|
| + frame_tree_.GetFocusedFrame()->current_frame_host();
|
| + if (!focused_frame)
|
| + return;
|
| +
|
| + focused_frame->Send(new InputMsg_Paste(focused_frame->GetRoutingID()));
|
| + RecordAction(base::UserMetricsAction("Paste"));
|
| +}
|
| +
|
| +void InterstitialPageImpl::PasteAndMatchStyle() {
|
| + RenderFrameHostImpl* focused_frame =
|
| + frame_tree_.GetFocusedFrame()->current_frame_host();
|
| + if (!focused_frame)
|
| + return;
|
| +
|
| + focused_frame->Send(
|
| + new InputMsg_PasteAndMatchStyle(focused_frame->GetRoutingID()));
|
| + RecordAction(base::UserMetricsAction("PasteAndMatchStyle"));
|
| +}
|
| +
|
| +void InterstitialPageImpl::SelectAll() {
|
| + RenderFrameHostImpl* focused_frame =
|
| + frame_tree_.GetFocusedFrame()->current_frame_host();
|
| + if (!focused_frame)
|
| + return;
|
| +
|
| + focused_frame->Send(new InputMsg_SelectAll(focused_frame->GetRoutingID()));
|
| + RecordAction(base::UserMetricsAction("SelectAll"));
|
| +}
|
| +
|
| void InterstitialPageImpl::Show() {
|
| if (!enabled())
|
| return;
|
|
|