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

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

Issue 2263043002: android_webview: Let AwContents manage TouchHandleDrawable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 #include <utility> 8 #include <utility>
9 9
10 #include "android_webview/browser/aw_browser_context.h" 10 #include "android_webview/browser/aw_browser_context.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "base/pickle.h" 51 #include "base/pickle.h"
52 #include "base/single_thread_task_runner.h" 52 #include "base/single_thread_task_runner.h"
53 #include "base/strings/string16.h" 53 #include "base/strings/string16.h"
54 #include "base/supports_user_data.h" 54 #include "base/supports_user_data.h"
55 #include "base/threading/thread_task_runner_handle.h" 55 #include "base/threading/thread_task_runner_handle.h"
56 #include "components/autofill/content/browser/content_autofill_driver_factory.h" 56 #include "components/autofill/content/browser/content_autofill_driver_factory.h"
57 #include "components/autofill/core/browser/autofill_manager.h" 57 #include "components/autofill/core/browser/autofill_manager.h"
58 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" 58 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
59 #include "components/navigation_interception/intercept_navigation_delegate.h" 59 #include "components/navigation_interception/intercept_navigation_delegate.h"
60 #include "content/public/browser/android/content_view_core.h" 60 #include "content/public/browser/android/content_view_core.h"
61 #include "content/public/browser/android/popup_touch_handle_drawable.h"
61 #include "content/public/browser/android/synchronous_compositor.h" 62 #include "content/public/browser/android/synchronous_compositor.h"
62 #include "content/public/browser/browser_thread.h" 63 #include "content/public/browser/browser_thread.h"
63 #include "content/public/browser/cert_store.h" 64 #include "content/public/browser/cert_store.h"
64 #include "content/public/browser/child_process_security_policy.h" 65 #include "content/public/browser/child_process_security_policy.h"
65 #include "content/public/browser/favicon_status.h" 66 #include "content/public/browser/favicon_status.h"
66 #include "content/public/browser/message_port_provider.h" 67 #include "content/public/browser/message_port_provider.h"
67 #include "content/public/browser/navigation_entry.h" 68 #include "content/public/browser/navigation_entry.h"
68 #include "content/public/browser/render_frame_host.h" 69 #include "content/public/browser/render_frame_host.h"
69 #include "content/public/browser/render_process_host.h" 70 #include "content/public/browser/render_process_host.h"
70 #include "content/public/browser/render_view_host.h" 71 #include "content/public/browser/render_view_host.h"
(...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 int process_id = new_host->GetProcess()->GetID(); 1285 int process_id = new_host->GetProcess()->GetID();
1285 int routing_id = new_host->GetRoutingID(); 1286 int routing_id = new_host->GetRoutingID();
1286 // At this point, the current RVH may or may not contain a compositor. So 1287 // At this point, the current RVH may or may not contain a compositor. So
1287 // compositor_ may be nullptr, in which case 1288 // compositor_ may be nullptr, in which case
1288 // BrowserViewRenderer::DidInitializeCompositor() callback is time when the 1289 // BrowserViewRenderer::DidInitializeCompositor() callback is time when the
1289 // new compositor is constructed. 1290 // new compositor is constructed.
1290 browser_view_renderer_.SetActiveCompositorID( 1291 browser_view_renderer_.SetActiveCompositorID(
1291 CompositorID(process_id, routing_id)); 1292 CompositorID(process_id, routing_id));
1292 } 1293 }
1293 1294
1295 void AwContents::DidCreateTouchHandle(ui::TouchHandleDrawable* drawable) {
1296 JNIEnv* env = AttachCurrentThread();
1297 const ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
1298 if (obj.is_null())
1299 return;
1300 content::PopupTouchHandleDrawable *popup_drawable =
1301 static_cast<content::PopupTouchHandleDrawable*>(drawable);
1302 const ScopedJavaLocalRef<jobject> drawable_obj =
1303 popup_drawable->GetJavaObj(env);
1304 if (drawable_obj.is_null())
1305 return;
1306 Java_AwContents_onCreatedTouchHandle(env, obj, drawable_obj);
1307 }
1308
1294 } // namespace android_webview 1309 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698