| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 if (status.valid && status.image.ToSkBitmap()->getSize() > 0) | 42 if (status.valid && status.image.ToSkBitmap()->getSize() > 0) |
| 43 j_bitmap = gfx::ConvertToJavaBitmap(status.image.ToSkBitmap()); | 43 j_bitmap = gfx::ConvertToJavaBitmap(status.image.ToSkBitmap()); |
| 44 | 44 |
| 45 return content::Java_NavigationControllerImpl_createNavigationEntry( | 45 return content::Java_NavigationControllerImpl_createNavigationEntry( |
| 46 env, | 46 env, |
| 47 index, | 47 index, |
| 48 j_url.obj(), | 48 j_url.obj(), |
| 49 j_virtual_url.obj(), | 49 j_virtual_url.obj(), |
| 50 j_original_url.obj(), | 50 j_original_url.obj(), |
| 51 j_title.obj(), | 51 j_title.obj(), |
| 52 j_bitmap.obj()); | 52 j_bitmap.obj(), |
| 53 entry->GetTransitionType()); |
| 53 } | 54 } |
| 54 | 55 |
| 55 static void AddNavigationEntryToHistory(JNIEnv* env, | 56 static void AddNavigationEntryToHistory(JNIEnv* env, |
| 56 jobject history, | 57 jobject history, |
| 57 content::NavigationEntry* entry, | 58 content::NavigationEntry* entry, |
| 58 int index) { | 59 int index) { |
| 59 content::Java_NavigationControllerImpl_addToNavigationHistory( | 60 content::Java_NavigationControllerImpl_addToNavigationHistory( |
| 60 env, | 61 env, |
| 61 history, | 62 history, |
| 62 CreateJavaNavigationEntry(env, entry, index).obj()); | 63 CreateJavaNavigationEntry(env, entry, index).obj()); |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 return navigation_controller_->GetLastCommittedEntryIndex(); | 334 return navigation_controller_->GetLastCommittedEntryIndex(); |
| 334 } | 335 } |
| 335 | 336 |
| 336 jboolean NavigationControllerAndroid::RemoveEntryAtIndex(JNIEnv* env, | 337 jboolean NavigationControllerAndroid::RemoveEntryAtIndex(JNIEnv* env, |
| 337 jobject obj, | 338 jobject obj, |
| 338 jint index) { | 339 jint index) { |
| 339 return navigation_controller_->RemoveEntryAtIndex(index); | 340 return navigation_controller_->RemoveEntryAtIndex(index); |
| 340 } | 341 } |
| 341 | 342 |
| 342 } // namespace content | 343 } // namespace content |
| OLD | NEW |