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

Side by Side Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 126081: Fix a UMR that happens while trying to forward mouse events. (Closed)
Patch Set: Created 11 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/renderer_host/render_view_host.h" 5 #include "chrome/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 void RenderViewHost::NotifyRendererResponsive() { 1404 void RenderViewHost::NotifyRendererResponsive() {
1405 delegate_->RendererResponsive(this); 1405 delegate_->RendererResponsive(this);
1406 } 1406 }
1407 1407
1408 gfx::Rect RenderViewHost::GetRootWindowResizerRect() const { 1408 gfx::Rect RenderViewHost::GetRootWindowResizerRect() const {
1409 return delegate_->GetRootWindowResizerRect(); 1409 return delegate_->GetRootWindowResizerRect();
1410 } 1410 }
1411 1411
1412 void RenderViewHost::ForwardMouseEvent( 1412 void RenderViewHost::ForwardMouseEvent(
1413 const WebKit::WebMouseEvent& mouse_event) { 1413 const WebKit::WebMouseEvent& mouse_event) {
1414 RenderWidgetHost::ForwardMouseEvent(mouse_event); 1414 // We make a copy of the mouse event because
1415 // RenderWidgetHost::ForwardMouseEvent will delete |mouse_event|.
1416 WebKit::WebMouseEvent event_copy(mouse_event);
1417 RenderWidgetHost::ForwardMouseEvent(event_copy);
1415 1418
1416 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); 1419 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
1417 if (view) { 1420 if (view) {
1418 switch (mouse_event.type) { 1421 switch (event_copy.type) {
1419 case WebInputEvent::MouseMove: 1422 case WebInputEvent::MouseMove:
1420 view->HandleMouseEvent(); 1423 view->HandleMouseEvent();
1421 break; 1424 break;
1422 case WebInputEvent::MouseLeave: 1425 case WebInputEvent::MouseLeave:
1423 view->HandleMouseLeave(); 1426 view->HandleMouseLeave();
1424 break; 1427 break;
1425 default: 1428 default:
1426 // For now, we don't care about the rest. 1429 // For now, we don't care about the rest.
1427 break; 1430 break;
1428 } 1431 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 } 1479 }
1477 1480
1478 void RenderViewHost::OnAccessibilityFocusChange(int acc_obj_id) { 1481 void RenderViewHost::OnAccessibilityFocusChange(int acc_obj_id) {
1479 #if defined(OS_WIN) 1482 #if defined(OS_WIN)
1480 BrowserAccessibilityManager::GetInstance()-> 1483 BrowserAccessibilityManager::GetInstance()->
1481 ChangeAccessibilityFocus(acc_obj_id, process()->pid(), routing_id()); 1484 ChangeAccessibilityFocus(acc_obj_id, process()->pid(), routing_id());
1482 #else 1485 #else
1483 // TODO(port): accessibility not yet implemented. See http://crbug.com/8288. 1486 // TODO(port): accessibility not yet implemented. See http://crbug.com/8288.
1484 #endif 1487 #endif
1485 } 1488 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698