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

Unified Diff: chrome/browser/ui/android/infobars/instant_apps_infobar.cc

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
« no previous file with comments | « chrome/browser/ui/android/infobars/instant_apps_infobar.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/android/infobars/instant_apps_infobar.cc
diff --git a/chrome/browser/ui/android/infobars/instant_apps_infobar.cc b/chrome/browser/ui/android/infobars/instant_apps_infobar.cc
new file mode 100644
index 0000000000000000000000000000000000000000..173a16875508a6f0df2541c1962b03c91863d35d
--- /dev/null
+++ b/chrome/browser/ui/android/infobars/instant_apps_infobar.cc
@@ -0,0 +1,28 @@
+// 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.
+
+#include <chrome/browser/ui/android/infobars/instant_apps_infobar.h>
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_string.h"
+#include "base/android/scoped_java_ref.h"
+#include "chrome/browser/android/instantapps/instant_apps_infobar_delegate.h"
+#include "jni/InstantAppsInfoBar_jni.h"
+
+InstantAppsInfoBar::InstantAppsInfoBar(
+ std::unique_ptr<InstantAppsInfoBarDelegate> delegate)
+ : ConfirmInfoBar(std::move(delegate)) {}
+
+InstantAppsInfoBar::~InstantAppsInfoBar() {}
+
+base::android::ScopedJavaLocalRef<jobject>
+InstantAppsInfoBar::CreateRenderInfoBar(JNIEnv* env) {
+ InstantAppsInfoBarDelegate* delegate =
+ static_cast<InstantAppsInfoBarDelegate*>(GetDelegate());
+ base::android::ScopedJavaLocalRef<jobject> infobar;
+ infobar.Reset(Java_InstantAppsInfoBar_create(env, delegate->data().obj()));
+
+ java_infobar_.Reset(env, infobar.obj());
+ return infobar;
+}
« no previous file with comments | « chrome/browser/ui/android/infobars/instant_apps_infobar.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698