| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/infobar_container_android.h" | 5 #include "chrome/browser/ui/android/infobars/infobar_container_android.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "chrome/browser/infobars/infobar_service.h" | 10 #include "chrome/browser/infobars/infobar_service.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 void InfoBarContainerAndroid::PlatformSpecificRemoveInfoBar( | 76 void InfoBarContainerAndroid::PlatformSpecificRemoveInfoBar( |
| 77 infobars::InfoBar* infobar) { | 77 infobars::InfoBar* infobar) { |
| 78 InfoBarAndroid* android_infobar = static_cast<InfoBarAndroid*>(infobar); | 78 InfoBarAndroid* android_infobar = static_cast<InfoBarAndroid*>(infobar); |
| 79 android_infobar->CloseJavaInfoBar(); | 79 android_infobar->CloseJavaInfoBar(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 | 82 |
| 83 // Native JNI methods --------------------------------------------------------- | 83 // Native JNI methods --------------------------------------------------------- |
| 84 | 84 |
| 85 static jlong Init(JNIEnv* env, jobject obj) { | 85 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
| 86 InfoBarContainerAndroid* infobar_container = | 86 InfoBarContainerAndroid* infobar_container = |
| 87 new InfoBarContainerAndroid(env, obj); | 87 new InfoBarContainerAndroid(env, obj); |
| 88 return reinterpret_cast<intptr_t>(infobar_container); | 88 return reinterpret_cast<intptr_t>(infobar_container); |
| 89 } | 89 } |
| 90 | 90 |
| 91 bool RegisterInfoBarContainer(JNIEnv* env) { | 91 bool RegisterInfoBarContainer(JNIEnv* env) { |
| 92 return RegisterNativesImpl(env); | 92 return RegisterNativesImpl(env); |
| 93 } | 93 } |
| OLD | NEW |