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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 14487003: Add a new pair of IPC categories for messages that need handling as input events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addresses feedback Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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/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
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(InputHostMsg_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
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 InputMsg_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 InputMsg_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 InputMsg_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
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 InputMsg_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
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 InputMsg_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 InputMsg_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
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 InputMsg_SetEditCommandsForNextKeyEvent(GetRoutingID(), commands));
2282 } 2283 }
2283 2284
2284 void RenderWidgetHostImpl::SetAccessibilityMode(AccessibilityMode mode) { 2285 void RenderWidgetHostImpl::SetAccessibilityMode(AccessibilityMode mode) {
2285 accessibility_mode_ = mode; 2286 accessibility_mode_ = mode;
2286 Send(new ViewMsg_SetAccessibilityMode(routing_id_, mode)); 2287 Send(new ViewMsg_SetAccessibilityMode(routing_id_, mode));
2287 } 2288 }
2288 2289
2289 void RenderWidgetHostImpl::AccessibilityDoDefaultAction(int object_id) { 2290 void RenderWidgetHostImpl::AccessibilityDoDefaultAction(int object_id) {
2290 Send(new AccessibilityMsg_DoDefaultAction(GetRoutingID(), object_id)); 2291 Send(new AccessibilityMsg_DoDefaultAction(GetRoutingID(), object_id));
2291 } 2292 }
(...skipping 19 matching lines...) Expand all
2311 Send(new AccessibilityMsg_SetTextSelection( 2312 Send(new AccessibilityMsg_SetTextSelection(
2312 GetRoutingID(), object_id, start_offset, end_offset)); 2313 GetRoutingID(), object_id, start_offset, end_offset));
2313 } 2314 }
2314 2315
2315 void RenderWidgetHostImpl::FatalAccessibilityTreeError() { 2316 void RenderWidgetHostImpl::FatalAccessibilityTreeError() {
2316 Send(new AccessibilityMsg_FatalError(GetRoutingID())); 2317 Send(new AccessibilityMsg_FatalError(GetRoutingID()));
2317 } 2318 }
2318 2319
2319 void RenderWidgetHostImpl::ExecuteEditCommand(const std::string& command, 2320 void RenderWidgetHostImpl::ExecuteEditCommand(const std::string& command,
2320 const std::string& value) { 2321 const std::string& value) {
2321 Send(new ViewMsg_ExecuteEditCommand(GetRoutingID(), command, value)); 2322 Send(new InputMsg_ExecuteEditCommand(GetRoutingID(), command, value));
2322 } 2323 }
2323 2324
2324 void RenderWidgetHostImpl::ScrollFocusedEditableNodeIntoRect( 2325 void RenderWidgetHostImpl::ScrollFocusedEditableNodeIntoRect(
2325 const gfx::Rect& rect) { 2326 const gfx::Rect& rect) {
2326 Send(new ViewMsg_ScrollFocusedEditableNodeIntoRect(GetRoutingID(), rect)); 2327 Send(new InputMsg_ScrollFocusedEditableNodeIntoRect(GetRoutingID(), rect));
2327 } 2328 }
2328 2329
2329 void RenderWidgetHostImpl::SelectRange(const gfx::Point& start, 2330 void RenderWidgetHostImpl::SelectRange(const gfx::Point& start,
2330 const gfx::Point& end) { 2331 const gfx::Point& end) {
2331 if (select_range_pending_) { 2332 if (select_range_pending_) {
2332 if (!next_selection_range_) { 2333 if (!next_selection_range_) {
2333 next_selection_range_.reset(new SelectionRange()); 2334 next_selection_range_.reset(new SelectionRange());
2334 } 2335 }
2335 next_selection_range_->start = start; 2336 next_selection_range_->start = start;
2336 next_selection_range_->end = end; 2337 next_selection_range_->end = end;
2337 return; 2338 return;
2338 } 2339 }
2339 2340
2340 select_range_pending_ = true; 2341 select_range_pending_ = true;
2341 Send(new ViewMsg_SelectRange(GetRoutingID(), start, end)); 2342 Send(new InputMsg_SelectRange(GetRoutingID(), start, end));
2342 } 2343 }
2343 2344
2344 void RenderWidgetHostImpl::MoveCaret(const gfx::Point& point) { 2345 void RenderWidgetHostImpl::MoveCaret(const gfx::Point& point) {
2345 if (move_caret_pending_) { 2346 if (move_caret_pending_) {
2346 next_move_caret_.reset(new gfx::Point(point)); 2347 next_move_caret_.reset(new gfx::Point(point));
2347 return; 2348 return;
2348 } 2349 }
2349 2350
2350 move_caret_pending_ = true; 2351 move_caret_pending_ = true;
2351 Send(new ViewMsg_MoveCaret(GetRoutingID(), point)); 2352 Send(new InputMsg_MoveCaret(GetRoutingID(), point));
2352 } 2353 }
2353 2354
2354 void RenderWidgetHostImpl::Undo() { 2355 void RenderWidgetHostImpl::Undo() {
2355 Send(new ViewMsg_Undo(GetRoutingID())); 2356 Send(new InputMsg_Undo(GetRoutingID()));
2356 RecordAction(UserMetricsAction("Undo")); 2357 RecordAction(UserMetricsAction("Undo"));
2357 } 2358 }
2358 2359
2359 void RenderWidgetHostImpl::Redo() { 2360 void RenderWidgetHostImpl::Redo() {
2360 Send(new ViewMsg_Redo(GetRoutingID())); 2361 Send(new InputMsg_Redo(GetRoutingID()));
2361 RecordAction(UserMetricsAction("Redo")); 2362 RecordAction(UserMetricsAction("Redo"));
2362 } 2363 }
2363 2364
2364 void RenderWidgetHostImpl::Cut() { 2365 void RenderWidgetHostImpl::Cut() {
2365 Send(new ViewMsg_Cut(GetRoutingID())); 2366 Send(new InputMsg_Cut(GetRoutingID()));
2366 RecordAction(UserMetricsAction("Cut")); 2367 RecordAction(UserMetricsAction("Cut"));
2367 } 2368 }
2368 2369
2369 void RenderWidgetHostImpl::Copy() { 2370 void RenderWidgetHostImpl::Copy() {
2370 Send(new ViewMsg_Copy(GetRoutingID())); 2371 Send(new InputMsg_Copy(GetRoutingID()));
2371 RecordAction(UserMetricsAction("Copy")); 2372 RecordAction(UserMetricsAction("Copy"));
2372 } 2373 }
2373 2374
2374 void RenderWidgetHostImpl::CopyToFindPboard() { 2375 void RenderWidgetHostImpl::CopyToFindPboard() {
2375 #if defined(OS_MACOSX) 2376 #if defined(OS_MACOSX)
2376 // Windows/Linux don't have the concept of a find pasteboard. 2377 // Windows/Linux don't have the concept of a find pasteboard.
2377 Send(new ViewMsg_CopyToFindPboard(GetRoutingID())); 2378 Send(new InputMsg_CopyToFindPboard(GetRoutingID()));
2378 RecordAction(UserMetricsAction("CopyToFindPboard")); 2379 RecordAction(UserMetricsAction("CopyToFindPboard"));
2379 #endif 2380 #endif
2380 } 2381 }
2381 2382
2382 void RenderWidgetHostImpl::Paste() { 2383 void RenderWidgetHostImpl::Paste() {
2383 Send(new ViewMsg_Paste(GetRoutingID())); 2384 Send(new InputMsg_Paste(GetRoutingID()));
2384 RecordAction(UserMetricsAction("Paste")); 2385 RecordAction(UserMetricsAction("Paste"));
2385 } 2386 }
2386 2387
2387 void RenderWidgetHostImpl::PasteAndMatchStyle() { 2388 void RenderWidgetHostImpl::PasteAndMatchStyle() {
2388 Send(new ViewMsg_PasteAndMatchStyle(GetRoutingID())); 2389 Send(new InputMsg_PasteAndMatchStyle(GetRoutingID()));
2389 RecordAction(UserMetricsAction("PasteAndMatchStyle")); 2390 RecordAction(UserMetricsAction("PasteAndMatchStyle"));
2390 } 2391 }
2391 2392
2392 void RenderWidgetHostImpl::Delete() { 2393 void RenderWidgetHostImpl::Delete() {
2393 Send(new ViewMsg_Delete(GetRoutingID())); 2394 Send(new InputMsg_Delete(GetRoutingID()));
2394 RecordAction(UserMetricsAction("DeleteSelection")); 2395 RecordAction(UserMetricsAction("DeleteSelection"));
2395 } 2396 }
2396 2397
2397 void RenderWidgetHostImpl::SelectAll() { 2398 void RenderWidgetHostImpl::SelectAll() {
2398 Send(new ViewMsg_SelectAll(GetRoutingID())); 2399 Send(new InputMsg_SelectAll(GetRoutingID()));
2399 RecordAction(UserMetricsAction("SelectAll")); 2400 RecordAction(UserMetricsAction("SelectAll"));
2400 } 2401 }
2401 bool RenderWidgetHostImpl::GotResponseToLockMouseRequest(bool allowed) { 2402 bool RenderWidgetHostImpl::GotResponseToLockMouseRequest(bool allowed) {
2402 if (!allowed) { 2403 if (!allowed) {
2403 RejectMouseLockOrUnlockIfNecessary(); 2404 RejectMouseLockOrUnlockIfNecessary();
2404 return false; 2405 return false;
2405 } else { 2406 } else {
2406 if (!pending_mouse_lock_request_) { 2407 if (!pending_mouse_lock_request_) {
2407 // This is possible, e.g., the plugin sends us an unlock request before 2408 // This is possible, e.g., the plugin sends us an unlock request before
2408 // the user allows to lock to mouse. 2409 // the user allows to lock to mouse.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
2470 return; 2471 return;
2471 2472
2472 OnRenderAutoResized(new_size); 2473 OnRenderAutoResized(new_size);
2473 } 2474 }
2474 2475
2475 void RenderWidgetHostImpl::DetachDelegate() { 2476 void RenderWidgetHostImpl::DetachDelegate() {
2476 delegate_ = NULL; 2477 delegate_ = NULL;
2477 } 2478 }
2478 2479
2479 } // namespace content 2480 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698