| 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" |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 296 |
| 297 Java_WebContentsObserverProxy_mediaSessionStateChanged( | 297 Java_WebContentsObserverProxy_mediaSessionStateChanged( |
| 298 env, obj.obj(), is_controllable, is_suspended); | 298 env, obj.obj(), is_controllable, is_suspended); |
| 299 } | 299 } |
| 300 | 300 |
| 301 void WebContentsObserverProxy::SetToBaseURLForDataURLIfNeeded( | 301 void WebContentsObserverProxy::SetToBaseURLForDataURLIfNeeded( |
| 302 std::string* url) { | 302 std::string* url) { |
| 303 NavigationEntry* entry = | 303 NavigationEntry* entry = |
| 304 web_contents()->GetController().GetLastCommittedEntry(); | 304 web_contents()->GetController().GetLastCommittedEntry(); |
| 305 // Note that GetBaseURLForDataURL is only used by the Android WebView. | 305 // Note that GetBaseURLForDataURL is only used by the Android WebView. |
| 306 if (entry && !entry->GetBaseURLForDataURL().is_empty()) | 306 if (entry && !entry->GetDataURLWithBaseURL().is_empty()) |
| 307 *url = entry->GetBaseURLForDataURL().possibly_invalid_spec(); | 307 *url = entry->GetURL().possibly_invalid_spec(); |
| 308 } | 308 } |
| 309 | 309 |
| 310 bool RegisterWebContentsObserverProxy(JNIEnv* env) { | 310 bool RegisterWebContentsObserverProxy(JNIEnv* env) { |
| 311 return RegisterNativesImpl(env); | 311 return RegisterNativesImpl(env); |
| 312 } | 312 } |
| 313 } // namespace content | 313 } // namespace content |
| OLD | NEW |