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