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

Side by Side Diff: chrome/browser/android/recently_closed_tabs_bridge.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/android/recently_closed_tabs_bridge.h" 5 #include "chrome/browser/android/recently_closed_tabs_bridge.h"
6 6
7 #include "base/android/jni_string.h" 7 #include "base/android/jni_string.h"
8 #include "chrome/browser/android/tab_android.h" 8 #include "chrome/browser/android/tab_android.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_android.h" 10 #include "chrome/browser/profiles/profile_android.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // TabRestoreServiceFactory::GetForProfile() can return NULL (e.g. in 150 // TabRestoreServiceFactory::GetForProfile() can return NULL (e.g. in
151 // incognito mode). 151 // incognito mode).
152 if (tab_restore_service_) { 152 if (tab_restore_service_) {
153 // This does nothing if the tabs have already been loaded or they 153 // This does nothing if the tabs have already been loaded or they
154 // shouldn't be loaded. 154 // shouldn't be loaded.
155 tab_restore_service_->LoadTabsFromLastSession(); 155 tab_restore_service_->LoadTabsFromLastSession();
156 tab_restore_service_->AddObserver(this); 156 tab_restore_service_->AddObserver(this);
157 } 157 }
158 } 158 }
159 159
160 static jlong Init(JNIEnv* env, jobject obj, jobject jprofile) { 160 static jlong Init(JNIEnv* env,
161 const JavaParamRef<jobject>& obj,
162 const JavaParamRef<jobject>& jprofile) {
161 RecentlyClosedTabsBridge* bridge = new RecentlyClosedTabsBridge( 163 RecentlyClosedTabsBridge* bridge = new RecentlyClosedTabsBridge(
162 ProfileAndroid::FromProfileAndroid(jprofile)); 164 ProfileAndroid::FromProfileAndroid(jprofile));
163 return reinterpret_cast<intptr_t>(bridge); 165 return reinterpret_cast<intptr_t>(bridge);
164 } 166 }
165 167
166 // static 168 // static
167 bool RecentlyClosedTabsBridge::Register(JNIEnv* env) { 169 bool RecentlyClosedTabsBridge::Register(JNIEnv* env) {
168 return RegisterNativesImpl(env); 170 return RegisterNativesImpl(env);
169 } 171 }
OLDNEW
« no previous file with comments | « chrome/browser/android/rappor/rappor_service_bridge.cc ('k') | chrome/browser/android/rlz/revenue_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698