| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "content/browser/renderer_host/overscroll_controller.h" | 30 #include "content/browser/renderer_host/overscroll_controller.h" |
| 31 #include "content/browser/renderer_host/render_process_host_impl.h" | 31 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 32 #include "content/browser/renderer_host/render_view_host_impl.h" | 32 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 33 #include "content/browser/renderer_host/render_widget_helper.h" | 33 #include "content/browser/renderer_host/render_widget_helper.h" |
| 34 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 34 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
| 35 #include "content/browser/renderer_host/touch_event_queue.h" | 35 #include "content/browser/renderer_host/touch_event_queue.h" |
| 36 #include "content/browser/renderer_host/touchpad_tap_suppression_controller.h" | 36 #include "content/browser/renderer_host/touchpad_tap_suppression_controller.h" |
| 37 #include "content/common/accessibility_messages.h" | 37 #include "content/common/accessibility_messages.h" |
| 38 #include "content/common/content_constants_internal.h" | 38 #include "content/common/content_constants_internal.h" |
| 39 #include "content/common/gpu/gpu_messages.h" | 39 #include "content/common/gpu/gpu_messages.h" |
| 40 #include "content/common/view_input_messages.h" |
| 40 #include "content/common/view_messages.h" | 41 #include "content/common/view_messages.h" |
| 41 #include "content/port/browser/render_widget_host_view_port.h" | 42 #include "content/port/browser/render_widget_host_view_port.h" |
| 42 #include "content/port/browser/smooth_scroll_gesture.h" | 43 #include "content/port/browser/smooth_scroll_gesture.h" |
| 43 #include "content/public/browser/compositor_util.h" | 44 #include "content/public/browser/compositor_util.h" |
| 44 #include "content/public/browser/native_web_keyboard_event.h" | 45 #include "content/public/browser/native_web_keyboard_event.h" |
| 45 #include "content/public/browser/notification_service.h" | 46 #include "content/public/browser/notification_service.h" |
| 46 #include "content/public/browser/notification_types.h" | 47 #include "content/public/browser/notification_types.h" |
| 47 #include "content/public/browser/user_metrics.h" | 48 #include "content/public/browser/user_metrics.h" |
| 48 #include "content/public/common/content_constants.h" | 49 #include "content/public/common/content_constants.h" |
| 49 #include "content/public/common/content_switches.h" | 50 #include "content/public/common/content_switches.h" |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 OnUpdateScreenRectsAck) | 364 OnUpdateScreenRectsAck) |
| 364 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) | 365 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) |
| 365 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText) | 366 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText) |
| 366 IPC_MESSAGE_HANDLER(ViewHostMsg_PaintAtSize_ACK, OnPaintAtSizeAck) | 367 IPC_MESSAGE_HANDLER(ViewHostMsg_PaintAtSize_ACK, OnPaintAtSizeAck) |
| 367 IPC_MESSAGE_HANDLER(ViewHostMsg_CompositorSurfaceBuffersSwapped, | 368 IPC_MESSAGE_HANDLER(ViewHostMsg_CompositorSurfaceBuffersSwapped, |
| 368 OnCompositorSurfaceBuffersSwapped) | 369 OnCompositorSurfaceBuffersSwapped) |
| 369 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_SwapCompositorFrame, | 370 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_SwapCompositorFrame, |
| 370 msg_is_ok = OnSwapCompositorFrame(msg)) | 371 msg_is_ok = OnSwapCompositorFrame(msg)) |
| 371 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) | 372 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) |
| 372 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateIsDelayed, OnUpdateIsDelayed) | 373 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateIsDelayed, OnUpdateIsDelayed) |
| 373 IPC_MESSAGE_HANDLER(ViewHostMsg_HandleInputEvent_ACK, OnInputEventAck) | 374 IPC_MESSAGE_HANDLER(ViewInputHostMsg_HandleInputEvent_ACK, OnInputEventAck) |
| 374 IPC_MESSAGE_HANDLER(ViewHostMsg_BeginSmoothScroll, OnBeginSmoothScroll) | 375 IPC_MESSAGE_HANDLER(ViewHostMsg_BeginSmoothScroll, OnBeginSmoothScroll) |
| 375 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectRange_ACK, OnSelectRangeAck) | 376 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectRange_ACK, OnSelectRangeAck) |
| 376 IPC_MESSAGE_HANDLER(ViewHostMsg_MoveCaret_ACK, OnMsgMoveCaretAck) | 377 IPC_MESSAGE_HANDLER(ViewHostMsg_MoveCaret_ACK, OnMsgMoveCaretAck) |
| 377 IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnFocus) | 378 IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnFocus) |
| 378 IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnBlur) | 379 IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnBlur) |
| 379 IPC_MESSAGE_HANDLER(ViewHostMsg_HasTouchEventHandlers, | 380 IPC_MESSAGE_HANDLER(ViewHostMsg_HasTouchEventHandlers, |
| 380 OnHasTouchEventHandlers) | 381 OnHasTouchEventHandlers) |
| 381 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor) | 382 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor) |
| 382 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, | 383 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, |
| 383 OnTextInputStateChanged) | 384 OnTextInputStateChanged) |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 | 531 |
| 531 void RenderWidgetHostImpl::ResizeRectChanged(const gfx::Rect& new_rect) { | 532 void RenderWidgetHostImpl::ResizeRectChanged(const gfx::Rect& new_rect) { |
| 532 Send(new ViewMsg_ChangeResizeRect(routing_id_, new_rect)); | 533 Send(new ViewMsg_ChangeResizeRect(routing_id_, new_rect)); |
| 533 } | 534 } |
| 534 | 535 |
| 535 void RenderWidgetHostImpl::GotFocus() { | 536 void RenderWidgetHostImpl::GotFocus() { |
| 536 Focus(); | 537 Focus(); |
| 537 } | 538 } |
| 538 | 539 |
| 539 void RenderWidgetHostImpl::Focus() { | 540 void RenderWidgetHostImpl::Focus() { |
| 540 Send(new ViewMsg_SetFocus(routing_id_, true)); | 541 Send(new ViewInputMsg_SetFocus(routing_id_, true)); |
| 541 } | 542 } |
| 542 | 543 |
| 543 void RenderWidgetHostImpl::Blur() { | 544 void RenderWidgetHostImpl::Blur() { |
| 544 // If there is a pending mouse lock request, we don't want to reject it at | 545 // If there is a pending mouse lock request, we don't want to reject it at |
| 545 // this point. The user can switch focus back to this view and approve the | 546 // this point. The user can switch focus back to this view and approve the |
| 546 // request later. | 547 // request later. |
| 547 if (IsMouseLocked()) | 548 if (IsMouseLocked()) |
| 548 view_->UnlockMouse(); | 549 view_->UnlockMouse(); |
| 549 | 550 |
| 550 Send(new ViewMsg_SetFocus(routing_id_, false)); | 551 Send(new ViewInputMsg_SetFocus(routing_id_, false)); |
| 551 } | 552 } |
| 552 | 553 |
| 553 void RenderWidgetHostImpl::LostCapture() { | 554 void RenderWidgetHostImpl::LostCapture() { |
| 554 Send(new ViewMsg_MouseCaptureLost(routing_id_)); | 555 Send(new ViewInputMsg_MouseCaptureLost(routing_id_)); |
| 555 } | 556 } |
| 556 | 557 |
| 557 void RenderWidgetHostImpl::SetActive(bool active) { | 558 void RenderWidgetHostImpl::SetActive(bool active) { |
| 558 Send(new ViewMsg_SetActive(routing_id_, active)); | 559 Send(new ViewMsg_SetActive(routing_id_, active)); |
| 559 } | 560 } |
| 560 | 561 |
| 561 void RenderWidgetHostImpl::LostMouseLock() { | 562 void RenderWidgetHostImpl::LostMouseLock() { |
| 562 Send(new ViewMsg_MouseLockLost(routing_id_)); | 563 Send(new ViewMsg_MouseLockLost(routing_id_)); |
| 563 } | 564 } |
| 564 | 565 |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1143 // Only forward the non-native portions of our event. | 1144 // Only forward the non-native portions of our event. |
| 1144 ForwardInputEvent(key_event, sizeof(WebKeyboardEvent), | 1145 ForwardInputEvent(key_event, sizeof(WebKeyboardEvent), |
| 1145 is_keyboard_shortcut); | 1146 is_keyboard_shortcut); |
| 1146 } | 1147 } |
| 1147 } | 1148 } |
| 1148 | 1149 |
| 1149 void RenderWidgetHostImpl::SendInputEvent(const WebInputEvent& input_event, | 1150 void RenderWidgetHostImpl::SendInputEvent(const WebInputEvent& input_event, |
| 1150 int event_size, | 1151 int event_size, |
| 1151 bool is_keyboard_shortcut) { | 1152 bool is_keyboard_shortcut) { |
| 1152 input_event_start_time_ = TimeTicks::Now(); | 1153 input_event_start_time_ = TimeTicks::Now(); |
| 1153 Send(new ViewMsg_HandleInputEvent( | 1154 Send(new ViewInputMsg_HandleInputEvent( |
| 1154 routing_id_, &input_event, is_keyboard_shortcut)); | 1155 routing_id_, &input_event, is_keyboard_shortcut)); |
| 1155 increment_in_flight_event_count(); | 1156 increment_in_flight_event_count(); |
| 1156 } | 1157 } |
| 1157 | 1158 |
| 1158 void RenderWidgetHostImpl::ForwardInputEvent(const WebInputEvent& input_event, | 1159 void RenderWidgetHostImpl::ForwardInputEvent(const WebInputEvent& input_event, |
| 1159 int event_size, | 1160 int event_size, |
| 1160 bool is_keyboard_shortcut) { | 1161 bool is_keyboard_shortcut) { |
| 1161 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::ForwardInputEvent"); | 1162 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::ForwardInputEvent"); |
| 1162 | 1163 |
| 1163 if (!process_->HasConnection()) | 1164 if (!process_->HasConnection()) |
| (...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2184 // TODO(darin): do we need to do something else if our backing store is not | 2185 // TODO(darin): do we need to do something else if our backing store is not |
| 2185 // the same size as the advertised view? maybe we just assume there is a | 2186 // the same size as the advertised view? maybe we just assume there is a |
| 2186 // full paint on its way? | 2187 // full paint on its way? |
| 2187 BackingStore* backing_store = BackingStoreManager::Lookup(this); | 2188 BackingStore* backing_store = BackingStoreManager::Lookup(this); |
| 2188 if (!backing_store || (backing_store->size() != view_size)) | 2189 if (!backing_store || (backing_store->size() != view_size)) |
| 2189 return; | 2190 return; |
| 2190 backing_store->ScrollBackingStore(delta, clip_rect, view_size); | 2191 backing_store->ScrollBackingStore(delta, clip_rect, view_size); |
| 2191 } | 2192 } |
| 2192 | 2193 |
| 2193 void RenderWidgetHostImpl::Replace(const string16& word) { | 2194 void RenderWidgetHostImpl::Replace(const string16& word) { |
| 2194 Send(new ViewMsg_Replace(routing_id_, word)); | 2195 Send(new ViewInputMsg_Replace(routing_id_, word)); |
| 2195 } | 2196 } |
| 2196 | 2197 |
| 2197 void RenderWidgetHostImpl::ReplaceMisspelling(const string16& word) { | 2198 void RenderWidgetHostImpl::ReplaceMisspelling(const string16& word) { |
| 2198 Send(new ViewMsg_ReplaceMisspelling(routing_id_, word)); | 2199 Send(new ViewInputMsg_ReplaceMisspelling(routing_id_, word)); |
| 2199 } | 2200 } |
| 2200 | 2201 |
| 2201 void RenderWidgetHostImpl::SetIgnoreInputEvents(bool ignore_input_events) { | 2202 void RenderWidgetHostImpl::SetIgnoreInputEvents(bool ignore_input_events) { |
| 2202 ignore_input_events_ = ignore_input_events; | 2203 ignore_input_events_ = ignore_input_events; |
| 2203 } | 2204 } |
| 2204 | 2205 |
| 2205 bool RenderWidgetHostImpl::KeyPressListenersHandleEvent( | 2206 bool RenderWidgetHostImpl::KeyPressListenersHandleEvent( |
| 2206 const NativeWebKeyboardEvent& event) { | 2207 const NativeWebKeyboardEvent& event) { |
| 2207 if (event.skip_in_browser || event.type != WebKeyboardEvent::RawKeyDown) | 2208 if (event.skip_in_browser || event.type != WebKeyboardEvent::RawKeyDown) |
| 2208 return false; | 2209 return false; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2271 void RenderWidgetHostImpl::Stop() { | 2272 void RenderWidgetHostImpl::Stop() { |
| 2272 Send(new ViewMsg_Stop(GetRoutingID())); | 2273 Send(new ViewMsg_Stop(GetRoutingID())); |
| 2273 } | 2274 } |
| 2274 | 2275 |
| 2275 void RenderWidgetHostImpl::SetBackground(const SkBitmap& background) { | 2276 void RenderWidgetHostImpl::SetBackground(const SkBitmap& background) { |
| 2276 Send(new ViewMsg_SetBackground(GetRoutingID(), background)); | 2277 Send(new ViewMsg_SetBackground(GetRoutingID(), background)); |
| 2277 } | 2278 } |
| 2278 | 2279 |
| 2279 void RenderWidgetHostImpl::SetEditCommandsForNextKeyEvent( | 2280 void RenderWidgetHostImpl::SetEditCommandsForNextKeyEvent( |
| 2280 const std::vector<EditCommand>& commands) { | 2281 const std::vector<EditCommand>& commands) { |
| 2281 Send(new ViewMsg_SetEditCommandsForNextKeyEvent(GetRoutingID(), commands)); | 2282 Send(new ViewInputMsg_SetEditCommandsForNextKeyEvent(GetRoutingID(), |
| 2283 commands)); |
| 2282 } | 2284 } |
| 2283 | 2285 |
| 2284 void RenderWidgetHostImpl::SetAccessibilityMode(AccessibilityMode mode) { | 2286 void RenderWidgetHostImpl::SetAccessibilityMode(AccessibilityMode mode) { |
| 2285 accessibility_mode_ = mode; | 2287 accessibility_mode_ = mode; |
| 2286 Send(new ViewMsg_SetAccessibilityMode(routing_id_, mode)); | 2288 Send(new ViewMsg_SetAccessibilityMode(routing_id_, mode)); |
| 2287 } | 2289 } |
| 2288 | 2290 |
| 2289 void RenderWidgetHostImpl::AccessibilityDoDefaultAction(int object_id) { | 2291 void RenderWidgetHostImpl::AccessibilityDoDefaultAction(int object_id) { |
| 2290 Send(new AccessibilityMsg_DoDefaultAction(GetRoutingID(), object_id)); | 2292 Send(new AccessibilityMsg_DoDefaultAction(GetRoutingID(), object_id)); |
| 2291 } | 2293 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2311 Send(new AccessibilityMsg_SetTextSelection( | 2313 Send(new AccessibilityMsg_SetTextSelection( |
| 2312 GetRoutingID(), object_id, start_offset, end_offset)); | 2314 GetRoutingID(), object_id, start_offset, end_offset)); |
| 2313 } | 2315 } |
| 2314 | 2316 |
| 2315 void RenderWidgetHostImpl::FatalAccessibilityTreeError() { | 2317 void RenderWidgetHostImpl::FatalAccessibilityTreeError() { |
| 2316 Send(new AccessibilityMsg_FatalError(GetRoutingID())); | 2318 Send(new AccessibilityMsg_FatalError(GetRoutingID())); |
| 2317 } | 2319 } |
| 2318 | 2320 |
| 2319 void RenderWidgetHostImpl::ExecuteEditCommand(const std::string& command, | 2321 void RenderWidgetHostImpl::ExecuteEditCommand(const std::string& command, |
| 2320 const std::string& value) { | 2322 const std::string& value) { |
| 2321 Send(new ViewMsg_ExecuteEditCommand(GetRoutingID(), command, value)); | 2323 Send(new ViewInputMsg_ExecuteEditCommand(GetRoutingID(), command, value)); |
| 2322 } | 2324 } |
| 2323 | 2325 |
| 2324 void RenderWidgetHostImpl::ScrollFocusedEditableNodeIntoRect( | 2326 void RenderWidgetHostImpl::ScrollFocusedEditableNodeIntoRect( |
| 2325 const gfx::Rect& rect) { | 2327 const gfx::Rect& rect) { |
| 2326 Send(new ViewMsg_ScrollFocusedEditableNodeIntoRect(GetRoutingID(), rect)); | 2328 Send(new ViewInputMsg_ScrollFocusedEditableNodeIntoRect(GetRoutingID(), |
| 2329 rect)); |
| 2327 } | 2330 } |
| 2328 | 2331 |
| 2329 void RenderWidgetHostImpl::SelectRange(const gfx::Point& start, | 2332 void RenderWidgetHostImpl::SelectRange(const gfx::Point& start, |
| 2330 const gfx::Point& end) { | 2333 const gfx::Point& end) { |
| 2331 if (select_range_pending_) { | 2334 if (select_range_pending_) { |
| 2332 if (!next_selection_range_) { | 2335 if (!next_selection_range_) { |
| 2333 next_selection_range_.reset(new SelectionRange()); | 2336 next_selection_range_.reset(new SelectionRange()); |
| 2334 } | 2337 } |
| 2335 next_selection_range_->start = start; | 2338 next_selection_range_->start = start; |
| 2336 next_selection_range_->end = end; | 2339 next_selection_range_->end = end; |
| 2337 return; | 2340 return; |
| 2338 } | 2341 } |
| 2339 | 2342 |
| 2340 select_range_pending_ = true; | 2343 select_range_pending_ = true; |
| 2341 Send(new ViewMsg_SelectRange(GetRoutingID(), start, end)); | 2344 Send(new ViewInputMsg_SelectRange(GetRoutingID(), start, end)); |
| 2342 } | 2345 } |
| 2343 | 2346 |
| 2344 void RenderWidgetHostImpl::MoveCaret(const gfx::Point& point) { | 2347 void RenderWidgetHostImpl::MoveCaret(const gfx::Point& point) { |
| 2345 if (move_caret_pending_) { | 2348 if (move_caret_pending_) { |
| 2346 next_move_caret_.reset(new gfx::Point(point)); | 2349 next_move_caret_.reset(new gfx::Point(point)); |
| 2347 return; | 2350 return; |
| 2348 } | 2351 } |
| 2349 | 2352 |
| 2350 move_caret_pending_ = true; | 2353 move_caret_pending_ = true; |
| 2351 Send(new ViewMsg_MoveCaret(GetRoutingID(), point)); | 2354 Send(new ViewInputMsg_MoveCaret(GetRoutingID(), point)); |
| 2352 } | 2355 } |
| 2353 | 2356 |
| 2354 void RenderWidgetHostImpl::Undo() { | 2357 void RenderWidgetHostImpl::Undo() { |
| 2355 Send(new ViewMsg_Undo(GetRoutingID())); | 2358 Send(new ViewInputMsg_Undo(GetRoutingID())); |
| 2356 RecordAction(UserMetricsAction("Undo")); | 2359 RecordAction(UserMetricsAction("Undo")); |
| 2357 } | 2360 } |
| 2358 | 2361 |
| 2359 void RenderWidgetHostImpl::Redo() { | 2362 void RenderWidgetHostImpl::Redo() { |
| 2360 Send(new ViewMsg_Redo(GetRoutingID())); | 2363 Send(new ViewInputMsg_Redo(GetRoutingID())); |
| 2361 RecordAction(UserMetricsAction("Redo")); | 2364 RecordAction(UserMetricsAction("Redo")); |
| 2362 } | 2365 } |
| 2363 | 2366 |
| 2364 void RenderWidgetHostImpl::Cut() { | 2367 void RenderWidgetHostImpl::Cut() { |
| 2365 Send(new ViewMsg_Cut(GetRoutingID())); | 2368 Send(new ViewInputMsg_Cut(GetRoutingID())); |
| 2366 RecordAction(UserMetricsAction("Cut")); | 2369 RecordAction(UserMetricsAction("Cut")); |
| 2367 } | 2370 } |
| 2368 | 2371 |
| 2369 void RenderWidgetHostImpl::Copy() { | 2372 void RenderWidgetHostImpl::Copy() { |
| 2370 Send(new ViewMsg_Copy(GetRoutingID())); | 2373 Send(new ViewInputMsg_Copy(GetRoutingID())); |
| 2371 RecordAction(UserMetricsAction("Copy")); | 2374 RecordAction(UserMetricsAction("Copy")); |
| 2372 } | 2375 } |
| 2373 | 2376 |
| 2374 void RenderWidgetHostImpl::CopyToFindPboard() { | 2377 void RenderWidgetHostImpl::CopyToFindPboard() { |
| 2375 #if defined(OS_MACOSX) | 2378 #if defined(OS_MACOSX) |
| 2376 // Windows/Linux don't have the concept of a find pasteboard. | 2379 // Windows/Linux don't have the concept of a find pasteboard. |
| 2377 Send(new ViewMsg_CopyToFindPboard(GetRoutingID())); | 2380 Send(new ViewInputMsg_CopyToFindPboard(GetRoutingID())); |
| 2378 RecordAction(UserMetricsAction("CopyToFindPboard")); | 2381 RecordAction(UserMetricsAction("CopyToFindPboard")); |
| 2379 #endif | 2382 #endif |
| 2380 } | 2383 } |
| 2381 | 2384 |
| 2382 void RenderWidgetHostImpl::Paste() { | 2385 void RenderWidgetHostImpl::Paste() { |
| 2383 Send(new ViewMsg_Paste(GetRoutingID())); | 2386 Send(new ViewInputMsg_Paste(GetRoutingID())); |
| 2384 RecordAction(UserMetricsAction("Paste")); | 2387 RecordAction(UserMetricsAction("Paste")); |
| 2385 } | 2388 } |
| 2386 | 2389 |
| 2387 void RenderWidgetHostImpl::PasteAndMatchStyle() { | 2390 void RenderWidgetHostImpl::PasteAndMatchStyle() { |
| 2388 Send(new ViewMsg_PasteAndMatchStyle(GetRoutingID())); | 2391 Send(new ViewInputMsg_PasteAndMatchStyle(GetRoutingID())); |
| 2389 RecordAction(UserMetricsAction("PasteAndMatchStyle")); | 2392 RecordAction(UserMetricsAction("PasteAndMatchStyle")); |
| 2390 } | 2393 } |
| 2391 | 2394 |
| 2392 void RenderWidgetHostImpl::Delete() { | 2395 void RenderWidgetHostImpl::Delete() { |
| 2393 Send(new ViewMsg_Delete(GetRoutingID())); | 2396 Send(new ViewInputMsg_Delete(GetRoutingID())); |
| 2394 RecordAction(UserMetricsAction("DeleteSelection")); | 2397 RecordAction(UserMetricsAction("DeleteSelection")); |
| 2395 } | 2398 } |
| 2396 | 2399 |
| 2397 void RenderWidgetHostImpl::SelectAll() { | 2400 void RenderWidgetHostImpl::SelectAll() { |
| 2398 Send(new ViewMsg_SelectAll(GetRoutingID())); | 2401 Send(new ViewInputMsg_SelectAll(GetRoutingID())); |
| 2399 RecordAction(UserMetricsAction("SelectAll")); | 2402 RecordAction(UserMetricsAction("SelectAll")); |
| 2400 } | 2403 } |
| 2401 bool RenderWidgetHostImpl::GotResponseToLockMouseRequest(bool allowed) { | 2404 bool RenderWidgetHostImpl::GotResponseToLockMouseRequest(bool allowed) { |
| 2402 if (!allowed) { | 2405 if (!allowed) { |
| 2403 RejectMouseLockOrUnlockIfNecessary(); | 2406 RejectMouseLockOrUnlockIfNecessary(); |
| 2404 return false; | 2407 return false; |
| 2405 } else { | 2408 } else { |
| 2406 if (!pending_mouse_lock_request_) { | 2409 if (!pending_mouse_lock_request_) { |
| 2407 // This is possible, e.g., the plugin sends us an unlock request before | 2410 // This is possible, e.g., the plugin sends us an unlock request before |
| 2408 // the user allows to lock to mouse. | 2411 // the user allows to lock to mouse. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2470 return; | 2473 return; |
| 2471 | 2474 |
| 2472 OnRenderAutoResized(new_size); | 2475 OnRenderAutoResized(new_size); |
| 2473 } | 2476 } |
| 2474 | 2477 |
| 2475 void RenderWidgetHostImpl::DetachDelegate() { | 2478 void RenderWidgetHostImpl::DetachDelegate() { |
| 2476 delegate_ = NULL; | 2479 delegate_ = NULL; |
| 2477 } | 2480 } |
| 2478 | 2481 |
| 2479 } // namespace content | 2482 } // namespace content |
| OLD | NEW |