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

Side by Side Diff: chrome/browser/android/tab_state.h

Issue 1308363003: Revert of jni_generator: Make all object-returning natives return ScopedJavaLocalRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_ANDROID_TAB_STATE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_TAB_STATE_H_
6 #define CHROME_BROWSER_ANDROID_TAB_STATE_H_ 6 #define CHROME_BROWSER_ANDROID_TAB_STATE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 int size, int saved_state_version); 44 int size, int saved_state_version);
45 45
46 // Restores a WebContents from the passed in state. 46 // Restores a WebContents from the passed in state.
47 static content::WebContents* RestoreContentsFromByteBuffer( 47 static content::WebContents* RestoreContentsFromByteBuffer(
48 void* data, 48 void* data,
49 int size, 49 int size,
50 int saved_state_version, 50 int saved_state_version,
51 bool initially_hidden); 51 bool initially_hidden);
52 52
53 // Restores a WebContents from the passed in state. 53 // Restores a WebContents from the passed in state.
54 static base::android::ScopedJavaLocalRef<jobject> 54 static jobject RestoreContentsFromByteBuffer(
55 RestoreContentsFromByteBuffer(JNIEnv* env, 55 JNIEnv* env,
56 jclass clazz, 56 jclass clazz,
57 jobject state, 57 jobject state,
58 jint saved_state_version, 58 jint saved_state_version,
59 jboolean initially_hidden); 59 jboolean initially_hidden);
60 60
61 // Synthesizes a stub, single-navigation state for a tab that will be loaded 61 // Synthesizes a stub, single-navigation state for a tab that will be loaded
62 // lazily. 62 // lazily.
63 static base::android::ScopedJavaLocalRef<jobject> 63 static base::android::ScopedJavaLocalRef<jobject>
64 CreateSingleNavigationStateAsByteBuffer(JNIEnv* env, jstring url, 64 CreateSingleNavigationStateAsByteBuffer(JNIEnv* env, jstring url,
65 jstring referrer_url, 65 jstring referrer_url,
66 jint referrer_policy, 66 jint referrer_policy,
67 jboolean is_off_the_record); 67 jboolean is_off_the_record);
68 }; 68 };
69 69
70 // Registers methods for JNI. 70 // Registers methods for JNI.
71 bool RegisterTabState(JNIEnv* env); 71 bool RegisterTabState(JNIEnv* env);
72 72
73 #endif // CHROME_BROWSER_ANDROID_TAB_STATE_H_ 73 #endif // CHROME_BROWSER_ANDROID_TAB_STATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/profiles/profile_downloader_android.cc ('k') | chrome/browser/android/tab_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698