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

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

Issue 2485693003: Drag-and-drop: DragEnter, DragOver, DragLeave, DragDrop (Closed)
Patch Set: Addressed comments by dcheng@. Created 4 years, 1 month 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 #include <memory> 9 #include <memory>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #include "content/common/input_messages.h" 53 #include "content/common/input_messages.h"
54 #include "content/common/page_messages.h" 54 #include "content/common/page_messages.h"
55 #include "content/common/render_message_filter.mojom.h" 55 #include "content/common/render_message_filter.mojom.h"
56 #include "content/common/site_isolation_policy.h" 56 #include "content/common/site_isolation_policy.h"
57 #include "content/common/view_messages.h" 57 #include "content/common/view_messages.h"
58 #include "content/public/common/bindings_policy.h" 58 #include "content/public/common/bindings_policy.h"
59 #include "content/public/common/browser_side_navigation_policy.h" 59 #include "content/public/common/browser_side_navigation_policy.h"
60 #include "content/public/common/content_client.h" 60 #include "content/public/common/content_client.h"
61 #include "content/public/common/content_constants.h" 61 #include "content/public/common/content_constants.h"
62 #include "content/public/common/content_switches.h" 62 #include "content/public/common/content_switches.h"
63 #include "content/public/common/drop_data.h"
64 #include "content/public/common/favicon_url.h" 63 #include "content/public/common/favicon_url.h"
65 #include "content/public/common/page_importance_signals.h" 64 #include "content/public/common/page_importance_signals.h"
66 #include "content/public/common/page_state.h" 65 #include "content/public/common/page_state.h"
67 #include "content/public/common/page_zoom.h" 66 #include "content/public/common/page_zoom.h"
68 #include "content/public/common/three_d_api_types.h" 67 #include "content/public/common/three_d_api_types.h"
69 #include "content/public/common/url_constants.h" 68 #include "content/public/common/url_constants.h"
70 #include "content/public/common/web_preferences.h" 69 #include "content/public/common/web_preferences.h"
71 #include "content/public/renderer/content_renderer_client.h" 70 #include "content/public/renderer/content_renderer_client.h"
72 #include "content/public/renderer/document_state.h" 71 #include "content/public/renderer/document_state.h"
73 #include "content/public/renderer/navigation_state.h" 72 #include "content/public/renderer/navigation_state.h"
(...skipping 30 matching lines...) Expand all
104 #include "media/renderers/gpu_video_accelerator_factories.h" 103 #include "media/renderers/gpu_video_accelerator_factories.h"
105 #include "net/base/data_url.h" 104 #include "net/base/data_url.h"
106 #include "net/base/escape.h" 105 #include "net/base/escape.h"
107 #include "net/base/net_errors.h" 106 #include "net/base/net_errors.h"
108 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 107 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
109 #include "net/http/http_util.h" 108 #include "net/http/http_util.h"
110 #include "skia/ext/platform_canvas.h" 109 #include "skia/ext/platform_canvas.h"
111 #include "third_party/WebKit/public/platform/FilePathConversion.h" 110 #include "third_party/WebKit/public/platform/FilePathConversion.h"
112 #include "third_party/WebKit/public/platform/URLConversion.h" 111 #include "third_party/WebKit/public/platform/URLConversion.h"
113 #include "third_party/WebKit/public/platform/WebConnectionType.h" 112 #include "third_party/WebKit/public/platform/WebConnectionType.h"
114 #include "third_party/WebKit/public/platform/WebDragData.h"
115 #include "third_party/WebKit/public/platform/WebHTTPBody.h" 113 #include "third_party/WebKit/public/platform/WebHTTPBody.h"
116 #include "third_party/WebKit/public/platform/WebImage.h" 114 #include "third_party/WebKit/public/platform/WebImage.h"
117 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h" 115 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h"
118 #include "third_party/WebKit/public/platform/WebPoint.h" 116 #include "third_party/WebKit/public/platform/WebPoint.h"
119 #include "third_party/WebKit/public/platform/WebRect.h" 117 #include "third_party/WebKit/public/platform/WebRect.h"
120 #include "third_party/WebKit/public/platform/WebSize.h" 118 #include "third_party/WebKit/public/platform/WebSize.h"
121 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" 119 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h"
122 #include "third_party/WebKit/public/platform/WebString.h" 120 #include "third_party/WebKit/public/platform/WebString.h"
123 #include "third_party/WebKit/public/platform/WebURL.h" 121 #include "third_party/WebKit/public/platform/WebURL.h"
124 #include "third_party/WebKit/public/platform/WebURLError.h" 122 #include "third_party/WebKit/public/platform/WebURLError.h"
(...skipping 30 matching lines...) Expand all
155 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 153 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
156 #include "third_party/WebKit/public/web/WebScriptSource.h" 154 #include "third_party/WebKit/public/web/WebScriptSource.h"
157 #include "third_party/WebKit/public/web/WebSearchableFormData.h" 155 #include "third_party/WebKit/public/web/WebSearchableFormData.h"
158 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" 156 #include "third_party/WebKit/public/web/WebSecurityPolicy.h"
159 #include "third_party/WebKit/public/web/WebSettings.h" 157 #include "third_party/WebKit/public/web/WebSettings.h"
160 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" 158 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
161 #include "third_party/WebKit/public/web/WebView.h" 159 #include "third_party/WebKit/public/web/WebView.h"
162 #include "third_party/WebKit/public/web/WebWindowFeatures.h" 160 #include "third_party/WebKit/public/web/WebWindowFeatures.h"
163 #include "third_party/icu/source/common/unicode/uchar.h" 161 #include "third_party/icu/source/common/unicode/uchar.h"
164 #include "third_party/icu/source/common/unicode/uscript.h" 162 #include "third_party/icu/source/common/unicode/uscript.h"
165 #include "ui/base/clipboard/clipboard.h"
166 #include "ui/base/ui_base_switches_util.h" 163 #include "ui/base/ui_base_switches_util.h"
167 #include "ui/events/latency_info.h" 164 #include "ui/events/latency_info.h"
168 #include "ui/gfx/geometry/point.h" 165 #include "ui/gfx/geometry/point.h"
169 #include "ui/gfx/geometry/rect.h" 166 #include "ui/gfx/geometry/rect.h"
170 #include "ui/gfx/geometry/rect_conversions.h" 167 #include "ui/gfx/geometry/rect_conversions.h"
171 #include "ui/gfx/geometry/size_conversions.h" 168 #include "ui/gfx/geometry/size_conversions.h"
172 #include "ui/gfx/native_widget_types.h" 169 #include "ui/gfx/native_widget_types.h"
173 #include "url/origin.h" 170 #include "url/origin.h"
174 #include "url/url_constants.h" 171 #include "url/url_constants.h"
175 #include "v8/include/v8.h" 172 #include "v8/include/v8.h"
(...skipping 24 matching lines...) Expand all
200 #endif 197 #endif
201 198
202 using blink::WebAXObject; 199 using blink::WebAXObject;
203 using blink::WebApplicationCacheHost; 200 using blink::WebApplicationCacheHost;
204 using blink::WebApplicationCacheHostClient; 201 using blink::WebApplicationCacheHostClient;
205 using blink::WebColor; 202 using blink::WebColor;
206 using blink::WebConsoleMessage; 203 using blink::WebConsoleMessage;
207 using blink::WebData; 204 using blink::WebData;
208 using blink::WebDataSource; 205 using blink::WebDataSource;
209 using blink::WebDocument; 206 using blink::WebDocument;
210 using blink::WebDragData;
211 using blink::WebDragOperation; 207 using blink::WebDragOperation;
212 using blink::WebDragOperationsMask;
213 using blink::WebElement; 208 using blink::WebElement;
214 using blink::WebFileChooserCompletion; 209 using blink::WebFileChooserCompletion;
215 using blink::WebFormControlElement; 210 using blink::WebFormControlElement;
216 using blink::WebFormElement; 211 using blink::WebFormElement;
217 using blink::WebFrame; 212 using blink::WebFrame;
218 using blink::WebFrameContentDumper; 213 using blink::WebFrameContentDumper;
219 using blink::WebGestureEvent; 214 using blink::WebGestureEvent;
220 using blink::WebHistoryItem; 215 using blink::WebHistoryItem;
221 using blink::WebHTTPBody; 216 using blink::WebHTTPBody;
222 using blink::WebHitTestResult; 217 using blink::WebHitTestResult;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 DCHECK(sizes->empty()); 367 DCHECK(sizes->empty());
373 sizes->reserve(web_sizes.size()); 368 sizes->reserve(web_sizes.size());
374 for (size_t i = 0; i < web_sizes.size(); ++i) 369 for (size_t i = 0; i < web_sizes.size(); ++i)
375 sizes->push_back(gfx::Size(web_sizes[i])); 370 sizes->push_back(gfx::Size(web_sizes[i]));
376 } 371 }
377 372
378 /////////////////////////////////////////////////////////////////////////////// 373 ///////////////////////////////////////////////////////////////////////////////
379 374
380 namespace { 375 namespace {
381 376
382 WebDragData DropMetaDataToWebDragData(
383 const std::vector<DropData::Metadata>& drop_meta_data) {
384 std::vector<WebDragData::Item> item_list;
385 for (const auto& meta_data_item : drop_meta_data) {
386 if (meta_data_item.kind == DropData::Kind::STRING) {
387 WebDragData::Item item;
388 item.storageType = WebDragData::Item::StorageTypeString;
389 item.stringType = meta_data_item.mime_type;
390 // Have to pass a dummy URL here instead of an empty URL because the
391 // DropData received by browser_plugins goes through a round trip:
392 // DropData::MetaData --> WebDragData-->DropData. In the end, DropData
393 // will contain an empty URL (which means no URL is dragged) if the URL in
394 // WebDragData is empty.
395 if (base::EqualsASCII(meta_data_item.mime_type,
396 ui::Clipboard::kMimeTypeURIList)) {
397 item.stringData = WebString::fromUTF8("about:dragdrop-placeholder");
398 }
399 item_list.push_back(item);
400 continue;
401 }
402
403 // TODO(hush): crbug.com/584789. Blink needs to support creating a file with
404 // just the mimetype. This is needed to drag files to WebView on Android
405 // platform.
406 if ((meta_data_item.kind == DropData::Kind::FILENAME) &&
407 !meta_data_item.filename.empty()) {
408 WebDragData::Item item;
409 item.storageType = WebDragData::Item::StorageTypeFilename;
410 item.filenameData = meta_data_item.filename.AsUTF16Unsafe();
411 item_list.push_back(item);
412 continue;
413 }
414
415 if (meta_data_item.kind == DropData::Kind::FILESYSTEMFILE) {
416 WebDragData::Item item;
417 item.storageType = WebDragData::Item::StorageTypeFileSystemFile;
418 item.fileSystemURL = meta_data_item.file_system_url;
419 item_list.push_back(item);
420 continue;
421 }
422 }
423
424 WebDragData result;
425 result.initialize();
426 result.setItems(item_list);
427 return result;
428 }
429
430 WebDragData DropDataToWebDragData(const DropData& drop_data) {
431 std::vector<WebDragData::Item> item_list;
432
433 // These fields are currently unused when dragging into WebKit.
434 DCHECK(drop_data.download_metadata.empty());
435 DCHECK(drop_data.file_contents.empty());
436 DCHECK(drop_data.file_description_filename.empty());
437
438 if (!drop_data.text.is_null()) {
439 WebDragData::Item item;
440 item.storageType = WebDragData::Item::StorageTypeString;
441 item.stringType = WebString::fromUTF8(ui::Clipboard::kMimeTypeText);
442 item.stringData = drop_data.text.string();
443 item_list.push_back(item);
444 }
445
446 if (!drop_data.url.is_empty()) {
447 WebDragData::Item item;
448 item.storageType = WebDragData::Item::StorageTypeString;
449 item.stringType = WebString::fromUTF8(ui::Clipboard::kMimeTypeURIList);
450 item.stringData = WebString::fromUTF8(drop_data.url.spec());
451 item.title = drop_data.url_title;
452 item_list.push_back(item);
453 }
454
455 if (!drop_data.html.is_null()) {
456 WebDragData::Item item;
457 item.storageType = WebDragData::Item::StorageTypeString;
458 item.stringType = WebString::fromUTF8(ui::Clipboard::kMimeTypeHTML);
459 item.stringData = drop_data.html.string();
460 item.baseURL = drop_data.html_base_url;
461 item_list.push_back(item);
462 }
463
464 for (std::vector<ui::FileInfo>::const_iterator it =
465 drop_data.filenames.begin();
466 it != drop_data.filenames.end();
467 ++it) {
468 WebDragData::Item item;
469 item.storageType = WebDragData::Item::StorageTypeFilename;
470 item.filenameData = it->path.AsUTF16Unsafe();
471 item.displayNameData = it->display_name.AsUTF16Unsafe();
472 item_list.push_back(item);
473 }
474
475 for (std::vector<DropData::FileSystemFileInfo>::const_iterator it =
476 drop_data.file_system_files.begin();
477 it != drop_data.file_system_files.end();
478 ++it) {
479 WebDragData::Item item;
480 item.storageType = WebDragData::Item::StorageTypeFileSystemFile;
481 item.fileSystemURL = it->url;
482 item.fileSystemFileSize = it->size;
483 item_list.push_back(item);
484 }
485
486 for (std::map<base::string16, base::string16>::const_iterator it =
487 drop_data.custom_data.begin();
488 it != drop_data.custom_data.end();
489 ++it) {
490 WebDragData::Item item;
491 item.storageType = WebDragData::Item::StorageTypeString;
492 item.stringType = it->first;
493 item.stringData = it->second;
494 item_list.push_back(item);
495 }
496
497 WebDragData result;
498 result.initialize();
499 result.setItems(item_list);
500 result.setFilesystemId(drop_data.filesystem_id);
501 return result;
502 }
503
504 typedef void (*SetFontFamilyWrapper)(blink::WebSettings*, 377 typedef void (*SetFontFamilyWrapper)(blink::WebSettings*,
505 const base::string16&, 378 const base::string16&,
506 UScriptCode); 379 UScriptCode);
507 380
508 void SetStandardFontFamilyWrapper(WebSettings* settings, 381 void SetStandardFontFamilyWrapper(WebSettings* settings,
509 const base::string16& font, 382 const base::string16& font,
510 UScriptCode script) { 383 UScriptCode script) {
511 settings->setStandardFontFamily(font, script); 384 settings->setStandardFontFamily(font, script);
512 } 385 }
513 386
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 } 1173 }
1301 1174
1302 bool handled = true; 1175 bool handled = true;
1303 IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message) 1176 IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message)
1304 IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand) 1177 IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand)
1305 IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret) 1178 IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret)
1306 IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect, 1179 IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect,
1307 OnScrollFocusedEditableNodeIntoRect) 1180 OnScrollFocusedEditableNodeIntoRect)
1308 IPC_MESSAGE_HANDLER(ViewMsg_SetPageScale, OnSetPageScale) 1181 IPC_MESSAGE_HANDLER(ViewMsg_SetPageScale, OnSetPageScale)
1309 IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom) 1182 IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom)
1310 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter)
1311 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver)
1312 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave)
1313 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop)
1314 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded) 1183 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded)
1315 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded, 1184 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded,
1316 OnDragSourceSystemDragEnded) 1185 OnDragSourceSystemDragEnded)
1317 IPC_MESSAGE_HANDLER(ViewMsg_AllowBindings, OnAllowBindings) 1186 IPC_MESSAGE_HANDLER(ViewMsg_AllowBindings, OnAllowBindings)
1318 IPC_MESSAGE_HANDLER(ViewMsg_SetInitialFocus, OnSetInitialFocus) 1187 IPC_MESSAGE_HANDLER(ViewMsg_SetInitialFocus, OnSetInitialFocus)
1319 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck) 1188 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck)
1320 IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences) 1189 IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences)
1321 IPC_MESSAGE_HANDLER(ViewMsg_EnumerateDirectoryResponse, 1190 IPC_MESSAGE_HANDLER(ViewMsg_EnumerateDirectoryResponse,
1322 OnEnumerateDirectoryResponse) 1191 OnEnumerateDirectoryResponse)
1323 IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage) 1192 IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage)
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
2081 const blink::WebElement& element) { 1950 const blink::WebElement& element) {
2082 blink::WebRect bounding_box_in_window = element.boundsInViewport(); 1951 blink::WebRect bounding_box_in_window = element.boundsInViewport();
2083 ConvertViewportToWindowViaWidget(&bounding_box_in_window); 1952 ConvertViewportToWindowViaWidget(&bounding_box_in_window);
2084 return gfx::RectF(bounding_box_in_window); 1953 return gfx::RectF(bounding_box_in_window);
2085 } 1954 }
2086 1955
2087 bool RenderViewImpl::HasAddedInputHandler() const { 1956 bool RenderViewImpl::HasAddedInputHandler() const {
2088 return has_added_input_handler_; 1957 return has_added_input_handler_;
2089 } 1958 }
2090 1959
2091 gfx::Point RenderViewImpl::ConvertWindowPointToViewport(
2092 const gfx::Point& point) {
2093 blink::WebFloatRect point_in_viewport(point.x(), point.y(), 0, 0);
2094 convertWindowToViewport(&point_in_viewport);
2095 return gfx::Point(point_in_viewport.x, point_in_viewport.y);
2096 }
2097
2098 void RenderViewImpl::didChangeIcon(WebLocalFrame* frame, 1960 void RenderViewImpl::didChangeIcon(WebLocalFrame* frame,
2099 WebIconURL::Type icon_type) { 1961 WebIconURL::Type icon_type) {
2100 if (frame->parent()) 1962 if (frame->parent())
2101 return; 1963 return;
2102 1964
2103 WebVector<WebIconURL> icon_urls = frame->iconURLs(icon_type); 1965 WebVector<WebIconURL> icon_urls = frame->iconURLs(icon_type);
2104 std::vector<FaviconURL> urls; 1966 std::vector<FaviconURL> urls;
2105 for (size_t i = 0; i < icon_urls.size(); i++) { 1967 for (size_t i = 0; i < icon_urls.size(); i++) {
2106 std::vector<gfx::Size> sizes; 1968 std::vector<gfx::Size> sizes;
2107 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 1969 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2254 2116
2255 enabled_bindings_ |= enabled_bindings_flags; 2117 enabled_bindings_ |= enabled_bindings_flags;
2256 2118
2257 // Keep track of the total bindings accumulated in this process. 2119 // Keep track of the total bindings accumulated in this process.
2258 RenderProcess::current()->AddBindings(enabled_bindings_flags); 2120 RenderProcess::current()->AddBindings(enabled_bindings_flags);
2259 2121
2260 if (main_render_frame_) 2122 if (main_render_frame_)
2261 main_render_frame_->MaybeEnableMojoBindings(); 2123 main_render_frame_->MaybeEnableMojoBindings();
2262 } 2124 }
2263 2125
2264 void RenderViewImpl::OnDragTargetDragEnter(
2265 const std::vector<DropData::Metadata>& drop_meta_data,
2266 const gfx::Point& client_point,
2267 const gfx::Point& screen_point,
2268 WebDragOperationsMask ops,
2269 int key_modifiers) {
2270 WebDragOperation operation = webview()->dragTargetDragEnter(
2271 DropMetaDataToWebDragData(drop_meta_data), client_point, screen_point,
2272 ops, key_modifiers);
2273
2274 Send(new DragHostMsg_UpdateDragCursor(GetRoutingID(), operation));
2275 }
2276
2277 void RenderViewImpl::OnDragTargetDragOver(const gfx::Point& client_point,
2278 const gfx::Point& screen_point,
2279 WebDragOperationsMask ops,
2280 int key_modifiers) {
2281 WebDragOperation operation = webview()->dragTargetDragOver(
2282 ConvertWindowPointToViewport(client_point),
2283 screen_point,
2284 ops,
2285 key_modifiers);
2286
2287 Send(new DragHostMsg_UpdateDragCursor(GetRoutingID(), operation));
2288 }
2289
2290 void RenderViewImpl::OnDragTargetDragLeave() {
2291 webview()->dragTargetDragLeave();
2292 }
2293
2294 void RenderViewImpl::OnDragTargetDrop(const DropData& drop_data,
2295 const gfx::Point& client_point,
2296 const gfx::Point& screen_point,
2297 int key_modifiers) {
2298 webview()->dragTargetDrop(DropDataToWebDragData(drop_data),
2299 ConvertWindowPointToViewport(client_point),
2300 screen_point, key_modifiers);
2301 }
2302
2303 void RenderViewImpl::OnDragSourceEnded(const gfx::Point& client_point, 2126 void RenderViewImpl::OnDragSourceEnded(const gfx::Point& client_point,
2304 const gfx::Point& screen_point, 2127 const gfx::Point& screen_point,
2305 WebDragOperation op) { 2128 WebDragOperation op) {
2306 webview()->dragSourceEndedAt( 2129 webview()->dragSourceEndedAt(
2307 ConvertWindowPointToViewport(client_point), screen_point, op); 2130 ConvertWindowPointToViewport(client_point), screen_point, op);
2308 } 2131 }
2309 2132
2310 void RenderViewImpl::OnDragSourceSystemDragEnded() { 2133 void RenderViewImpl::OnDragSourceSystemDragEnded() {
2311 webview()->dragSourceSystemDragEnded(); 2134 webview()->dragSourceSystemDragEnded();
2312 } 2135 }
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
2967 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); 2790 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
2968 } 2791 }
2969 2792
2970 std::unique_ptr<InputEventAck> ack( 2793 std::unique_ptr<InputEventAck> ack(
2971 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, 2794 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type,
2972 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); 2795 INPUT_EVENT_ACK_STATE_NOT_CONSUMED));
2973 OnInputEventAck(std::move(ack)); 2796 OnInputEventAck(std::move(ack));
2974 } 2797 }
2975 2798
2976 } // namespace content 2799 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698