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 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1948 | 1948 |
1949 void RenderViewImpl::setKeyboardFocusURL(const WebURL& url) { | 1949 void RenderViewImpl::setKeyboardFocusURL(const WebURL& url) { |
1950 focus_url_ = GURL(url); | 1950 focus_url_ = GURL(url); |
1951 UpdateTargetURL(focus_url_, mouse_over_url_); | 1951 UpdateTargetURL(focus_url_, mouse_over_url_); |
1952 } | 1952 } |
1953 | 1953 |
1954 void RenderViewImpl::startDragging(const WebDragData& data, | 1954 void RenderViewImpl::startDragging(const WebDragData& data, |
1955 WebDragOperationsMask mask, | 1955 WebDragOperationsMask mask, |
1956 const WebImage& image, | 1956 const WebImage& image, |
1957 const WebPoint& imageOffset) { | 1957 const WebPoint& imageOffset) { |
1958 #if WEBKIT_USING_SKIA | |
1959 SkBitmap bitmap(image.getSkBitmap()); | |
1960 #elif WEBKIT_USING_CG | |
1961 SkBitmap bitmap = gfx::CGImageToSkBitmap(image.getCGImageRef()); | |
1962 #endif | |
1963 | |
1964 Send(new DragHostMsg_StartDragging(routing_id_, | 1958 Send(new DragHostMsg_StartDragging(routing_id_, |
1965 WebDropData(data), | 1959 WebDropData(data), |
1966 mask, | 1960 mask, |
1967 bitmap, | 1961 image.getSkBitmap(), |
1968 imageOffset)); | 1962 imageOffset)); |
1969 } | 1963 } |
1970 | 1964 |
1971 bool RenderViewImpl::acceptsLoadDrops() { | 1965 bool RenderViewImpl::acceptsLoadDrops() { |
1972 return renderer_preferences_.can_accept_load_drops; | 1966 return renderer_preferences_.can_accept_load_drops; |
1973 } | 1967 } |
1974 | 1968 |
1975 void RenderViewImpl::focusNext() { | 1969 void RenderViewImpl::focusNext() { |
1976 Send(new ViewHostMsg_TakeFocus(routing_id_, false)); | 1970 Send(new ViewHostMsg_TakeFocus(routing_id_, false)); |
1977 } | 1971 } |
(...skipping 3329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5307 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5301 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5308 return !!RenderThreadImpl::current()->compositor_thread(); | 5302 return !!RenderThreadImpl::current()->compositor_thread(); |
5309 } | 5303 } |
5310 | 5304 |
5311 void RenderViewImpl::OnJavaBridgeInit() { | 5305 void RenderViewImpl::OnJavaBridgeInit() { |
5312 DCHECK(!java_bridge_dispatcher_.get()); | 5306 DCHECK(!java_bridge_dispatcher_.get()); |
5313 #if defined(ENABLE_JAVA_BRIDGE) | 5307 #if defined(ENABLE_JAVA_BRIDGE) |
5314 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5308 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
5315 #endif | 5309 #endif |
5316 } | 5310 } |
OLD | NEW |