OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_android.h" | 5 #include "chrome/browser/android/tab_android.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 return Java_Tab_loadIfNeeded(env, weak_java_tab_.get(env)); | 181 return Java_Tab_loadIfNeeded(env, weak_java_tab_.get(env)); |
182 } | 182 } |
183 | 183 |
184 Profile* TabAndroid::GetProfile() const { | 184 Profile* TabAndroid::GetProfile() const { |
185 if (!web_contents()) | 185 if (!web_contents()) |
186 return NULL; | 186 return NULL; |
187 | 187 |
188 return Profile::FromBrowserContext(web_contents()->GetBrowserContext()); | 188 return Profile::FromBrowserContext(web_contents()->GetBrowserContext()); |
189 } | 189 } |
190 | 190 |
191 browser_sync::SyncedTabDelegate* TabAndroid::GetSyncedTabDelegate() const { | 191 sync_sessions::SyncedTabDelegate* TabAndroid::GetSyncedTabDelegate() const { |
192 return synced_tab_delegate_.get(); | 192 return synced_tab_delegate_.get(); |
193 } | 193 } |
194 | 194 |
195 void TabAndroid::SetWindowSessionID(SessionID::id_type window_id) { | 195 void TabAndroid::SetWindowSessionID(SessionID::id_type window_id) { |
196 session_window_id_.set_id(window_id); | 196 session_window_id_.set_id(window_id); |
197 | 197 |
198 if (!web_contents()) | 198 if (!web_contents()) |
199 return; | 199 return; |
200 | 200 |
201 SessionTabHelper* session_tab_helper = | 201 SessionTabHelper* session_tab_helper = |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 static void Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { | 913 static void Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
914 TRACE_EVENT0("native", "TabAndroid::Init"); | 914 TRACE_EVENT0("native", "TabAndroid::Init"); |
915 // This will automatically bind to the Java object and pass ownership there. | 915 // This will automatically bind to the Java object and pass ownership there. |
916 new TabAndroid(env, obj); | 916 new TabAndroid(env, obj); |
917 } | 917 } |
918 | 918 |
919 // static | 919 // static |
920 bool TabAndroid::RegisterTabAndroid(JNIEnv* env) { | 920 bool TabAndroid::RegisterTabAndroid(JNIEnv* env) { |
921 return RegisterNativesImpl(env); | 921 return RegisterNativesImpl(env); |
922 } | 922 } |
OLD | NEW |