| Index: chrome/browser/renderer_host/render_widget_host_view_mac.mm
|
| ===================================================================
|
| --- chrome/browser/renderer_host/render_widget_host_view_mac.mm (revision 101850)
|
| +++ chrome/browser/renderer_host/render_widget_host_view_mac.mm (working copy)
|
| @@ -44,7 +44,6 @@
|
| #include "content/common/gpu/gpu_messages.h"
|
| #include "content/common/native_web_keyboard_event.h"
|
| #include "content/common/plugin_messages.h"
|
| -#include "content/common/view_messages.h"
|
| #include "skia/ext/platform_canvas.h"
|
| #import "third_party/mozilla/ComplexTextInputPanel.h"
|
| #include "third_party/skia/include/core/SkColor.h"
|
| @@ -797,8 +796,7 @@
|
| void RenderWidgetHostViewMac::PluginImeCompositionCompleted(
|
| const string16& text, int plugin_id) {
|
| if (render_widget_host_) {
|
| - render_widget_host_->Send(new ViewMsg_PluginImeCompositionCompleted(
|
| - render_widget_host_->routing_id(), text, plugin_id));
|
| + render_widget_host_->NotifyPluginImeCompletion(plugin_id, text);
|
| }
|
| }
|
|
|
| @@ -1112,8 +1110,7 @@
|
|
|
| void RenderWidgetHostViewMac::SetActive(bool active) {
|
| if (render_widget_host_) {
|
| - render_widget_host_->Send(new ViewMsg_SetActive(
|
| - render_widget_host_->routing_id(), active));
|
| + render_widget_host_->SetActive(active);
|
| }
|
| if (HasFocus())
|
| SetTextInputActive(active);
|
| @@ -1123,24 +1120,21 @@
|
|
|
| void RenderWidgetHostViewMac::SetWindowVisibility(bool visible) {
|
| if (render_widget_host_) {
|
| - render_widget_host_->Send(new ViewMsg_SetWindowVisibility(
|
| - render_widget_host_->routing_id(), visible));
|
| + render_widget_host_->SetWindowVisibility(visible);
|
| }
|
| }
|
|
|
| void RenderWidgetHostViewMac::WindowFrameChanged() {
|
| if (render_widget_host_) {
|
| - render_widget_host_->Send(new ViewMsg_WindowFrameChanged(
|
| - render_widget_host_->routing_id(), GetRootWindowBounds(),
|
| - GetViewBounds()));
|
| + render_widget_host_->NotifyWindowFrameChanged(GetRootWindowBounds(),
|
| + GetViewBounds());
|
| }
|
| }
|
|
|
| void RenderWidgetHostViewMac::SetBackground(const SkBitmap& background) {
|
| RenderWidgetHostView::SetBackground(background);
|
| if (render_widget_host_)
|
| - render_widget_host_->Send(new ViewMsg_SetBackground(
|
| - render_widget_host_->routing_id(), background));
|
| + render_widget_host_->SetBackground(background);
|
| }
|
|
|
| void RenderWidgetHostViewMac::OnAccessibilityNotifications(
|
| @@ -1477,8 +1471,7 @@
|
| delayEventUntilAfterImeCompostion = YES;
|
| } else {
|
| if (!editCommands_.empty()) {
|
| - widgetHost->Send(new ViewMsg_SetEditCommandsForNextKeyEvent(
|
| - widgetHost->routing_id(), editCommands_));
|
| + widgetHost->SetEditCommandsForNextKeyEvent(editCommands_);
|
| }
|
| widgetHost->ForwardKeyboardEvent(event);
|
| }
|
| @@ -1543,8 +1536,7 @@
|
| // thus it won't destroy the widget.
|
|
|
| if (!editCommands_.empty()) {
|
| - widgetHost->Send(new ViewMsg_SetEditCommandsForNextKeyEvent(
|
| - widgetHost->routing_id(), editCommands_));
|
| + widgetHost->SetEditCommandsForNextKeyEvent(editCommands_);
|
| }
|
| widgetHost->ForwardKeyboardEvent(event);
|
|
|
| @@ -2089,8 +2081,7 @@
|
|
|
| - (void)doDefaultAction:(int32)accessibilityObjectId {
|
| RenderWidgetHost* rwh = renderWidgetHostView_->render_widget_host_;
|
| - rwh->Send(new ViewMsg_AccessibilityDoDefaultAction(
|
| - rwh->routing_id(), accessibilityObjectId));
|
| + rwh->AccessibilityDoDefaultAction(accessibilityObjectId);
|
| }
|
|
|
| // Convert a web accessibility's location in web coordinates into a cocoa
|
| @@ -2110,8 +2101,7 @@
|
| accessibilityId:(int32)accessibilityObjectId {
|
| if (focus) {
|
| RenderWidgetHost* rwh = renderWidgetHostView_->render_widget_host_;
|
| - rwh->Send(new ViewMsg_SetAccessibilityFocus(
|
| - rwh->routing_id(), accessibilityObjectId));
|
| + rwh->AccessibilitySetFocus(accessibilityObjectId);
|
| }
|
| }
|
|
|
| @@ -2617,7 +2607,7 @@
|
| editCommands_.push_back(EditCommand(command, ""));
|
| } else {
|
| RenderWidgetHost* rwh = renderWidgetHostView_->render_widget_host_;
|
| - rwh->Send(new ViewMsg_ExecuteEditCommand(rwh->routing_id(), command, ""));
|
| + rwh->ExecuteEditCommand(command, "");
|
| }
|
| }
|
|
|
| @@ -2690,51 +2680,44 @@
|
|
|
| - (void)undo:(id)sender {
|
| if (renderWidgetHostView_->render_widget_host_->IsRenderView()) {
|
| - static_cast<RenderViewHost*>(renderWidgetHostView_->render_widget_host_)->
|
| - Undo();
|
| + renderWidgetHostView_->render_widget_host_->Undo();
|
| }
|
| }
|
|
|
| - (void)redo:(id)sender {
|
| if (renderWidgetHostView_->render_widget_host_->IsRenderView()) {
|
| - static_cast<RenderViewHost*>(renderWidgetHostView_->render_widget_host_)->
|
| - Redo();
|
| + renderWidgetHostView_->render_widget_host_->Redo();
|
| }
|
| }
|
|
|
| - (void)cut:(id)sender {
|
| if (renderWidgetHostView_->render_widget_host_->IsRenderView()) {
|
| - static_cast<RenderViewHost*>(renderWidgetHostView_->render_widget_host_)->
|
| - Cut();
|
| + renderWidgetHostView_->render_widget_host_->Cut();
|
| }
|
| }
|
|
|
| - (void)copy:(id)sender {
|
| if (renderWidgetHostView_->render_widget_host_->IsRenderView()) {
|
| - static_cast<RenderViewHost*>(renderWidgetHostView_->render_widget_host_)->
|
| - Copy();
|
| + renderWidgetHostView_->render_widget_host_->Copy();
|
| }
|
| }
|
|
|
| - (void)copyToFindPboard:(id)sender {
|
| if (renderWidgetHostView_->render_widget_host_->IsRenderView()) {
|
| - static_cast<RenderViewHost*>(renderWidgetHostView_->render_widget_host_)->
|
| - CopyToFindPboard();
|
| + renderWidgetHostView_->render_widget_host_->CopyToFindPboard();
|
| }
|
| }
|
|
|
| - (void)paste:(id)sender {
|
| if (renderWidgetHostView_->render_widget_host_->IsRenderView()) {
|
| - static_cast<RenderViewHost*>(renderWidgetHostView_->render_widget_host_)->
|
| - Paste();
|
| + renderWidgetHostView_->render_widget_host_->Paste();
|
| }
|
| }
|
|
|
| - (void)pasteAsPlainText:(id)sender {
|
| if (renderWidgetHostView_->render_widget_host_->IsRenderView()) {
|
| - RenderWidgetHost* rwh = renderWidgetHostView_->render_widget_host_;
|
| - rwh->Send(new ViewMsg_ExecuteEditCommand(
|
| - rwh->routing_id(), "PasteAndMatchStyle", ""));
|
| + RenderWidgetHost* rwh = renderWidgetHostView_->render_widget_host_;
|
| + rwh->ExecuteEditCommand("PasteAndMatchStyle", "");
|
| }
|
| }
|
|
|
| @@ -2844,14 +2827,14 @@
|
| [super viewWillStartLiveResize];
|
| RenderWidgetHost* widget = renderWidgetHostView_->render_widget_host_;
|
| if (widget)
|
| - widget->Send(new ViewMsg_SetInLiveResize(widget->routing_id(), true));
|
| + widget->NotifyInLiveResize(true);
|
| }
|
|
|
| - (void)viewDidEndLiveResize {
|
| [super viewDidEndLiveResize];
|
| RenderWidgetHost* widget = renderWidgetHostView_->render_widget_host_;
|
| if (widget)
|
| - widget->Send(new ViewMsg_SetInLiveResize(widget->routing_id(), false));
|
| + widget->NotifyInLiveResize(false);
|
| }
|
|
|
| @end
|
|
|