| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 3692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3703 static_cast<DragOperation>(m_operationsAllowed)); | 3703 static_cast<DragOperation>(m_operationsAllowed)); |
| 3704 | 3704 |
| 3705 m_page->dragController().dragExited(&dragData); | 3705 m_page->dragController().dragExited(&dragData); |
| 3706 | 3706 |
| 3707 // FIXME: why is the drag scroll timer not stopped here? | 3707 // FIXME: why is the drag scroll timer not stopped here? |
| 3708 | 3708 |
| 3709 m_dragOperation = WebDragOperationNone; | 3709 m_dragOperation = WebDragOperationNone; |
| 3710 m_currentDragData = nullptr; | 3710 m_currentDragData = nullptr; |
| 3711 } | 3711 } |
| 3712 | 3712 |
| 3713 void WebViewImpl::dragTargetDrop(const WebPoint& clientPoint, | 3713 void WebViewImpl::dragTargetDrop(const WebDragData& webDragData, const WebPoint&
clientPoint, |
| 3714 const WebPoint& screenPoint, | 3714 const WebPoint& screenPoint, |
| 3715 int modifiers) | 3715 int modifiers) |
| 3716 { | 3716 { |
| 3717 DCHECK(m_currentDragData); | 3717 DCHECK(m_currentDragData); |
| 3718 m_currentDragData = DataObject::create(webDragData); |
| 3718 | 3719 |
| 3719 WebAutofillClient* autofillClient = mainFrameImpl() ? mainFrameImpl()->autof
illClient() : 0; | 3720 WebAutofillClient* autofillClient = mainFrameImpl() ? mainFrameImpl()->autof
illClient() : 0; |
| 3720 UserGestureNotifier notifier(autofillClient, &m_userGestureObserved); | 3721 UserGestureNotifier notifier(autofillClient, &m_userGestureObserved); |
| 3721 | 3722 |
| 3722 // If this webview transitions from the "drop accepting" state to the "not | 3723 // If this webview transitions from the "drop accepting" state to the "not |
| 3723 // accepting" state, then our IPC message reply indicating that may be in- | 3724 // accepting" state, then our IPC message reply indicating that may be in- |
| 3724 // flight, or else delayed by javascript processing in this webview. If a | 3725 // flight, or else delayed by javascript processing in this webview. If a |
| 3725 // drop happens before our IPC reply has reached the browser process, then | 3726 // drop happens before our IPC reply has reached the browser process, then |
| 3726 // the browser forwards the drop to this webview. So only allow a drop to | 3727 // the browser forwards the drop to this webview. So only allow a drop to |
| 3727 // proceed if our webview m_dragOperation state is not DragOperationNone. | 3728 // proceed if our webview m_dragOperation state is not DragOperationNone. |
| (...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4556 { | 4557 { |
| 4557 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4558 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
| 4558 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4559 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
| 4559 if (!page()) | 4560 if (!page()) |
| 4560 return 1; | 4561 return 1; |
| 4561 | 4562 |
| 4562 return page()->deviceScaleFactor(); | 4563 return page()->deviceScaleFactor(); |
| 4563 } | 4564 } |
| 4564 | 4565 |
| 4565 } // namespace blink | 4566 } // namespace blink |
| OLD | NEW |