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

Side by Side Diff: chrome/browser/android/omnibox/omnibox_prerender.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/omnibox/omnibox_prerender.h" 5 #include "chrome/browser/android/omnibox/omnibox_prerender.h"
6 6
7 #include "base/android/jni_string.h" 7 #include "base/android/jni_string.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/android/tab_android.h" 9 #include "chrome/browser/android/tab_android.h"
10 #include "chrome/browser/predictors/autocomplete_action_predictor.h" 10 #include "chrome/browser/predictors/autocomplete_action_predictor.h"
(...skipping 10 matching lines...) Expand all
21 using predictors::AutocompleteActionPredictor; 21 using predictors::AutocompleteActionPredictor;
22 using predictors::AutocompleteActionPredictorFactory; 22 using predictors::AutocompleteActionPredictorFactory;
23 23
24 OmniboxPrerender::OmniboxPrerender(JNIEnv* env, jobject obj) 24 OmniboxPrerender::OmniboxPrerender(JNIEnv* env, jobject obj)
25 : weak_java_omnibox_(env, obj) { 25 : weak_java_omnibox_(env, obj) {
26 } 26 }
27 27
28 OmniboxPrerender::~OmniboxPrerender() { 28 OmniboxPrerender::~OmniboxPrerender() {
29 } 29 }
30 30
31 static jlong Init(JNIEnv* env, jobject obj) { 31 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
32 OmniboxPrerender* omnibox = new OmniboxPrerender(env, obj); 32 OmniboxPrerender* omnibox = new OmniboxPrerender(env, obj);
33 return reinterpret_cast<intptr_t>(omnibox); 33 return reinterpret_cast<intptr_t>(omnibox);
34 } 34 }
35 35
36 bool RegisterOmniboxPrerender(JNIEnv* env) { 36 bool RegisterOmniboxPrerender(JNIEnv* env) {
37 return RegisterNativesImpl(env); 37 return RegisterNativesImpl(env);
38 } 38 }
39 39
40 void OmniboxPrerender::Clear(JNIEnv* env, 40 void OmniboxPrerender::Clear(JNIEnv* env,
41 jobject obj, 41 jobject obj,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 web_contents->GetController().GetDefaultSessionStorageNamespace(), 150 web_contents->GetController().GetDefaultSessionStorageNamespace(),
151 container_bounds.size()); 151 container_bounds.size());
152 return; 152 return;
153 } 153 }
154 predictors::AutocompleteActionPredictorFactory::GetForProfile(profile)-> 154 predictors::AutocompleteActionPredictorFactory::GetForProfile(profile)->
155 StartPrerendering( 155 StartPrerendering(
156 match.destination_url, 156 match.destination_url,
157 web_contents->GetController().GetDefaultSessionStorageNamespace(), 157 web_contents->GetController().GetDefaultSessionStorageNamespace(),
158 container_bounds.size()); 158 container_bounds.size());
159 } 159 }
OLDNEW
« no previous file with comments | « chrome/browser/android/omnibox/autocomplete_controller_android.cc ('k') | chrome/browser/android/password_ui_view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698