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

Side by Side Diff: components/test_runner/web_view_test_client.cc

Issue 2475443003: Drag-and-drop: Move startDrag out of WebView/RenderView. (Closed)
Patch Set: Removed unneeded declarations. 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/test_runner/web_view_test_client.h" 5 #include "components/test_runner/web_view_test_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 19 matching lines...) Expand all
30 namespace test_runner { 30 namespace test_runner {
31 31
32 WebViewTestClient::WebViewTestClient( 32 WebViewTestClient::WebViewTestClient(
33 WebViewTestProxyBase* web_view_test_proxy_base) 33 WebViewTestProxyBase* web_view_test_proxy_base)
34 : web_view_test_proxy_base_(web_view_test_proxy_base) { 34 : web_view_test_proxy_base_(web_view_test_proxy_base) {
35 DCHECK(web_view_test_proxy_base); 35 DCHECK(web_view_test_proxy_base);
36 } 36 }
37 37
38 WebViewTestClient::~WebViewTestClient() {} 38 WebViewTestClient::~WebViewTestClient() {}
39 39
40 void WebViewTestClient::startDragging(blink::WebLocalFrame* frame,
41 const blink::WebDragData& data,
42 blink::WebDragOperationsMask mask,
43 const blink::WebImage& image,
44 const blink::WebPoint& point) {
45 test_runner()->setDragImage(image);
46
47 // When running a test, we need to fake a drag drop operation otherwise
48 // Windows waits for real mouse events to know when the drag is over.
49 delegate()->GetWebWidgetTestProxyBase(frame)->event_sender()->DoDragDrop(
50 data, mask);
51 }
52
53 // The output from these methods in layout test mode should match that 40 // The output from these methods in layout test mode should match that
54 // expected by the layout tests. See EditingDelegate.m in DumpRenderTree. 41 // expected by the layout tests. See EditingDelegate.m in DumpRenderTree.
55 42
56 void WebViewTestClient::didChangeContents() { 43 void WebViewTestClient::didChangeContents() {
57 if (test_runner()->shouldDumpEditingCallbacks()) 44 if (test_runner()->shouldDumpEditingCallbacks())
58 delegate()->PrintMessage( 45 delegate()->PrintMessage(
59 "EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification\n"); 46 "EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification\n");
60 } 47 }
61 48
62 blink::WebView* WebViewTestClient::createView( 49 blink::WebView* WebViewTestClient::createView(
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 138
152 void WebViewTestClient::didFocus() { 139 void WebViewTestClient::didFocus() {
153 test_runner()->SetFocus(web_view_test_proxy_base_->web_view(), true); 140 test_runner()->SetFocus(web_view_test_proxy_base_->web_view(), true);
154 } 141 }
155 142
156 TestRunner* WebViewTestClient::test_runner() { 143 TestRunner* WebViewTestClient::test_runner() {
157 return web_view_test_proxy_base_->test_interfaces()->GetTestRunner(); 144 return web_view_test_proxy_base_->test_interfaces()->GetTestRunner();
158 } 145 }
159 146
160 } // namespace test_runner 147 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/test_runner/web_view_test_client.h ('k') | components/test_runner/web_view_test_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698