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 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1248 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( | 1248 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( |
1249 web_contents_->GetRenderProcessHost()->GetID(), url::kFileScheme); | 1249 web_contents_->GetRenderProcessHost()->GetID(), url::kFileScheme); |
1250 } | 1250 } |
1251 | 1251 |
1252 void AwContents::ResumeLoadingCreatedPopupWebContents( | 1252 void AwContents::ResumeLoadingCreatedPopupWebContents( |
1253 JNIEnv* env, | 1253 JNIEnv* env, |
1254 const JavaParamRef<jobject>& obj) { | 1254 const JavaParamRef<jobject>& obj) { |
1255 web_contents_->ResumeLoadingCreatedWebContents(); | 1255 web_contents_->ResumeLoadingCreatedWebContents(); |
1256 } | 1256 } |
1257 | 1257 |
| 1258 ScopedJavaLocalRef<jobject> AwContents::GetViewRoot( |
| 1259 JNIEnv* env, |
| 1260 const JavaParamRef<jobject>& obj) { |
| 1261 return web_contents_->GetNativeView()->GetViewRoot(); |
| 1262 } |
| 1263 |
1258 void SetShouldDownloadFavicons(JNIEnv* env, | 1264 void SetShouldDownloadFavicons(JNIEnv* env, |
1259 const JavaParamRef<jclass>& jclazz) { | 1265 const JavaParamRef<jclass>& jclazz) { |
1260 g_should_download_favicons = true; | 1266 g_should_download_favicons = true; |
1261 } | 1267 } |
1262 | 1268 |
1263 void AwContents::RenderViewHostChanged(content::RenderViewHost* old_host, | 1269 void AwContents::RenderViewHostChanged(content::RenderViewHost* old_host, |
1264 content::RenderViewHost* new_host) { | 1270 content::RenderViewHost* new_host) { |
1265 DCHECK(new_host); | 1271 DCHECK(new_host); |
1266 | 1272 |
1267 int process_id = new_host->GetProcess()->GetID(); | 1273 int process_id = new_host->GetProcess()->GetID(); |
1268 int routing_id = new_host->GetRoutingID(); | 1274 int routing_id = new_host->GetRoutingID(); |
1269 // At this point, the current RVH may or may not contain a compositor. So | 1275 // At this point, the current RVH may or may not contain a compositor. So |
1270 // compositor_ may be nullptr, in which case | 1276 // compositor_ may be nullptr, in which case |
1271 // BrowserViewRenderer::DidInitializeCompositor() callback is time when the | 1277 // BrowserViewRenderer::DidInitializeCompositor() callback is time when the |
1272 // new compositor is constructed. | 1278 // new compositor is constructed. |
1273 browser_view_renderer_.SetActiveCompositorID( | 1279 browser_view_renderer_.SetActiveCompositorID( |
1274 CompositorID(process_id, routing_id)); | 1280 CompositorID(process_id, routing_id)); |
1275 } | 1281 } |
1276 | 1282 |
1277 } // namespace android_webview | 1283 } // namespace android_webview |
OLD | NEW |