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

Side by Side Diff: chrome/browser/android/shortcut_helper.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/android/shortcut_helper.h" 5 #include "chrome/browser/android/shortcut_helper.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 NOTREACHED(); 198 NOTREACHED();
199 } 199 }
200 } 200 }
201 201
202 // Adds a shortcut to the current URL to the Android home screen, firing 202 // Adds a shortcut to the current URL to the Android home screen, firing
203 // background tasks to pull all the data required. 203 // background tasks to pull all the data required.
204 // Note that we don't actually care about the tab here -- we just want 204 // Note that we don't actually care about the tab here -- we just want
205 // its otherwise inaccessible WebContents. 205 // its otherwise inaccessible WebContents.
206 static void AddShortcut(JNIEnv* env, 206 static void AddShortcut(JNIEnv* env,
207 jclass clazz, 207 jclass clazz,
208 jint tab_android_ptr, 208 jlong tab_android_ptr,
209 jstring title, 209 jstring title,
210 jint launcher_large_icon_size) { 210 jint launcher_large_icon_size) {
211 TabAndroid* tab = reinterpret_cast<TabAndroid*>(tab_android_ptr); 211 TabAndroid* tab = reinterpret_cast<TabAndroid*>(tab_android_ptr);
212 ShortcutHelper::AddShortcut( 212 ShortcutHelper::AddShortcut(
213 tab->web_contents(), 213 tab->web_contents(),
214 base::android::ConvertJavaStringToUTF16(env, title), 214 base::android::ConvertJavaStringToUTF16(env, title),
215 launcher_large_icon_size); 215 launcher_large_icon_size);
216 } 216 }
OLDNEW
« no previous file with comments | « chrome/browser/android/recently_closed_tabs_bridge.cc ('k') | chrome/browser/android/signin/signin_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698