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

Side by Side Diff: android_webview/native/aw_contents.cc

Issue 1262403005: Use ui::GestureConfiguration to disable tap suppression in Android WebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « android_webview/native/DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "android_webview/native/aw_contents.h" 5 #include "android_webview/native/aw_contents.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "android_webview/browser/aw_browser_context.h" 9 #include "android_webview/browser/aw_browser_context.h"
10 #include "android_webview/browser/aw_browser_main_parts.h" 10 #include "android_webview/browser/aw_browser_main_parts.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "content/public/browser/render_process_host.h" 60 #include "content/public/browser/render_process_host.h"
61 #include "content/public/browser/render_view_host.h" 61 #include "content/public/browser/render_view_host.h"
62 #include "content/public/browser/web_contents.h" 62 #include "content/public/browser/web_contents.h"
63 #include "content/public/common/message_port_types.h" 63 #include "content/public/common/message_port_types.h"
64 #include "content/public/common/renderer_preferences.h" 64 #include "content/public/common/renderer_preferences.h"
65 #include "content/public/common/ssl_status.h" 65 #include "content/public/common/ssl_status.h"
66 #include "jni/AwContents_jni.h" 66 #include "jni/AwContents_jni.h"
67 #include "net/base/auth.h" 67 #include "net/base/auth.h"
68 #include "net/cert/x509_certificate.h" 68 #include "net/cert/x509_certificate.h"
69 #include "third_party/skia/include/core/SkPicture.h" 69 #include "third_party/skia/include/core/SkPicture.h"
70 #include "ui/events/gesture_detection/gesture_configuration.h"
70 #include "ui/gfx/android/java_bitmap.h" 71 #include "ui/gfx/android/java_bitmap.h"
71 #include "ui/gfx/geometry/rect_f.h" 72 #include "ui/gfx/geometry/rect_f.h"
72 #include "ui/gfx/geometry/size.h" 73 #include "ui/gfx/geometry/size.h"
73 #include "ui/gfx/image/image.h" 74 #include "ui/gfx/image/image.h"
74 75
75 struct AwDrawSWFunctionTable; 76 struct AwDrawSWFunctionTable;
76 77
77 using autofill::ContentAutofillDriverFactory; 78 using autofill::ContentAutofillDriverFactory;
78 using autofill::AutofillManager; 79 using autofill::AutofillManager;
79 using base::android::AttachCurrentThread; 80 using base::android::AttachCurrentThread;
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 299
299 return web_contents_->GetJavaWebContents(); 300 return web_contents_->GetJavaWebContents();
300 } 301 }
301 302
302 void AwContents::Destroy(JNIEnv* env, jobject obj) { 303 void AwContents::Destroy(JNIEnv* env, jobject obj) {
303 java_ref_.reset(); 304 java_ref_.reset();
304 delete this; 305 delete this;
305 } 306 }
306 307
307 static jlong Init(JNIEnv* env, jclass, jobject browser_context) { 308 static jlong Init(JNIEnv* env, jclass, jobject browser_context) {
309 ui::GestureConfiguration::GetInstance()
jdduke (slow) 2015/07/31 21:10:31 What about doing it in AwMainDelegate::BasicStartu
hush (inactive) 2015/07/31 21:48:24 ah yes. That works too. I don't have strong prefer
310 ->set_fling_touchscreen_tap_suppression_enabled(false);
308 // TODO(joth): Use |browser_context| to get the native BrowserContext, rather 311 // TODO(joth): Use |browser_context| to get the native BrowserContext, rather
309 // than hard-code the default instance lookup here. 312 // than hard-code the default instance lookup here.
310 scoped_ptr<WebContents> web_contents(content::WebContents::Create( 313 scoped_ptr<WebContents> web_contents(content::WebContents::Create(
311 content::WebContents::CreateParams(AwBrowserContext::GetDefault()))); 314 content::WebContents::CreateParams(AwBrowserContext::GetDefault())));
312 // Return an 'uninitialized' instance; most work is deferred until the 315 // Return an 'uninitialized' instance; most work is deferred until the
313 // subsequent SetJavaPeers() call. 316 // subsequent SetJavaPeers() call.
314 return reinterpret_cast<intptr_t>(new AwContents(web_contents.Pass())); 317 return reinterpret_cast<intptr_t>(new AwContents(web_contents.Pass()));
315 } 318 }
316 319
317 static void SetForceAuxiliaryBitmapRendering( 320 static void SetForceAuxiliaryBitmapRendering(
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 1200
1198 AwMessagePortServiceImpl::GetInstance()->CreateMessageChannel(env, ports, 1201 AwMessagePortServiceImpl::GetInstance()->CreateMessageChannel(env, ports,
1199 GetMessagePortMessageFilter()); 1202 GetMessagePortMessageFilter());
1200 } 1203 }
1201 1204
1202 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { 1205 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) {
1203 g_should_download_favicons = true; 1206 g_should_download_favicons = true;
1204 } 1207 }
1205 1208
1206 } // namespace android_webview 1209 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/native/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698