| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/ui/android/infobars/app_banner_infobar.h" | 5 #include "chrome/browser/ui/android/infobars/app_banner_infobar.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
| 10 #include "chrome/browser/android/banners/app_banner_infobar_delegate.h" | 10 #include "chrome/browser/android/banners/app_banner_infobar_delegate.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 reinterpret_cast<intptr_t>(this), | 68 reinterpret_cast<intptr_t>(this), |
| 69 app_title.obj(), | 69 app_title.obj(), |
| 70 java_bitmap.obj(), | 70 java_bitmap.obj(), |
| 71 app_url.obj())); | 71 app_url.obj())); |
| 72 } | 72 } |
| 73 | 73 |
| 74 java_infobar_.Reset(env, infobar.obj()); | 74 java_infobar_.Reset(env, infobar.obj()); |
| 75 return infobar; | 75 return infobar; |
| 76 } | 76 } |
| 77 | 77 |
| 78 void AppBannerInfoBar::OnInstallStateChanged(int new_state) { |
| 79 JNIEnv* env = base::android::AttachCurrentThread(); |
| 80 Java_AppBannerInfoBar_onInstallStateChanged(env, |
| 81 java_infobar_.obj(), |
| 82 new_state); |
| 83 } |
| 84 |
| 78 // Native JNI methods --------------------------------------------------------- | 85 // Native JNI methods --------------------------------------------------------- |
| 79 | 86 |
| 80 bool RegisterAppBannerInfoBarDelegate(JNIEnv* env) { | 87 bool RegisterAppBannerInfoBarDelegate(JNIEnv* env) { |
| 81 return RegisterNativesImpl(env); | 88 return RegisterNativesImpl(env); |
| 82 } | 89 } |
| OLD | NEW |