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

Side by Side Diff: chrome/browser/android/contextualsearch/contextual_search_tab_helper.cc

Issue 2209993003: Add missing using statements for JNI types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/contextualsearch/contextual_search_tab_helper.h " 5 #include "chrome/browser/android/contextualsearch/contextual_search_tab_helper.h "
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.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"
11 #include "chrome/common/pref_names.h" 11 #include "chrome/common/pref_names.h"
12 #include "components/prefs/pref_change_registrar.h" 12 #include "components/prefs/pref_change_registrar.h"
13 #include "jni/ContextualSearchTabHelper_jni.h" 13 #include "jni/ContextualSearchTabHelper_jni.h"
14 14
15 using base::android::JavaParamRef;
16 using base::android::ScopedJavaLocalRef;
15 17
16 ContextualSearchTabHelper::ContextualSearchTabHelper(JNIEnv* env, 18 ContextualSearchTabHelper::ContextualSearchTabHelper(JNIEnv* env,
17 jobject obj, 19 jobject obj,
18 Profile* profile) 20 Profile* profile)
19 : weak_java_ref_(env, obj), 21 : weak_java_ref_(env, obj),
20 pref_change_registrar_(new PrefChangeRegistrar()), 22 pref_change_registrar_(new PrefChangeRegistrar()),
21 weak_factory_(this) { 23 weak_factory_(this) {
22 pref_change_registrar_->Init(profile->GetPrefs()); 24 pref_change_registrar_->Init(profile->GetPrefs());
23 pref_change_registrar_->Add( 25 pref_change_registrar_->Add(
24 prefs::kContextualSearchEnabled, 26 prefs::kContextualSearchEnabled,
(...skipping 22 matching lines...) Expand all
47 Profile* profile = ProfileAndroid::FromProfileAndroid(java_profile); 49 Profile* profile = ProfileAndroid::FromProfileAndroid(java_profile);
48 CHECK(profile); 50 CHECK(profile);
49 ContextualSearchTabHelper* tab = new ContextualSearchTabHelper( 51 ContextualSearchTabHelper* tab = new ContextualSearchTabHelper(
50 env, obj, profile); 52 env, obj, profile);
51 return reinterpret_cast<intptr_t>(tab); 53 return reinterpret_cast<intptr_t>(tab);
52 } 54 }
53 55
54 bool RegisterContextualSearchTabHelper(JNIEnv* env) { 56 bool RegisterContextualSearchTabHelper(JNIEnv* env) {
55 return RegisterNativesImpl(env); 57 return RegisterNativesImpl(env);
56 } 58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698