| 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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 2420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2431 ops, | 2431 ops, |
| 2432 key_modifiers); | 2432 key_modifiers); |
| 2433 | 2433 |
| 2434 Send(new DragHostMsg_UpdateDragCursor(routing_id(), operation)); | 2434 Send(new DragHostMsg_UpdateDragCursor(routing_id(), operation)); |
| 2435 } | 2435 } |
| 2436 | 2436 |
| 2437 void RenderViewImpl::OnDragTargetDragLeave() { | 2437 void RenderViewImpl::OnDragTargetDragLeave() { |
| 2438 webview()->dragTargetDragLeave(); | 2438 webview()->dragTargetDragLeave(); |
| 2439 } | 2439 } |
| 2440 | 2440 |
| 2441 void RenderViewImpl::OnDragTargetDrop(const gfx::Point& client_point, | 2441 void RenderViewImpl::OnDragTargetDrop(const DropData& drop_data, |
| 2442 bool is_valid_drop_data, |
| 2443 const gfx::Point& client_point, |
| 2442 const gfx::Point& screen_point, | 2444 const gfx::Point& screen_point, |
| 2443 int key_modifiers) { | 2445 int key_modifiers) { |
| 2444 webview()->dragTargetDrop(client_point, screen_point, key_modifiers); | 2446 blink::WebDragData web_drag_data; |
| 2447 if (is_valid_drop_data) { |
| 2448 web_drag_data = DropDataToWebDragData(drop_data); |
| 2449 } |
| 2450 webview()->dragTargetDrop(web_drag_data, client_point, screen_point, |
| 2451 key_modifiers); |
| 2445 } | 2452 } |
| 2446 | 2453 |
| 2447 void RenderViewImpl::OnDragSourceEnded(const gfx::Point& client_point, | 2454 void RenderViewImpl::OnDragSourceEnded(const gfx::Point& client_point, |
| 2448 const gfx::Point& screen_point, | 2455 const gfx::Point& screen_point, |
| 2449 WebDragOperation op) { | 2456 WebDragOperation op) { |
| 2450 webview()->dragSourceEndedAt(client_point, screen_point, op); | 2457 webview()->dragSourceEndedAt(client_point, screen_point, op); |
| 2451 } | 2458 } |
| 2452 | 2459 |
| 2453 void RenderViewImpl::OnDragSourceSystemDragEnded() { | 2460 void RenderViewImpl::OnDragSourceSystemDragEnded() { |
| 2454 webview()->dragSourceSystemDragEnded(); | 2461 webview()->dragSourceSystemDragEnded(); |
| (...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3537 if (IsUseZoomForDSFEnabled()) { | 3544 if (IsUseZoomForDSFEnabled()) { |
| 3538 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3545 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 3539 } else { | 3546 } else { |
| 3540 webview()->setDeviceScaleFactor(device_scale_factor_); | 3547 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 3541 } | 3548 } |
| 3542 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3549 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 3543 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3550 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 3544 } | 3551 } |
| 3545 | 3552 |
| 3546 } // namespace content | 3553 } // namespace content |
| OLD | NEW |