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

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

Issue 1312153003: jni_generator: Pass object parameters as JavaParamRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/infobar_container_android.h" 5 #include "chrome/browser/ui/android/infobars/infobar_container_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chrome/browser/infobars/infobar_service.h" 10 #include "chrome/browser/infobars/infobar_service.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 void InfoBarContainerAndroid::PlatformSpecificRemoveInfoBar( 76 void InfoBarContainerAndroid::PlatformSpecificRemoveInfoBar(
77 infobars::InfoBar* infobar) { 77 infobars::InfoBar* infobar) {
78 InfoBarAndroid* android_infobar = static_cast<InfoBarAndroid*>(infobar); 78 InfoBarAndroid* android_infobar = static_cast<InfoBarAndroid*>(infobar);
79 android_infobar->CloseJavaInfoBar(); 79 android_infobar->CloseJavaInfoBar();
80 } 80 }
81 81
82 82
83 // Native JNI methods --------------------------------------------------------- 83 // Native JNI methods ---------------------------------------------------------
84 84
85 static jlong Init(JNIEnv* env, jobject obj) { 85 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
86 InfoBarContainerAndroid* infobar_container = 86 InfoBarContainerAndroid* infobar_container =
87 new InfoBarContainerAndroid(env, obj); 87 new InfoBarContainerAndroid(env, obj);
88 return reinterpret_cast<intptr_t>(infobar_container); 88 return reinterpret_cast<intptr_t>(infobar_container);
89 } 89 }
90 90
91 bool RegisterInfoBarContainer(JNIEnv* env) { 91 bool RegisterInfoBarContainer(JNIEnv* env) {
92 return RegisterNativesImpl(env); 92 return RegisterNativesImpl(env);
93 } 93 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698