Index: chrome/browser/android/instantapps/instant_apps_infobar_delegate.h |
diff --git a/chrome/browser/android/instantapps/instant_apps_infobar_delegate.h b/chrome/browser/android/instantapps/instant_apps_infobar_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5275826ab0d8ae273e680de2505503243f38ac79 |
--- /dev/null |
+++ b/chrome/browser/android/instantapps/instant_apps_infobar_delegate.h |
@@ -0,0 +1,40 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_ANDROID_INSTANTAPPS_INSTANT_APPS_INFOBAR_DELEGATE_H_ |
+#define CHROME_BROWSER_ANDROID_INSTANTAPPS_INSTANT_APPS_INFOBAR_DELEGATE_H_ |
+ |
+#include "base/android/jni_android.h" |
+#include "base/strings/string16.h" |
+#include "components/infobars/core/confirm_infobar_delegate.h" |
+#include "components/infobars/core/infobar_delegate.h" |
+ |
+class InfoBarService; |
+ |
+class InstantAppsInfoBarDelegate : public ConfirmInfoBarDelegate { |
+ public: |
+ ~InstantAppsInfoBarDelegate() override; |
+ |
+ static void Create(InfoBarService* infobar_service, |
+ jobject jdata); |
+ base::android::ScopedJavaGlobalRef<jobject> data() { return data_; } |
Peter Kasting
2016/08/24 04:04:06
Nit: I'd put a blank line above this
Maria
2016/08/24 17:53:49
Done.
|
+ |
+ private: |
+ explicit InstantAppsInfoBarDelegate(jobject jdata); |
+ |
+ // ConfirmInfoBarDelegate: |
+ infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const; |
+ base::string16 GetMessageText() const; |
+ bool Accept(); |
+ |
+ base::android::ScopedJavaGlobalRef<jobject> java_delegate_; |
+ base::android::ScopedJavaGlobalRef<jobject> data_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(InstantAppsInfoBarDelegate); |
+}; |
+ |
+// Register native methods. |
+bool RegisterInstantAppsInfoBarDelegate(JNIEnv* env); |
+ |
+#endif // CHROME_BROWSER_ANDROID_INSTANTAPPS_INSTANT_APPS_INFOBAR_DELEGATE_H_ |