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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 1605143003: [UseZoomForDSF] Support drag&drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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/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 1929 matching lines...) Expand 10 before | Expand all | Expand 10 after
1940 void RenderViewImpl::setKeyboardFocusURL(const WebURL& url) { 1940 void RenderViewImpl::setKeyboardFocusURL(const WebURL& url) {
1941 focus_url_ = GURL(url); 1941 focus_url_ = GURL(url);
1942 UpdateTargetURL(focus_url_, mouse_over_url_); 1942 UpdateTargetURL(focus_url_, mouse_over_url_);
1943 } 1943 }
1944 1944
1945 void RenderViewImpl::startDragging(WebLocalFrame* frame, 1945 void RenderViewImpl::startDragging(WebLocalFrame* frame,
1946 const WebDragData& data, 1946 const WebDragData& data,
1947 WebDragOperationsMask mask, 1947 WebDragOperationsMask mask,
1948 const WebImage& image, 1948 const WebImage& image,
1949 const WebPoint& webImageOffset) { 1949 const WebPoint& webImageOffset) {
1950 blink::WebRect offset_in_window(webImageOffset.x, webImageOffset.y, 0, 0);
1951 convertViewportToWindow(&offset_in_window);
1950 DropData drop_data(DropDataBuilder::Build(data)); 1952 DropData drop_data(DropDataBuilder::Build(data));
1951 drop_data.referrer_policy = frame->document().referrerPolicy(); 1953 drop_data.referrer_policy = frame->document().referrerPolicy();
1952 gfx::Vector2d imageOffset(webImageOffset.x, webImageOffset.y); 1954 gfx::Vector2d imageOffset(offset_in_window.x, offset_in_window.y);
1953 Send(new DragHostMsg_StartDragging(routing_id(), drop_data, mask, 1955 Send(new DragHostMsg_StartDragging(routing_id(), drop_data, mask,
1954 image.getSkBitmap(), imageOffset, 1956 image.getSkBitmap(), imageOffset,
1955 possible_drag_event_info_)); 1957 possible_drag_event_info_));
1956 } 1958 }
1957 1959
1958 bool RenderViewImpl::acceptsLoadDrops() { 1960 bool RenderViewImpl::acceptsLoadDrops() {
1959 return renderer_preferences_.can_accept_load_drops; 1961 return renderer_preferences_.can_accept_load_drops;
1960 } 1962 }
1961 1963
1962 void RenderViewImpl::focusNext() { 1964 void RenderViewImpl::focusNext() {
(...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after
3727 if (IsUseZoomForDSFEnabled()) { 3729 if (IsUseZoomForDSFEnabled()) {
3728 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); 3730 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_);
3729 } else { 3731 } else {
3730 webview()->setDeviceScaleFactor(device_scale_factor_); 3732 webview()->setDeviceScaleFactor(device_scale_factor_);
3731 } 3733 }
3732 webview()->settings()->setPreferCompositingToLCDTextEnabled( 3734 webview()->settings()->setPreferCompositingToLCDTextEnabled(
3733 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); 3735 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_));
3734 } 3736 }
3735 3737
3736 } // namespace content 3738 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698