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

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: Address more comments. 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..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_

Powered by Google App Engine
This is Rietveld 408576698