| OLD | NEW |
| 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 if (!enabled) | 261 if (!enabled) |
| 262 return; | 262 return; |
| 263 // Check if the autofill driver factory already exists. | 263 // Check if the autofill driver factory already exists. |
| 264 content::WebContents* web_contents = web_contents_.get(); | 264 content::WebContents* web_contents = web_contents_.get(); |
| 265 if (ContentAutofillDriverFactory::FromWebContents(web_contents)) | 265 if (ContentAutofillDriverFactory::FromWebContents(web_contents)) |
| 266 return; | 266 return; |
| 267 | 267 |
| 268 AwAutofillClient::CreateForWebContents(web_contents); | 268 AwAutofillClient::CreateForWebContents(web_contents); |
| 269 ContentAutofillDriverFactory::CreateForWebContentsAndDelegate( | 269 ContentAutofillDriverFactory::CreateForWebContentsAndDelegate( |
| 270 web_contents, AwAutofillClient::FromWebContents(web_contents), | 270 web_contents, AwAutofillClient::FromWebContents(web_contents), |
| 271 base::android::GetDefaultLocale(), | 271 base::android::GetDefaultLocaleString(), |
| 272 AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER); | 272 AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER); |
| 273 } | 273 } |
| 274 | 274 |
| 275 void AwContents::SetAwAutofillClient(const JavaRef<jobject>& client) { | 275 void AwContents::SetAwAutofillClient(const JavaRef<jobject>& client) { |
| 276 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 276 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 277 JNIEnv* env = AttachCurrentThread(); | 277 JNIEnv* env = AttachCurrentThread(); |
| 278 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 278 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
| 279 if (obj.is_null()) | 279 if (obj.is_null()) |
| 280 return; | 280 return; |
| 281 Java_AwContents_setAwAutofillClient(env, obj, client); | 281 Java_AwContents_setAwAutofillClient(env, obj, client); |
| (...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1262 int routing_id = new_host->GetRoutingID(); | 1262 int routing_id = new_host->GetRoutingID(); |
| 1263 // At this point, the current RVH may or may not contain a compositor. So | 1263 // At this point, the current RVH may or may not contain a compositor. So |
| 1264 // compositor_ may be nullptr, in which case | 1264 // compositor_ may be nullptr, in which case |
| 1265 // BrowserViewRenderer::DidInitializeCompositor() callback is time when the | 1265 // BrowserViewRenderer::DidInitializeCompositor() callback is time when the |
| 1266 // new compositor is constructed. | 1266 // new compositor is constructed. |
| 1267 browser_view_renderer_.SetActiveCompositorID( | 1267 browser_view_renderer_.SetActiveCompositorID( |
| 1268 CompositorID(process_id, routing_id)); | 1268 CompositorID(process_id, routing_id)); |
| 1269 } | 1269 } |
| 1270 | 1270 |
| 1271 } // namespace android_webview | 1271 } // namespace android_webview |
| OLD | NEW |