Chromium Code Reviews| 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 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 842 const JavaParamRef<jobject>& obj, | 842 const JavaParamRef<jobject>& obj, |
| 843 bool visible) { | 843 bool visible) { |
| 844 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 844 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 845 browser_view_renderer_.SetWindowVisibility(visible); | 845 browser_view_renderer_.SetWindowVisibility(visible); |
| 846 } | 846 } |
| 847 | 847 |
| 848 void AwContents::SetIsPaused(JNIEnv* env, | 848 void AwContents::SetIsPaused(JNIEnv* env, |
| 849 const JavaParamRef<jobject>& obj, | 849 const JavaParamRef<jobject>& obj, |
| 850 bool paused) { | 850 bool paused) { |
| 851 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 851 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 852 browser_view_renderer_.SetIsPaused(paused); | 852 browser_view_renderer_.SetIsPaused(paused); |
|
timvolodine
2016/10/12 15:12:44
could you add a comment saying that geolocation is
boliu
2016/10/12 15:35:38
I prefer java side too :)
Jinsuk Kim
2016/10/14 07:04:02
Added a comment in AwContents.updateContentViewCor
| |
| 853 ContentViewCore* cvc = | |
| 854 ContentViewCore::FromWebContents(web_contents_.get()); | |
| 855 if (cvc) { | |
| 856 cvc->PauseOrResumeGeolocation(paused); | |
| 857 } | |
| 858 } | 853 } |
| 859 | 854 |
| 860 void AwContents::OnAttachedToWindow(JNIEnv* env, | 855 void AwContents::OnAttachedToWindow(JNIEnv* env, |
| 861 const JavaParamRef<jobject>& obj, | 856 const JavaParamRef<jobject>& obj, |
| 862 int w, | 857 int w, |
| 863 int h) { | 858 int h) { |
| 864 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 859 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 865 browser_view_renderer_.OnAttachedToWindow(w, h); | 860 browser_view_renderer_.OnAttachedToWindow(w, h); |
| 866 } | 861 } |
| 867 | 862 |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1286 int routing_id = new_host->GetRoutingID(); | 1281 int routing_id = new_host->GetRoutingID(); |
| 1287 // At this point, the current RVH may or may not contain a compositor. So | 1282 // At this point, the current RVH may or may not contain a compositor. So |
| 1288 // compositor_ may be nullptr, in which case | 1283 // compositor_ may be nullptr, in which case |
| 1289 // BrowserViewRenderer::DidInitializeCompositor() callback is time when the | 1284 // BrowserViewRenderer::DidInitializeCompositor() callback is time when the |
| 1290 // new compositor is constructed. | 1285 // new compositor is constructed. |
| 1291 browser_view_renderer_.SetActiveCompositorID( | 1286 browser_view_renderer_.SetActiveCompositorID( |
| 1292 CompositorID(process_id, routing_id)); | 1287 CompositorID(process_id, routing_id)); |
| 1293 } | 1288 } |
| 1294 | 1289 |
| 1295 } // namespace android_webview | 1290 } // namespace android_webview |
| OLD | NEW |