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

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

Issue 10820062: [Mac]: Enable speech sub-menu under the edit menu and pipe it through to the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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_impl.cc
===================================================================
--- content/browser/renderer_host/render_widget_host_impl.cc (revision 148651)
+++ content/browser/renderer_host/render_widget_host_impl.cc (working copy)
@@ -322,6 +322,7 @@
OnAcceleratedSurfaceSetTransportDIB)
IPC_MESSAGE_HANDLER(ViewHostMsg_AcceleratedSurfaceBuffersSwapped,
OnAcceleratedSurfaceBuffersSwapped)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_SpeakText, OnMsgSpeakText)
#endif
#if defined(TOOLKIT_GTK)
IPC_MESSAGE_HANDLER(ViewHostMsg_CreatePluginContainer,
@@ -837,10 +838,10 @@
return;
if (gesture_event_pending_) {
- if (coalesced_gesture_events_.empty() ||
- !ShouldCoalesceGestureEvents(coalesced_gesture_events_.back(),
- gesture_event)) {
- coalesced_gesture_events_.push_back(gesture_event);
+ if (coalesced_gesture_events_.empty() ||
+ !ShouldCoalesceGestureEvents(coalesced_gesture_events_.back(),
+ gesture_event)) {
+ coalesced_gesture_events_.push_back(gesture_event);
} else {
WebGestureEvent* last_gesture_event =
&coalesced_gesture_events_.back();
@@ -1229,7 +1230,7 @@
base::i18n::WrapStringWithRTLFormatting(&wrapped_tooltip_text);
}
}
- if (GetView())
+ if (view_)
view_->SetTooltipText(wrapped_tooltip_text);
}
@@ -1610,7 +1611,6 @@
void RenderWidgetHostImpl::OnMsgLockMouse(bool user_gesture,
bool last_unlocked_by_target,
bool privileged) {
-
if (pending_mouse_lock_request_) {
Send(new ViewMsg_LockMouse_ACK(routing_id_, false));
return;
@@ -1872,6 +1872,14 @@
Send(new ViewMsg_SelectAll(GetRoutingID()));
RecordAction(UserMetricsAction("SelectAll"));
}
+
+void RenderWidgetHostImpl::SpeakSelection() {
+#if defined(OS_MACOSX)
+ Send(new ViewMsg_SpeakSelection(GetRoutingID()));
+ RecordAction(UserMetricsAction("SpeakSelection"));
+#endif
+}
+
bool RenderWidgetHostImpl::GotResponseToLockMouseRequest(bool allowed) {
if (!allowed) {
RejectMouseLockOrUnlockIfNecessary();

Powered by Google App Engine
This is Rietveld 408576698