Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(543)

Unified Diff: content/browser/frame_host/interstitial_page_impl.cc

Issue 1162373002: Make some editing/selection functions accessible to c/b/renderer_host/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..b846bc06d35b4424c6ce5379e5f1d1a8eefa1f8d 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,36 @@ AccessibilityMode InterstitialPageImpl::GetAccessibilityMode() const {
return AccessibilityModeOff;
}
+void InterstitialPageImpl::Cut() {
+ FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame();
+ if (!focused_node)
+ return;
+
+ focused_node->current_frame_host()->Send(
+ new InputMsg_Cut(focused_node->current_frame_host()->GetRoutingID()));
+ RecordAction(base::UserMetricsAction("Cut"));
+}
+
+void InterstitialPageImpl::Copy() {
+ FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame();
+ if (!focused_node)
+ return;
+
+ focused_node->current_frame_host()->Send(
+ new InputMsg_Copy(focused_node->current_frame_host()->GetRoutingID()));
+ RecordAction(base::UserMetricsAction("Copy"));
+}
+
+void InterstitialPageImpl::Paste() {
+ FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame();
+ if (!focused_node)
+ return;
+
+ focused_node->current_frame_host()->Send(
+ new InputMsg_Paste(focused_node->current_frame_host()->GetRoutingID()));
+ RecordAction(base::UserMetricsAction("Paste"));
+}
+
RenderViewHostDelegateView* InterstitialPageImpl::GetDelegateView() {
return rvh_delegate_view_.get();
}

Powered by Google App Engine
This is Rietveld 408576698