| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 web_contents_.reset(content_view_core->GetWebContents()); | 382 web_contents_.reset(content_view_core->GetWebContents()); |
| 383 AttachTabHelpers(web_contents_.get()); | 383 AttachTabHelpers(web_contents_.get()); |
| 384 | 384 |
| 385 SetWindowSessionID(session_window_id_.id()); | 385 SetWindowSessionID(session_window_id_.id()); |
| 386 | 386 |
| 387 session_tab_id_.set_id( | 387 session_tab_id_.set_id( |
| 388 SessionTabHelper::FromWebContents(web_contents())->session_id().id()); | 388 SessionTabHelper::FromWebContents(web_contents())->session_id().id()); |
| 389 ContextMenuHelper::FromWebContents(web_contents())->SetPopulator( | 389 ContextMenuHelper::FromWebContents(web_contents())->SetPopulator( |
| 390 jcontext_menu_populator); | 390 jcontext_menu_populator); |
| 391 ViewAndroidHelper::FromWebContents(web_contents())-> | 391 ViewAndroidHelper::FromWebContents(web_contents())-> |
| 392 SetViewAndroid(content_view_core); | 392 SetViewAndroid(web_contents()->GetNativeView()); |
| 393 CoreTabHelper::FromWebContents(web_contents())->set_delegate(this); | 393 CoreTabHelper::FromWebContents(web_contents())->set_delegate(this); |
| 394 SearchTabHelper::FromWebContents(web_contents())->set_delegate(this); | 394 SearchTabHelper::FromWebContents(web_contents())->set_delegate(this); |
| 395 web_contents_delegate_.reset( | 395 web_contents_delegate_.reset( |
| 396 new chrome::android::TabWebContentsDelegateAndroid( | 396 new chrome::android::TabWebContentsDelegateAndroid( |
| 397 env, jweb_contents_delegate)); | 397 env, jweb_contents_delegate)); |
| 398 web_contents_delegate_->LoadProgressChanged(web_contents(), 0); | 398 web_contents_delegate_->LoadProgressChanged(web_contents(), 0); |
| 399 web_contents()->SetDelegate(web_contents_delegate_.get()); | 399 web_contents()->SetDelegate(web_contents_delegate_.get()); |
| 400 | 400 |
| 401 notification_registrar_.Add( | 401 notification_registrar_.Add( |
| 402 this, | 402 this, |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 static void Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { | 901 static void Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
| 902 TRACE_EVENT0("native", "TabAndroid::Init"); | 902 TRACE_EVENT0("native", "TabAndroid::Init"); |
| 903 // This will automatically bind to the Java object and pass ownership there. | 903 // This will automatically bind to the Java object and pass ownership there. |
| 904 new TabAndroid(env, obj); | 904 new TabAndroid(env, obj); |
| 905 } | 905 } |
| 906 | 906 |
| 907 // static | 907 // static |
| 908 bool TabAndroid::RegisterTabAndroid(JNIEnv* env) { | 908 bool TabAndroid::RegisterTabAndroid(JNIEnv* env) { |
| 909 return RegisterNativesImpl(env); | 909 return RegisterNativesImpl(env); |
| 910 } | 910 } |
| OLD | NEW |