OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_INSTANTAPPS_INSTANT_APPS_INFOBAR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_INSTANTAPPS_INSTANT_APPS_INFOBAR_DELEGATE_H_ |
| 7 |
| 8 #include "base/android/jni_android.h" |
| 9 #include "base/strings/string16.h" |
| 10 #include "components/infobars/core/confirm_infobar_delegate.h" |
| 11 #include "components/infobars/core/infobar_delegate.h" |
| 12 |
| 13 class InstantAppsInfoBarDelegate : public ConfirmInfoBarDelegate { |
| 14 public: |
| 15 InstantAppsInfoBarDelegate( |
| 16 const base::android::ScopedJavaGlobalRef<jobject>& jdata); |
| 17 ~InstantAppsInfoBarDelegate() override; |
| 18 base::android::ScopedJavaGlobalRef<jobject> data() { return data_; } |
| 19 |
| 20 private: |
| 21 // ConfirmInfoBarDelegate: |
| 22 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const; |
| 23 base::string16 GetMessageText() const; |
| 24 bool Accept(); |
| 25 |
| 26 base::android::ScopedJavaGlobalRef<jobject> java_delegate_; |
| 27 base::android::ScopedJavaGlobalRef<jobject> data_; |
| 28 |
| 29 DISALLOW_COPY_AND_ASSIGN(InstantAppsInfoBarDelegate); |
| 30 }; |
| 31 |
| 32 // Register native methods. |
| 33 bool RegisterInstantAppsInfoBarDelegate(JNIEnv* env); |
| 34 |
| 35 #endif // CHROME_BROWSER_ANDROID_INSTANTAPPS_INSTANT_APPS_INFOBAR_DELEGATE_H_ |
OLD | NEW |