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 "android_webview/browser/aw_browser_context.h" | 7 #include "android_webview/browser/aw_browser_context.h" |
8 #include "android_webview/browser/aw_browser_main_parts.h" | 8 #include "android_webview/browser/aw_browser_main_parts.h" |
9 #include "android_webview/browser/gpu_memory_buffer_impl.h" | 9 #include "android_webview/browser/gpu_memory_buffer_impl.h" |
10 #include "android_webview/browser/in_process_view_renderer.h" | 10 #include "android_webview/browser/in_process_view_renderer.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 // Check if the autofill manager already exists. | 198 // Check if the autofill manager already exists. |
199 content::WebContents* web_contents = web_contents_.get(); | 199 content::WebContents* web_contents = web_contents_.get(); |
200 if (AutofillDriverImpl::FromWebContents(web_contents)) | 200 if (AutofillDriverImpl::FromWebContents(web_contents)) |
201 return; | 201 return; |
202 | 202 |
203 AutofillDriverImpl::CreateForWebContentsAndDelegate( | 203 AutofillDriverImpl::CreateForWebContentsAndDelegate( |
204 web_contents, | 204 web_contents, |
205 AwBrowserContext::FromWebContents(web_contents)-> | 205 AwBrowserContext::FromWebContents(web_contents)-> |
206 CreateAutofillManagerDelegate(enabled), | 206 CreateAutofillManagerDelegate(enabled), |
207 l10n_util::GetDefaultLocale(), | 207 l10n_util::GetDefaultLocale(), |
208 AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER, | 208 AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER); |
209 true); | |
210 } | 209 } |
211 | 210 |
212 AwContents::~AwContents() { | 211 AwContents::~AwContents() { |
213 DCHECK(AwContents::FromWebContents(web_contents_.get()) == this); | 212 DCHECK(AwContents::FromWebContents(web_contents_.get()) == this); |
214 web_contents_->RemoveUserData(kAwContentsUserDataKey); | 213 web_contents_->RemoveUserData(kAwContentsUserDataKey); |
215 if (find_helper_.get()) | 214 if (find_helper_.get()) |
216 find_helper_->SetListener(NULL); | 215 find_helper_->SetListener(NULL); |
217 if (icon_helper_.get()) | 216 if (icon_helper_.get()) |
218 icon_helper_->SetListener(NULL); | 217 icon_helper_->SetListener(NULL); |
219 base::subtle::NoBarrier_AtomicIncrement(&g_instance_count, -1); | 218 base::subtle::NoBarrier_AtomicIncrement(&g_instance_count, -1); |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 return browser_view_renderer_->CapturePicture(); | 716 return browser_view_renderer_->CapturePicture(); |
718 } | 717 } |
719 | 718 |
720 void AwContents::EnableOnNewPicture(JNIEnv* env, | 719 void AwContents::EnableOnNewPicture(JNIEnv* env, |
721 jobject obj, | 720 jobject obj, |
722 jboolean enabled) { | 721 jboolean enabled) { |
723 browser_view_renderer_->EnableOnNewPicture(enabled); | 722 browser_view_renderer_->EnableOnNewPicture(enabled); |
724 } | 723 } |
725 | 724 |
726 } // namespace android_webview | 725 } // namespace android_webview |
OLD | NEW |