OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/android/tab_state.h" | 5 #include "chrome/browser/android/tab_state.h" |
6 | 6 |
7 #include <jni.h> | 7 #include <jni.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "components/sessions/content/content_serialized_navigation_builder.h" | 23 #include "components/sessions/content/content_serialized_navigation_builder.h" |
24 #include "components/sessions/core/serialized_navigation_entry.h" | 24 #include "components/sessions/core/serialized_navigation_entry.h" |
25 #include "components/sessions/core/session_command.h" | 25 #include "components/sessions/core/session_command.h" |
26 #include "content/public/browser/navigation_controller.h" | 26 #include "content/public/browser/navigation_controller.h" |
27 #include "content/public/browser/navigation_entry.h" | 27 #include "content/public/browser/navigation_entry.h" |
28 #include "content/public/browser/web_contents.h" | 28 #include "content/public/browser/web_contents.h" |
29 #include "jni/TabState_jni.h" | 29 #include "jni/TabState_jni.h" |
30 | 30 |
31 using base::android::ConvertUTF16ToJavaString; | 31 using base::android::ConvertUTF16ToJavaString; |
32 using base::android::ConvertUTF8ToJavaString; | 32 using base::android::ConvertUTF8ToJavaString; |
| 33 using base::android::JavaParamRef; |
33 using base::android::ScopedJavaLocalRef; | 34 using base::android::ScopedJavaLocalRef; |
34 using content::NavigationController; | 35 using content::NavigationController; |
35 using content::WebContents; | 36 using content::WebContents; |
36 | 37 |
37 namespace { | 38 namespace { |
38 | 39 |
39 bool WriteStateHeaderToPickle(bool off_the_record, | 40 bool WriteStateHeaderToPickle(bool off_the_record, |
40 int entry_count, | 41 int entry_count, |
41 int current_entry_index, | 42 int current_entry_index, |
42 base::Pickle* pickle) { | 43 base::Pickle* pickle) { |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 WebContentsState::RestoreContentsFromByteBuffer(env, clazz, state, | 574 WebContentsState::RestoreContentsFromByteBuffer(env, clazz, state, |
574 saved_state_version, true) | 575 saved_state_version, true) |
575 .obj())); | 576 .obj())); |
576 if (web_contents.get()) | 577 if (web_contents.get()) |
577 TabAndroid::CreateHistoricalTabFromContents(web_contents.get()); | 578 TabAndroid::CreateHistoricalTabFromContents(web_contents.get()); |
578 } | 579 } |
579 | 580 |
580 bool RegisterTabState(JNIEnv* env) { | 581 bool RegisterTabState(JNIEnv* env) { |
581 return RegisterNativesImpl(env); | 582 return RegisterNativesImpl(env); |
582 } | 583 } |
OLD | NEW |