| 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 <limits> | 8 #include <limits> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/android/jni_android.h" | 11 #include "base/android/jni_android.h" |
| 12 #include "base/android/jni_string.h" | 12 #include "base/android/jni_string.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" |
| 16 #include "base/pickle.h" | 16 #include "base/pickle.h" |
| 17 #include "chrome/browser/android/tab_android.h" | 17 #include "chrome/browser/android/tab_android.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/profiles/profile_manager.h" | 19 #include "chrome/browser/profiles/profile_manager.h" |
| 20 #include "components/sessions/content/content_serialized_navigation_builder.h" | 20 #include "components/sessions/content/content_serialized_navigation_builder.h" |
| 21 #include "components/sessions/serialized_navigation_entry.h" | 21 #include "components/sessions/core/serialized_navigation_entry.h" |
| 22 #include "components/sessions/session_command.h" | 22 #include "components/sessions/core/session_command.h" |
| 23 #include "content/public/browser/navigation_controller.h" | 23 #include "content/public/browser/navigation_controller.h" |
| 24 #include "content/public/browser/navigation_entry.h" | 24 #include "content/public/browser/navigation_entry.h" |
| 25 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
| 26 #include "jni/TabState_jni.h" | 26 #include "jni/TabState_jni.h" |
| 27 | 27 |
| 28 using base::android::ConvertUTF16ToJavaString; | 28 using base::android::ConvertUTF16ToJavaString; |
| 29 using base::android::ConvertUTF8ToJavaString; | 29 using base::android::ConvertUTF8ToJavaString; |
| 30 using base::android::ScopedJavaLocalRef; | 30 using base::android::ScopedJavaLocalRef; |
| 31 using content::NavigationController; | 31 using content::NavigationController; |
| 32 using content::WebContents; | 32 using content::WebContents; |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 WebContentsState::RestoreContentsFromByteBuffer(env, clazz, state, | 572 WebContentsState::RestoreContentsFromByteBuffer(env, clazz, state, |
| 573 saved_state_version, true) | 573 saved_state_version, true) |
| 574 .obj())); | 574 .obj())); |
| 575 if (web_contents.get()) | 575 if (web_contents.get()) |
| 576 TabAndroid::CreateHistoricalTabFromContents(web_contents.get()); | 576 TabAndroid::CreateHistoricalTabFromContents(web_contents.get()); |
| 577 } | 577 } |
| 578 | 578 |
| 579 bool RegisterTabState(JNIEnv* env) { | 579 bool RegisterTabState(JNIEnv* env) { |
| 580 return RegisterNativesImpl(env); | 580 return RegisterNativesImpl(env); |
| 581 } | 581 } |
| OLD | NEW |