| 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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 const JavaParamRef<jobject>& obj, | 751 const JavaParamRef<jobject>& obj, |
| 752 jint constraints, | 752 jint constraints, |
| 753 jint current, | 753 jint current, |
| 754 jboolean animate) { | 754 jboolean animate) { |
| 755 content::BrowserControlsState constraints_state = | 755 content::BrowserControlsState constraints_state = |
| 756 static_cast<content::BrowserControlsState>(constraints); | 756 static_cast<content::BrowserControlsState>(constraints); |
| 757 content::BrowserControlsState current_state = | 757 content::BrowserControlsState current_state = |
| 758 static_cast<content::BrowserControlsState>(current); | 758 static_cast<content::BrowserControlsState>(current); |
| 759 WebContents* sender = web_contents(); | 759 WebContents* sender = web_contents(); |
| 760 sender->Send(new ChromeViewMsg_UpdateBrowserControlsState( | 760 sender->Send(new ChromeViewMsg_UpdateBrowserControlsState( |
| 761 sender->GetRoutingID(), constraints_state, current_state, animate)); | 761 sender->GetRenderViewHost()->GetRoutingID(), constraints_state, |
| 762 current_state, animate)); |
| 762 | 763 |
| 763 if (sender->ShowingInterstitialPage()) { | 764 if (sender->ShowingInterstitialPage()) { |
| 764 content::RenderViewHost* interstitial_view_host = | 765 content::RenderViewHost* interstitial_view_host = |
| 765 sender->GetInterstitialPage()->GetMainFrame()->GetRenderViewHost(); | 766 sender->GetInterstitialPage()->GetMainFrame()->GetRenderViewHost(); |
| 766 interstitial_view_host->Send(new ChromeViewMsg_UpdateBrowserControlsState( | 767 interstitial_view_host->Send(new ChromeViewMsg_UpdateBrowserControlsState( |
| 767 interstitial_view_host->GetRoutingID(), constraints_state, | 768 interstitial_view_host->GetRoutingID(), constraints_state, |
| 768 current_state, animate)); | 769 current_state, animate)); |
| 769 } | 770 } |
| 770 } | 771 } |
| 771 | 772 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 static void Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { | 884 static void Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
| 884 TRACE_EVENT0("native", "TabAndroid::Init"); | 885 TRACE_EVENT0("native", "TabAndroid::Init"); |
| 885 // This will automatically bind to the Java object and pass ownership there. | 886 // This will automatically bind to the Java object and pass ownership there. |
| 886 new TabAndroid(env, obj); | 887 new TabAndroid(env, obj); |
| 887 } | 888 } |
| 888 | 889 |
| 889 // static | 890 // static |
| 890 bool TabAndroid::RegisterTabAndroid(JNIEnv* env) { | 891 bool TabAndroid::RegisterTabAndroid(JNIEnv* env) { |
| 891 return RegisterNativesImpl(env); | 892 return RegisterNativesImpl(env); |
| 892 } | 893 } |
| OLD | NEW |