| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/frame_host/navigation_controller_android.h" | 5 #include "content/browser/frame_host/navigation_controller_android.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
| 9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
| 10 #include "content/browser/frame_host/navigation_entry_impl.h" | 10 #include "content/browser/frame_host/navigation_entry_impl.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 NavigationControllerAndroid::~NavigationControllerAndroid() { | 84 NavigationControllerAndroid::~NavigationControllerAndroid() { |
| 85 Java_NavigationControllerImpl_destroy(AttachCurrentThread(), obj_.obj()); | 85 Java_NavigationControllerImpl_destroy(AttachCurrentThread(), obj_.obj()); |
| 86 } | 86 } |
| 87 | 87 |
| 88 base::android::ScopedJavaLocalRef<jobject> | 88 base::android::ScopedJavaLocalRef<jobject> |
| 89 NavigationControllerAndroid::GetJavaObject() { | 89 NavigationControllerAndroid::GetJavaObject() { |
| 90 return base::android::ScopedJavaLocalRef<jobject>(obj_); | 90 return base::android::ScopedJavaLocalRef<jobject>(obj_); |
| 91 } | 91 } |
| 92 | 92 |
| 93 jboolean NavigationControllerAndroid::CanGoBack(JNIEnv* env, jobject obj) { | 93 jboolean NavigationControllerAndroid::CanGoBack( |
| 94 JNIEnv* env, |
| 95 const JavaParamRef<jobject>& obj) { |
| 94 return navigation_controller_->CanGoBack(); | 96 return navigation_controller_->CanGoBack(); |
| 95 } | 97 } |
| 96 | 98 |
| 97 jboolean NavigationControllerAndroid::CanGoForward(JNIEnv* env, | 99 jboolean NavigationControllerAndroid::CanGoForward( |
| 98 jobject obj) { | 100 JNIEnv* env, |
| 101 const JavaParamRef<jobject>& obj) { |
| 99 return navigation_controller_->CanGoForward(); | 102 return navigation_controller_->CanGoForward(); |
| 100 } | 103 } |
| 101 | 104 |
| 102 jboolean NavigationControllerAndroid::CanGoToOffset(JNIEnv* env, | 105 jboolean NavigationControllerAndroid::CanGoToOffset( |
| 103 jobject obj, | 106 JNIEnv* env, |
| 104 jint offset) { | 107 const JavaParamRef<jobject>& obj, |
| 108 jint offset) { |
| 105 return navigation_controller_->CanGoToOffset(offset); | 109 return navigation_controller_->CanGoToOffset(offset); |
| 106 } | 110 } |
| 107 | 111 |
| 108 void NavigationControllerAndroid::GoBack(JNIEnv* env, jobject obj) { | 112 void NavigationControllerAndroid::GoBack(JNIEnv* env, |
| 113 const JavaParamRef<jobject>& obj) { |
| 109 navigation_controller_->GoBack(); | 114 navigation_controller_->GoBack(); |
| 110 } | 115 } |
| 111 | 116 |
| 112 void NavigationControllerAndroid::GoForward(JNIEnv* env, jobject obj) { | 117 void NavigationControllerAndroid::GoForward(JNIEnv* env, |
| 118 const JavaParamRef<jobject>& obj) { |
| 113 navigation_controller_->GoForward(); | 119 navigation_controller_->GoForward(); |
| 114 } | 120 } |
| 115 | 121 |
| 116 void NavigationControllerAndroid::GoToOffset(JNIEnv* env, | 122 void NavigationControllerAndroid::GoToOffset(JNIEnv* env, |
| 117 jobject obj, | 123 const JavaParamRef<jobject>& obj, |
| 118 jint offset) { | 124 jint offset) { |
| 119 navigation_controller_->GoToOffset(offset); | 125 navigation_controller_->GoToOffset(offset); |
| 120 } | 126 } |
| 121 | 127 |
| 122 jboolean NavigationControllerAndroid::IsInitialNavigation(JNIEnv* env, | 128 jboolean NavigationControllerAndroid::IsInitialNavigation( |
| 123 jobject obj) { | 129 JNIEnv* env, |
| 130 const JavaParamRef<jobject>& obj) { |
| 124 return navigation_controller_->IsInitialNavigation(); | 131 return navigation_controller_->IsInitialNavigation(); |
| 125 } | 132 } |
| 126 | 133 |
| 127 void NavigationControllerAndroid::LoadIfNecessary(JNIEnv* env, jobject obj) { | 134 void NavigationControllerAndroid::LoadIfNecessary( |
| 135 JNIEnv* env, |
| 136 const JavaParamRef<jobject>& obj) { |
| 128 navigation_controller_->LoadIfNecessary(); | 137 navigation_controller_->LoadIfNecessary(); |
| 129 } | 138 } |
| 130 | 139 |
| 131 void NavigationControllerAndroid::ContinuePendingReload(JNIEnv* env, | 140 void NavigationControllerAndroid::ContinuePendingReload( |
| 132 jobject obj) { | 141 JNIEnv* env, |
| 142 const JavaParamRef<jobject>& obj) { |
| 133 navigation_controller_->ContinuePendingReload(); | 143 navigation_controller_->ContinuePendingReload(); |
| 134 } | 144 } |
| 135 | 145 |
| 136 void NavigationControllerAndroid::Reload(JNIEnv* env, | 146 void NavigationControllerAndroid::Reload(JNIEnv* env, |
| 137 jobject obj, | 147 const JavaParamRef<jobject>& obj, |
| 138 jboolean check_for_repost) { | 148 jboolean check_for_repost) { |
| 139 navigation_controller_->Reload(check_for_repost); | 149 navigation_controller_->Reload(check_for_repost); |
| 140 } | 150 } |
| 141 | 151 |
| 142 void NavigationControllerAndroid::ReloadIgnoringCache( | 152 void NavigationControllerAndroid::ReloadIgnoringCache( |
| 143 JNIEnv* env, | 153 JNIEnv* env, |
| 144 jobject obj, | 154 const JavaParamRef<jobject>& obj, |
| 145 jboolean check_for_repost) { | 155 jboolean check_for_repost) { |
| 146 navigation_controller_->ReloadIgnoringCache(check_for_repost); | 156 navigation_controller_->ReloadIgnoringCache(check_for_repost); |
| 147 } | 157 } |
| 148 | 158 |
| 149 void NavigationControllerAndroid::ReloadDisableLoFi( | 159 void NavigationControllerAndroid::ReloadDisableLoFi( |
| 150 JNIEnv* env, | 160 JNIEnv* env, |
| 151 jobject obj, | 161 const JavaParamRef<jobject>& obj, |
| 152 jboolean check_for_repost) { | 162 jboolean check_for_repost) { |
| 153 navigation_controller_->ReloadDisableLoFi(check_for_repost); | 163 navigation_controller_->ReloadDisableLoFi(check_for_repost); |
| 154 } | 164 } |
| 155 | 165 |
| 156 void NavigationControllerAndroid::RequestRestoreLoad(JNIEnv* env, jobject obj) { | 166 void NavigationControllerAndroid::RequestRestoreLoad( |
| 167 JNIEnv* env, |
| 168 const JavaParamRef<jobject>& obj) { |
| 157 navigation_controller_->SetNeedsReload(); | 169 navigation_controller_->SetNeedsReload(); |
| 158 } | 170 } |
| 159 | 171 |
| 160 void NavigationControllerAndroid::CancelPendingReload(JNIEnv* env, | 172 void NavigationControllerAndroid::CancelPendingReload( |
| 161 jobject obj) { | 173 JNIEnv* env, |
| 174 const JavaParamRef<jobject>& obj) { |
| 162 navigation_controller_->CancelPendingReload(); | 175 navigation_controller_->CancelPendingReload(); |
| 163 } | 176 } |
| 164 | 177 |
| 165 void NavigationControllerAndroid::GoToNavigationIndex(JNIEnv* env, | 178 void NavigationControllerAndroid::GoToNavigationIndex( |
| 166 jobject obj, | 179 JNIEnv* env, |
| 167 jint index) { | 180 const JavaParamRef<jobject>& obj, |
| 181 jint index) { |
| 168 navigation_controller_->GoToIndex(index); | 182 navigation_controller_->GoToIndex(index); |
| 169 } | 183 } |
| 170 | 184 |
| 171 void NavigationControllerAndroid::LoadUrl( | 185 void NavigationControllerAndroid::LoadUrl( |
| 172 JNIEnv* env, | 186 JNIEnv* env, |
| 173 jobject obj, | 187 const JavaParamRef<jobject>& obj, |
| 174 jstring url, | 188 const JavaParamRef<jstring>& url, |
| 175 jint load_url_type, | 189 jint load_url_type, |
| 176 jint transition_type, | 190 jint transition_type, |
| 177 jstring j_referrer_url, | 191 const JavaParamRef<jstring>& j_referrer_url, |
| 178 jint referrer_policy, | 192 jint referrer_policy, |
| 179 jint ua_override_option, | 193 jint ua_override_option, |
| 180 jstring extra_headers, | 194 const JavaParamRef<jstring>& extra_headers, |
| 181 jbyteArray post_data, | 195 const JavaParamRef<jbyteArray>& post_data, |
| 182 jstring base_url_for_data_url, | 196 const JavaParamRef<jstring>& base_url_for_data_url, |
| 183 jstring virtual_url_for_data_url, | 197 const JavaParamRef<jstring>& virtual_url_for_data_url, |
| 184 jboolean can_load_local_resources, | 198 jboolean can_load_local_resources, |
| 185 jboolean is_renderer_initiated, | 199 jboolean is_renderer_initiated, |
| 186 jboolean should_replace_current_entry) { | 200 jboolean should_replace_current_entry) { |
| 187 DCHECK(url); | 201 DCHECK(url); |
| 188 NavigationController::LoadURLParams params( | 202 NavigationController::LoadURLParams params( |
| 189 GURL(ConvertJavaStringToUTF8(env, url))); | 203 GURL(ConvertJavaStringToUTF8(env, url))); |
| 190 | 204 |
| 191 params.load_type = | 205 params.load_type = |
| 192 static_cast<NavigationController::LoadURLType>(load_url_type); | 206 static_cast<NavigationController::LoadURLType>(load_url_type); |
| 193 params.transition_type = ui::PageTransitionFromInt(transition_type); | 207 params.transition_type = ui::PageTransitionFromInt(transition_type); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 220 | 234 |
| 221 if (j_referrer_url) { | 235 if (j_referrer_url) { |
| 222 params.referrer = content::Referrer( | 236 params.referrer = content::Referrer( |
| 223 GURL(ConvertJavaStringToUTF8(env, j_referrer_url)), | 237 GURL(ConvertJavaStringToUTF8(env, j_referrer_url)), |
| 224 static_cast<blink::WebReferrerPolicy>(referrer_policy)); | 238 static_cast<blink::WebReferrerPolicy>(referrer_policy)); |
| 225 } | 239 } |
| 226 | 240 |
| 227 navigation_controller_->LoadURLWithParams(params); | 241 navigation_controller_->LoadURLWithParams(params); |
| 228 } | 242 } |
| 229 | 243 |
| 230 void NavigationControllerAndroid::ClearHistory(JNIEnv* env, jobject obj) { | 244 void NavigationControllerAndroid::ClearHistory( |
| 245 JNIEnv* env, |
| 246 const JavaParamRef<jobject>& obj) { |
| 231 // TODO(creis): Do callers of this need to know if it fails? | 247 // TODO(creis): Do callers of this need to know if it fails? |
| 232 if (navigation_controller_->CanPruneAllButLastCommitted()) | 248 if (navigation_controller_->CanPruneAllButLastCommitted()) |
| 233 navigation_controller_->PruneAllButLastCommitted(); | 249 navigation_controller_->PruneAllButLastCommitted(); |
| 234 } | 250 } |
| 235 | 251 |
| 236 jint NavigationControllerAndroid::GetNavigationHistory(JNIEnv* env, | 252 jint NavigationControllerAndroid::GetNavigationHistory( |
| 237 jobject obj, | 253 JNIEnv* env, |
| 238 jobject history) { | 254 const JavaParamRef<jobject>& obj, |
| 255 const JavaParamRef<jobject>& history) { |
| 239 // Iterate through navigation entries to populate the list | 256 // Iterate through navigation entries to populate the list |
| 240 int count = navigation_controller_->GetEntryCount(); | 257 int count = navigation_controller_->GetEntryCount(); |
| 241 for (int i = 0; i < count; ++i) { | 258 for (int i = 0; i < count; ++i) { |
| 242 AddNavigationEntryToHistory( | 259 AddNavigationEntryToHistory( |
| 243 env, history, navigation_controller_->GetEntryAtIndex(i), i); | 260 env, history, navigation_controller_->GetEntryAtIndex(i), i); |
| 244 } | 261 } |
| 245 | 262 |
| 246 return navigation_controller_->GetCurrentEntryIndex(); | 263 return navigation_controller_->GetCurrentEntryIndex(); |
| 247 } | 264 } |
| 248 | 265 |
| 249 void NavigationControllerAndroid::GetDirectedNavigationHistory( | 266 void NavigationControllerAndroid::GetDirectedNavigationHistory( |
| 250 JNIEnv* env, | 267 JNIEnv* env, |
| 251 jobject obj, | 268 const JavaParamRef<jobject>& obj, |
| 252 jobject history, | 269 const JavaParamRef<jobject>& history, |
| 253 jboolean is_forward, | 270 jboolean is_forward, |
| 254 jint max_entries) { | 271 jint max_entries) { |
| 255 // Iterate through navigation entries to populate the list | 272 // Iterate through navigation entries to populate the list |
| 256 int count = navigation_controller_->GetEntryCount(); | 273 int count = navigation_controller_->GetEntryCount(); |
| 257 int num_added = 0; | 274 int num_added = 0; |
| 258 int increment_value = is_forward ? 1 : -1; | 275 int increment_value = is_forward ? 1 : -1; |
| 259 for (int i = navigation_controller_->GetCurrentEntryIndex() + increment_value; | 276 for (int i = navigation_controller_->GetCurrentEntryIndex() + increment_value; |
| 260 i >= 0 && i < count; | 277 i >= 0 && i < count; |
| 261 i += increment_value) { | 278 i += increment_value) { |
| 262 if (num_added >= max_entries) | 279 if (num_added >= max_entries) |
| 263 break; | 280 break; |
| 264 | 281 |
| 265 AddNavigationEntryToHistory( | 282 AddNavigationEntryToHistory( |
| 266 env, history, navigation_controller_->GetEntryAtIndex(i), i); | 283 env, history, navigation_controller_->GetEntryAtIndex(i), i); |
| 267 num_added++; | 284 num_added++; |
| 268 } | 285 } |
| 269 } | 286 } |
| 270 | 287 |
| 271 ScopedJavaLocalRef<jstring> | 288 ScopedJavaLocalRef<jstring> |
| 272 NavigationControllerAndroid::GetOriginalUrlForVisibleNavigationEntry( | 289 NavigationControllerAndroid::GetOriginalUrlForVisibleNavigationEntry( |
| 273 JNIEnv* env, | 290 JNIEnv* env, |
| 274 jobject obj) { | 291 const JavaParamRef<jobject>& obj) { |
| 275 NavigationEntry* entry = navigation_controller_->GetVisibleEntry(); | 292 NavigationEntry* entry = navigation_controller_->GetVisibleEntry(); |
| 276 if (entry == NULL) | 293 if (entry == NULL) |
| 277 return ScopedJavaLocalRef<jstring>(env, NULL); | 294 return ScopedJavaLocalRef<jstring>(env, NULL); |
| 278 return ConvertUTF8ToJavaString(env, entry->GetOriginalRequestURL().spec()); | 295 return ConvertUTF8ToJavaString(env, entry->GetOriginalRequestURL().spec()); |
| 279 } | 296 } |
| 280 | 297 |
| 281 void NavigationControllerAndroid::ClearSslPreferences(JNIEnv* env, | 298 void NavigationControllerAndroid::ClearSslPreferences( |
| 282 jobject obj) { | 299 JNIEnv* env, |
| 300 const JavaParamRef<jobject>& obj) { |
| 283 content::SSLHostStateDelegate* delegate = | 301 content::SSLHostStateDelegate* delegate = |
| 284 navigation_controller_->GetBrowserContext()->GetSSLHostStateDelegate(); | 302 navigation_controller_->GetBrowserContext()->GetSSLHostStateDelegate(); |
| 285 if (delegate) | 303 if (delegate) |
| 286 delegate->Clear(); | 304 delegate->Clear(); |
| 287 } | 305 } |
| 288 | 306 |
| 289 bool NavigationControllerAndroid::GetUseDesktopUserAgent(JNIEnv* env, | 307 bool NavigationControllerAndroid::GetUseDesktopUserAgent( |
| 290 jobject obj) { | 308 JNIEnv* env, |
| 309 const JavaParamRef<jobject>& obj) { |
| 291 NavigationEntry* entry = navigation_controller_->GetVisibleEntry(); | 310 NavigationEntry* entry = navigation_controller_->GetVisibleEntry(); |
| 292 return entry && entry->GetIsOverridingUserAgent(); | 311 return entry && entry->GetIsOverridingUserAgent(); |
| 293 } | 312 } |
| 294 | 313 |
| 295 void NavigationControllerAndroid::SetUseDesktopUserAgent( | 314 void NavigationControllerAndroid::SetUseDesktopUserAgent( |
| 296 JNIEnv* env, | 315 JNIEnv* env, |
| 297 jobject obj, | 316 const JavaParamRef<jobject>& obj, |
| 298 jboolean enabled, | 317 jboolean enabled, |
| 299 jboolean reload_on_state_change) { | 318 jboolean reload_on_state_change) { |
| 300 if (GetUseDesktopUserAgent(env, obj) == enabled) | 319 if (GetUseDesktopUserAgent(env, obj) == enabled) |
| 301 return; | 320 return; |
| 302 | 321 |
| 303 // Make sure the navigation entry actually exists. | 322 // Make sure the navigation entry actually exists. |
| 304 NavigationEntry* entry = navigation_controller_->GetVisibleEntry(); | 323 NavigationEntry* entry = navigation_controller_->GetVisibleEntry(); |
| 305 if (!entry) | 324 if (!entry) |
| 306 return; | 325 return; |
| 307 | 326 |
| 308 // Set the flag in the NavigationEntry. | 327 // Set the flag in the NavigationEntry. |
| 309 entry->SetIsOverridingUserAgent(enabled); | 328 entry->SetIsOverridingUserAgent(enabled); |
| 310 | 329 |
| 311 // Send the override to the renderer. | 330 // Send the override to the renderer. |
| 312 if (reload_on_state_change) { | 331 if (reload_on_state_change) { |
| 313 // Reloading the page will send the override down as part of the | 332 // Reloading the page will send the override down as part of the |
| 314 // navigation IPC message. | 333 // navigation IPC message. |
| 315 navigation_controller_->ReloadOriginalRequestURL(false); | 334 navigation_controller_->ReloadOriginalRequestURL(false); |
| 316 } | 335 } |
| 317 } | 336 } |
| 318 | 337 |
| 319 base::android::ScopedJavaLocalRef<jobject> | 338 base::android::ScopedJavaLocalRef<jobject> |
| 320 NavigationControllerAndroid::GetEntryAtIndex(JNIEnv* env, | 339 NavigationControllerAndroid::GetEntryAtIndex(JNIEnv* env, |
| 321 jobject obj, | 340 const JavaParamRef<jobject>& obj, |
| 322 int index) { | 341 int index) { |
| 323 if (index < 0 || index >= navigation_controller_->GetEntryCount()) | 342 if (index < 0 || index >= navigation_controller_->GetEntryCount()) |
| 324 return base::android::ScopedJavaLocalRef<jobject>(); | 343 return base::android::ScopedJavaLocalRef<jobject>(); |
| 325 | 344 |
| 326 content::NavigationEntry* entry = | 345 content::NavigationEntry* entry = |
| 327 navigation_controller_->GetEntryAtIndex(index); | 346 navigation_controller_->GetEntryAtIndex(index); |
| 328 return CreateJavaNavigationEntry(env, entry, index); | 347 return CreateJavaNavigationEntry(env, entry, index); |
| 329 } | 348 } |
| 330 | 349 |
| 331 base::android::ScopedJavaLocalRef<jobject> | 350 base::android::ScopedJavaLocalRef<jobject> |
| 332 NavigationControllerAndroid::GetPendingEntry(JNIEnv* env, jobject obj) { | 351 NavigationControllerAndroid::GetPendingEntry(JNIEnv* env, |
| 352 const JavaParamRef<jobject>& obj) { |
| 333 content::NavigationEntry* entry = navigation_controller_->GetPendingEntry(); | 353 content::NavigationEntry* entry = navigation_controller_->GetPendingEntry(); |
| 334 | 354 |
| 335 if (!entry) | 355 if (!entry) |
| 336 return base::android::ScopedJavaLocalRef<jobject>(); | 356 return base::android::ScopedJavaLocalRef<jobject>(); |
| 337 | 357 |
| 338 return CreateJavaNavigationEntry( | 358 return CreateJavaNavigationEntry( |
| 339 env, entry, navigation_controller_->GetPendingEntryIndex()); | 359 env, entry, navigation_controller_->GetPendingEntryIndex()); |
| 340 } | 360 } |
| 341 | 361 |
| 342 jint NavigationControllerAndroid::GetLastCommittedEntryIndex(JNIEnv* env, | 362 jint NavigationControllerAndroid::GetLastCommittedEntryIndex( |
| 343 jobject obj) { | 363 JNIEnv* env, |
| 364 const JavaParamRef<jobject>& obj) { |
| 344 return navigation_controller_->GetLastCommittedEntryIndex(); | 365 return navigation_controller_->GetLastCommittedEntryIndex(); |
| 345 } | 366 } |
| 346 | 367 |
| 347 jboolean NavigationControllerAndroid::RemoveEntryAtIndex(JNIEnv* env, | 368 jboolean NavigationControllerAndroid::RemoveEntryAtIndex( |
| 348 jobject obj, | 369 JNIEnv* env, |
| 349 jint index) { | 370 const JavaParamRef<jobject>& obj, |
| 371 jint index) { |
| 350 return navigation_controller_->RemoveEntryAtIndex(index); | 372 return navigation_controller_->RemoveEntryAtIndex(index); |
| 351 } | 373 } |
| 352 | 374 |
| 353 jboolean NavigationControllerAndroid::CanCopyStateOver(JNIEnv* env, | 375 jboolean NavigationControllerAndroid::CanCopyStateOver( |
| 354 jobject obj) { | 376 JNIEnv* env, |
| 377 const JavaParamRef<jobject>& obj) { |
| 355 return navigation_controller_->GetEntryCount() == 0 && | 378 return navigation_controller_->GetEntryCount() == 0 && |
| 356 !navigation_controller_->GetPendingEntry(); | 379 !navigation_controller_->GetPendingEntry(); |
| 357 } | 380 } |
| 358 | 381 |
| 359 jboolean NavigationControllerAndroid::CanPruneAllButLastCommitted(JNIEnv* env, | 382 jboolean NavigationControllerAndroid::CanPruneAllButLastCommitted( |
| 360 jobject obj) { | 383 JNIEnv* env, |
| 384 const JavaParamRef<jobject>& obj) { |
| 361 return navigation_controller_->CanPruneAllButLastCommitted(); | 385 return navigation_controller_->CanPruneAllButLastCommitted(); |
| 362 } | 386 } |
| 363 | 387 |
| 364 void NavigationControllerAndroid::CopyStateFrom( | 388 void NavigationControllerAndroid::CopyStateFrom( |
| 365 JNIEnv* env, | 389 JNIEnv* env, |
| 366 jobject obj, | 390 const JavaParamRef<jobject>& obj, |
| 367 jlong source_navigation_controller_android) { | 391 jlong source_navigation_controller_android) { |
| 368 navigation_controller_->CopyStateFrom( | 392 navigation_controller_->CopyStateFrom( |
| 369 *(reinterpret_cast<NavigationControllerAndroid*>( | 393 *(reinterpret_cast<NavigationControllerAndroid*>( |
| 370 source_navigation_controller_android)->navigation_controller_)); | 394 source_navigation_controller_android)->navigation_controller_)); |
| 371 } | 395 } |
| 372 | 396 |
| 373 void NavigationControllerAndroid::CopyStateFromAndPrune( | 397 void NavigationControllerAndroid::CopyStateFromAndPrune( |
| 374 JNIEnv* env, | 398 JNIEnv* env, |
| 375 jobject obj, | 399 const JavaParamRef<jobject>& obj, |
| 376 jlong source_navigation_controller_android, | 400 jlong source_navigation_controller_android, |
| 377 jboolean replace_entry) { | 401 jboolean replace_entry) { |
| 378 navigation_controller_->CopyStateFromAndPrune( | 402 navigation_controller_->CopyStateFromAndPrune( |
| 379 reinterpret_cast<NavigationControllerAndroid*>( | 403 reinterpret_cast<NavigationControllerAndroid*>( |
| 380 source_navigation_controller_android)->navigation_controller_, | 404 source_navigation_controller_android)->navigation_controller_, |
| 381 replace_entry); | 405 replace_entry); |
| 382 } | 406 } |
| 383 | 407 |
| 384 } // namespace content | 408 } // namespace content |
| OLD | NEW |