| OLD | NEW |
| 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_OMNIBOX_AUTOCOMPLETE_CONTROLLER_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_OMNIBOX_AUTOCOMPLETE_CONTROLLER_ANDROID_H_ |
| 6 #define CHROME_BROWSER_ANDROID_OMNIBOX_AUTOCOMPLETE_CONTROLLER_ANDROID_H_ | 6 #define CHROME_BROWSER_ANDROID_OMNIBOX_AUTOCOMPLETE_CONTROLLER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/android/jni_weak_ref.h" | 10 #include "base/android/jni_weak_ref.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 jlong elapsed_time_since_first_modified, | 63 jlong elapsed_time_since_first_modified, |
| 64 jobject j_web_contents); | 64 jobject j_web_contents); |
| 65 void DeleteSuggestion(JNIEnv* env, jobject obj, int selected_index); | 65 void DeleteSuggestion(JNIEnv* env, jobject obj, int selected_index); |
| 66 base::android::ScopedJavaLocalRef<jstring> | 66 base::android::ScopedJavaLocalRef<jstring> |
| 67 UpdateMatchDestinationURLWithQueryFormulationTime( | 67 UpdateMatchDestinationURLWithQueryFormulationTime( |
| 68 JNIEnv* env, | 68 JNIEnv* env, |
| 69 jobject obj, | 69 jobject obj, |
| 70 jint selected_index, | 70 jint selected_index, |
| 71 jlong elapsed_time_since_input_change); | 71 jlong elapsed_time_since_input_change); |
| 72 | 72 |
| 73 base::android::ScopedJavaLocalRef<jobject> GetTopSynchronousMatch( | |
| 74 JNIEnv* env, | |
| 75 jobject obj, | |
| 76 jstring query); | |
| 77 | |
| 78 // KeyedService: | 73 // KeyedService: |
| 79 virtual void Shutdown() override; | 74 virtual void Shutdown() override; |
| 80 | 75 |
| 81 class Factory : public BrowserContextKeyedServiceFactory { | 76 class Factory : public BrowserContextKeyedServiceFactory { |
| 82 public: | 77 public: |
| 83 static AutocompleteControllerAndroid* GetForProfile(Profile* profile, | 78 static AutocompleteControllerAndroid* GetForProfile(Profile* profile, |
| 84 JNIEnv* env, | 79 JNIEnv* env, |
| 85 jobject obj); | 80 jobject obj); |
| 86 | 81 |
| 87 static Factory* GetInstance(); | 82 static Factory* GetInstance(); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 JavaObjectWeakGlobalRef weak_java_autocomplete_controller_android_; | 143 JavaObjectWeakGlobalRef weak_java_autocomplete_controller_android_; |
| 149 Profile* profile_; | 144 Profile* profile_; |
| 150 | 145 |
| 151 DISALLOW_COPY_AND_ASSIGN(AutocompleteControllerAndroid); | 146 DISALLOW_COPY_AND_ASSIGN(AutocompleteControllerAndroid); |
| 152 }; | 147 }; |
| 153 | 148 |
| 154 // Registers the LocationBar native method. | 149 // Registers the LocationBar native method. |
| 155 bool RegisterAutocompleteControllerAndroid(JNIEnv* env); | 150 bool RegisterAutocompleteControllerAndroid(JNIEnv* env); |
| 156 | 151 |
| 157 #endif // CHROME_BROWSER_ANDROID_OMNIBOX_AUTOCOMPLETE_CONTROLLER_ANDROID_H_ | 152 #endif // CHROME_BROWSER_ANDROID_OMNIBOX_AUTOCOMPLETE_CONTROLLER_ANDROID_H_ |
| OLD | NEW |