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

Side by Side Diff: chrome/browser/ui/android/infobars/app_banner_infobar.cc

Issue 871103004: Allow installing apps via the AppBannerInfoBar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pointers
Patch Set: Fix compile Created 5 years, 10 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/android/infobars/app_banner_infobar.h" 5 #include "chrome/browser/ui/android/infobars/app_banner_infobar.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "chrome/browser/android/banners/app_banner_infobar_delegate.h" 10 #include "chrome/browser/android/banners/app_banner_infobar_delegate.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 reinterpret_cast<intptr_t>(this), 68 reinterpret_cast<intptr_t>(this),
69 app_title.obj(), 69 app_title.obj(),
70 java_bitmap.obj(), 70 java_bitmap.obj(),
71 app_url.obj())); 71 app_url.obj()));
72 } 72 }
73 73
74 java_infobar_.Reset(env, infobar.obj()); 74 java_infobar_.Reset(env, infobar.obj());
75 return infobar; 75 return infobar;
76 } 76 }
77 77
78 void AppBannerInfoBar::OnInstallStateChanged(int new_state) {
79 JNIEnv* env = base::android::AttachCurrentThread();
80 Java_AppBannerInfoBar_onInstallStateChanged(env,
81 java_infobar_.obj(),
82 new_state);
83 }
84
78 // Native JNI methods --------------------------------------------------------- 85 // Native JNI methods ---------------------------------------------------------
79 86
80 bool RegisterAppBannerInfoBarDelegate(JNIEnv* env) { 87 bool RegisterAppBannerInfoBarDelegate(JNIEnv* env) {
81 return RegisterNativesImpl(env); 88 return RegisterNativesImpl(env);
82 } 89 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/android/infobars/app_banner_infobar.h ('k') | chrome/browser/ui/android/infobars/confirm_infobar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698