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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <chrome/browser/ui/android/infobars/instant_apps_infobar.h>
6
7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h"
9 #include "base/android/scoped_java_ref.h"
10 #include "chrome/browser/android/instantapps/instant_apps_infobar_delegate.h"
11 #include "jni/InstantAppsInfoBar_jni.h"
12
13 InstantAppsInfoBar::InstantAppsInfoBar(
14 std::unique_ptr<InstantAppsInfoBarDelegate> delegate)
15 : ConfirmInfoBar(std::move(delegate)) {}
16
17 InstantAppsInfoBar::~InstantAppsInfoBar() {}
18
19 base::android::ScopedJavaLocalRef<jobject>
20 InstantAppsInfoBar::CreateRenderInfoBar(JNIEnv* env) {
21 InstantAppsInfoBarDelegate* delegate =
22 static_cast<InstantAppsInfoBarDelegate*>(GetDelegate());
23 base::android::ScopedJavaLocalRef<jobject> infobar;
24 infobar.Reset(Java_InstantAppsInfoBar_create(env, delegate->data().obj()));
25
26 java_infobar_.Reset(env, infobar.obj());
27 return infobar;
28 }
OLDNEW
« 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