Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: chrome/browser/android/instantapps/instant_apps_infobar_delegate.h

Issue 2267463002: Implement instant apps infobar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix an import Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..2b385b358a472ccaaf37cbca5da33d9e0394ad80
--- /dev/null
+++ b/chrome/browser/android/instantapps/instant_apps_infobar_delegate.h
@@ -0,0 +1,42 @@
+// 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_; }
+
+ private:
+ explicit InstantAppsInfoBarDelegate(jobject jdata);
+
+ // ConfirmInfoBarDelegate:
+ infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
+ base::string16 GetMessageText() const override;
+ bool Accept() override;
+ bool EqualsDelegate(infobars::InfoBarDelegate* delegate) const override;
+
+ 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_
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | chrome/browser/android/instantapps/instant_apps_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698