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

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

Issue 67573003: Android: moves chrome/ to use long for JNI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
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.h" 10 #include "chrome/browser/infobars/infobar.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 void InfoBarContainerAndroid::PlatformSpecificRemoveInfoBar(InfoBar* infobar) { 81 void InfoBarContainerAndroid::PlatformSpecificRemoveInfoBar(InfoBar* infobar) {
82 InfoBarAndroid* android_infobar = static_cast<InfoBarAndroid*>(infobar); 82 InfoBarAndroid* android_infobar = static_cast<InfoBarAndroid*>(infobar);
83 android_infobar->CloseJavaInfoBar(); 83 android_infobar->CloseJavaInfoBar();
84 base::MessageLoop::current()->DeleteSoon(FROM_HERE, infobar); 84 base::MessageLoop::current()->DeleteSoon(FROM_HERE, infobar);
85 } 85 }
86 86
87 87
88 // Native JNI methods --------------------------------------------------------- 88 // Native JNI methods ---------------------------------------------------------
89 89
90 static int Init(JNIEnv* env, 90 static jlong Init(JNIEnv* env,
91 jobject obj, 91 jobject obj,
92 jint native_web_contents, 92 jlong native_web_contents,
93 jobject auto_login_delegate) { 93 jobject auto_login_delegate) {
94 InfoBarContainerAndroid* infobar_container = 94 InfoBarContainerAndroid* infobar_container =
95 new InfoBarContainerAndroid(env, obj, auto_login_delegate); 95 new InfoBarContainerAndroid(env, obj, auto_login_delegate);
96 infobar_container->ChangeInfoBarService(InfoBarService::FromWebContents( 96 infobar_container->ChangeInfoBarService(InfoBarService::FromWebContents(
97 reinterpret_cast<content::WebContents*>(native_web_contents))); 97 reinterpret_cast<content::WebContents*>(native_web_contents)));
98 return reinterpret_cast<int>(infobar_container); 98 return reinterpret_cast<intptr_t>(infobar_container);
99 } 99 }
100 100
101 bool RegisterInfoBarContainer(JNIEnv* env) { 101 bool RegisterInfoBarContainer(JNIEnv* env) {
102 return RegisterNativesImpl(env); 102 return RegisterNativesImpl(env);
103 } 103 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/android/infobars/confirm_infobar.cc ('k') | chrome/browser/ui/android/infobars/translate_infobar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698