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

Unified Diff: content/browser/renderer_host/render_widget_host.cc

Issue 7972006: Removed sending of the content IPC messages from chrome and replaced them with corresponding APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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/renderer_host/render_widget_host.cc
===================================================================
--- content/browser/renderer_host/render_widget_host.cc (revision 101855)
+++ content/browser/renderer_host/render_widget_host.cc (working copy)
@@ -28,6 +28,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "webkit/glue/webcursor.h"
+#include "webkit/glue/webpreferences.h"
#include "webkit/plugins/npapi/webplugin.h"
using base::Time;
@@ -1255,33 +1256,82 @@
OnUserGesture();
}
-void RenderWidgetHost::Zoom(PageZoom::Function zoom_function) {
- Send(new ViewMsg_Zoom(routing_id(), zoom_function));
+void RenderWidgetHost::Stop() {
+ Send(new ViewMsg_Stop(routing_id()));
}
-void RenderWidgetHost::ReloadFrame() {
- Send(new ViewMsg_ReloadFrame(routing_id()));
+void RenderWidgetHost::SetBackground(const SkBitmap& background) {
+ Send(new ViewMsg_SetBackground(routing_id(), background));
}
-void RenderWidgetHost::Find(int request_id, const string16& search_text,
- const WebKit::WebFindOptions& options) {
- Send(new ViewMsg_Find(routing_id(), request_id, search_text, options));
+void RenderWidgetHost::SetEditCommandsForNextKeyEvent(
+ const std::vector<EditCommand>& commands) {
+ Send(new ViewMsg_SetEditCommandsForNextKeyEvent(routing_id(), commands));
}
-void RenderWidgetHost::Stop() {
- Send(new ViewMsg_Stop(routing_id()));
+void RenderWidgetHost::AccessibilityDoDefaultAction(int object_id) {
+ Send(new ViewMsg_AccessibilityDoDefaultAction(routing_id(), object_id));
}
-void RenderWidgetHost::InsertCSS(const string16& frame_xpath,
- const std::string& css) {
- Send(new ViewMsg_CSSInsertRequest(routing_id(), frame_xpath, css));
+void RenderWidgetHost::AccessibilitySetFocus(int object_id) {
+ Send(new ViewMsg_SetAccessibilityFocus(routing_id(), object_id));
}
-void RenderWidgetHost::DisableScrollbarsForThreshold(const gfx::Size& size) {
- Send(new ViewMsg_DisableScrollbarsForSmallWindows(routing_id(), size));
+void RenderWidgetHost::ExecuteEditCommand(const std::string& command,
+ const std::string& value) {
+ Send(new ViewMsg_ExecuteEditCommand(routing_id(), command, value));
}
-void RenderWidgetHost::EnablePreferredSizeMode(int flags) {
- Send(new ViewMsg_EnablePreferredSizeChangedMode(routing_id(), flags));
+void RenderWidgetHost::ScrollFocusedEditableNodeIntoRect(
+ const gfx::Rect& rect) {
+ Send(new ViewMsg_ScrollFocusedEditableNodeIntoRect(routing_id(), rect));
}
+void RenderWidgetHost::SelectRange(const gfx::Point& start,
+ const gfx::Point& end) {
+ Send(new ViewMsg_SelectRange(routing_id(), start, end));
+}
+
+void RenderWidgetHost::Undo() {
+ Send(new ViewMsg_Undo(routing_id()));
+ UserMetrics::RecordAction(UserMetricsAction("Undo"));
+}
+
+void RenderWidgetHost::Redo() {
+ Send(new ViewMsg_Redo(routing_id()));
+ UserMetrics::RecordAction(UserMetricsAction("Redo"));
+}
+
+void RenderWidgetHost::Cut() {
+ Send(new ViewMsg_Cut(routing_id()));
+ UserMetrics::RecordAction(UserMetricsAction("Cut"));
+}
+
+void RenderWidgetHost::Copy() {
+ Send(new ViewMsg_Copy(routing_id()));
+ UserMetrics::RecordAction(UserMetricsAction("Copy"));
+}
+
+void RenderWidgetHost::CopyToFindPboard() {
+#if defined(OS_MACOSX)
+ // Windows/Linux don't have the concept of a find pasteboard.
+ Send(new ViewMsg_CopyToFindPboard(routing_id()));
+ UserMetrics::RecordAction(UserMetricsAction("CopyToFindPboard"));
+#endif
+}
+
+void RenderWidgetHost::Paste() {
+ Send(new ViewMsg_Paste(routing_id()));
+ UserMetrics::RecordAction(UserMetricsAction("Paste"));
+}
+
+void RenderWidgetHost::Delete() {
+ Send(new ViewMsg_Delete(routing_id()));
+ UserMetrics::RecordAction(UserMetricsAction("DeleteSelection"));
+}
+
+void RenderWidgetHost::SelectAll() {
+ Send(new ViewMsg_SelectAll(routing_id()));
+ UserMetrics::RecordAction(UserMetricsAction("SelectAll"));
+}
+
« no previous file with comments | « content/browser/renderer_host/render_widget_host.h ('k') | content/browser/renderer_host/render_widget_host_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698