OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/browser/android/web_contents_observer_proxy.h" | 5 #include "content/browser/android/web_contents_observer_proxy.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
11 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
12 #include "content/browser/renderer_host/render_widget_host_impl.h" | 12 #include "content/browser/renderer_host/render_widget_host_impl.h" |
13 #include "content/browser/web_contents/web_contents_impl.h" | 13 #include "content/browser/web_contents/web_contents_impl.h" |
14 #include "content/common/android/media_metadata_android.h" | 14 #include "content/common/android/media_metadata_android.h" |
15 #include "content/public/browser/navigation_details.h" | 15 #include "content/public/browser/navigation_details.h" |
16 #include "content/public/browser/navigation_entry.h" | 16 #include "content/public/browser/navigation_entry.h" |
17 #include "content/public/browser/navigation_handle.h" | 17 #include "content/public/browser/navigation_handle.h" |
18 #include "jni/WebContentsObserverProxy_jni.h" | 18 #include "jni/WebContentsObserverProxy_jni.h" |
19 | 19 |
20 using base::android::AttachCurrentThread; | 20 using base::android::AttachCurrentThread; |
| 21 using base::android::JavaParamRef; |
21 using base::android::ScopedJavaLocalRef; | 22 using base::android::ScopedJavaLocalRef; |
22 using base::android::ConvertUTF8ToJavaString; | 23 using base::android::ConvertUTF8ToJavaString; |
23 using base::android::ConvertUTF16ToJavaString; | 24 using base::android::ConvertUTF16ToJavaString; |
24 | 25 |
25 namespace content { | 26 namespace content { |
26 | 27 |
27 // TODO(dcheng): File a bug. This class incorrectly passes just a frame ID, | 28 // TODO(dcheng): File a bug. This class incorrectly passes just a frame ID, |
28 // which is not sufficient to identify a frame (since frame IDs are scoped per | 29 // which is not sufficient to identify a frame (since frame IDs are scoped per |
29 // render process, and so may collide). | 30 // render process, and so may collide). |
30 WebContentsObserverProxy::WebContentsObserverProxy(JNIEnv* env, | 31 WebContentsObserverProxy::WebContentsObserverProxy(JNIEnv* env, |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 // a base URL if there has been a loadUrl("javascript:...") after | 337 // a base URL if there has been a loadUrl("javascript:...") after |
337 // loadDataWithBaseUrl. | 338 // loadDataWithBaseUrl. |
338 *url = base_url_of_last_started_data_url_.possibly_invalid_spec(); | 339 *url = base_url_of_last_started_data_url_.possibly_invalid_spec(); |
339 } | 340 } |
340 } | 341 } |
341 | 342 |
342 bool RegisterWebContentsObserverProxy(JNIEnv* env) { | 343 bool RegisterWebContentsObserverProxy(JNIEnv* env) { |
343 return RegisterNativesImpl(env); | 344 return RegisterNativesImpl(env); |
344 } | 345 } |
345 } // namespace content | 346 } // namespace content |
OLD | NEW |