| 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;
|
| +}
|
|
|