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

Side by Side Diff: webkit/glue/webview_impl.cc

Issue 159040: Fix another d&d crash that happens when the tab contents (Closed)
Patch Set: revise comment Created 11 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/views/tab_contents/tab_contents_view_win.cc ('k') | 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 /* 1 /*
2 * Copyright 2007 Google Inc. All Rights Reserved. 2 * Copyright 2007 Google Inc. All Rights Reserved.
3 * 3 *
4 * Portions Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 4 * Portions Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
5 * 5 *
6 * ***** BEGIN LICENSE BLOCK ***** 6 * ***** BEGIN LICENSE BLOCK *****
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after
1581 const WebPoint& client_point, 1581 const WebPoint& client_point,
1582 const WebPoint& screen_point) { 1582 const WebPoint& screen_point) {
1583 PlatformMouseEvent pme(webkit_glue::WebPointToIntPoint(client_point), 1583 PlatformMouseEvent pme(webkit_glue::WebPointToIntPoint(client_point),
1584 webkit_glue::WebPointToIntPoint(screen_point), 1584 webkit_glue::WebPointToIntPoint(screen_point),
1585 LeftButton, MouseEventMoved, 0, false, false, false, 1585 LeftButton, MouseEventMoved, 0, false, false, false,
1586 false, 0); 1586 false, 0);
1587 page_->mainFrame()->eventHandler()->dragSourceMovedTo(pme); 1587 page_->mainFrame()->eventHandler()->dragSourceMovedTo(pme);
1588 } 1588 }
1589 1589
1590 void WebViewImpl::DragSourceSystemDragEnded() { 1590 void WebViewImpl::DragSourceSystemDragEnded() {
1591 page_->dragController()->dragEnded(); 1591 // It's possible for us to get this callback while not doing a drag if
1592 DCHECK(doing_drag_and_drop_); 1592 // it's from a previous page that got unloaded.
1593 doing_drag_and_drop_ = false; 1593 if (doing_drag_and_drop_) {
1594 page_->dragController()->dragEnded();
1595 doing_drag_and_drop_ = false;
1596 }
1594 } 1597 }
1595 1598
1596 bool WebViewImpl::DragTargetDragEnter( 1599 bool WebViewImpl::DragTargetDragEnter(
1597 const WebDragData& web_drag_data, 1600 const WebDragData& web_drag_data,
1598 int identity, 1601 int identity,
1599 const WebPoint& client_point, 1602 const WebPoint& client_point,
1600 const WebPoint& screen_point) { 1603 const WebPoint& screen_point) {
1601 DCHECK(!current_drag_data_.get()); 1604 DCHECK(!current_drag_data_.get());
1602 1605
1603 current_drag_data_ = 1606 current_drag_data_ =
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 1902
1900 return document->focusedNode(); 1903 return document->focusedNode();
1901 } 1904 }
1902 1905
1903 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) { 1906 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) {
1904 IntPoint doc_point( 1907 IntPoint doc_point(
1905 page_->mainFrame()->view()->windowToContents(pos)); 1908 page_->mainFrame()->view()->windowToContents(pos));
1906 return page_->mainFrame()->eventHandler()-> 1909 return page_->mainFrame()->eventHandler()->
1907 hitTestResultAtPoint(doc_point, false); 1910 hitTestResultAtPoint(doc_point, false);
1908 } 1911 }
OLDNEW
« no previous file with comments | « chrome/browser/views/tab_contents/tab_contents_view_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698