OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/provider/chrome_browser_provider.h" | 5 #include "chrome/browser/android/provider/chrome_browser_provider.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <list> | 10 #include <list> |
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 | 1169 |
1170 void ChromeBrowserProvider::BookmarkModelChanged() { | 1170 void ChromeBrowserProvider::BookmarkModelChanged() { |
1171 if (handling_extensive_changes_) | 1171 if (handling_extensive_changes_) |
1172 return; | 1172 return; |
1173 | 1173 |
1174 JNIEnv* env = AttachCurrentThread(); | 1174 JNIEnv* env = AttachCurrentThread(); |
1175 ScopedJavaLocalRef<jobject> obj = weak_java_provider_.get(env); | 1175 ScopedJavaLocalRef<jobject> obj = weak_java_provider_.get(env); |
1176 if (obj.is_null()) | 1176 if (obj.is_null()) |
1177 return; | 1177 return; |
1178 | 1178 |
1179 Java_ChromeBrowserProvider_onBookmarkChanged(env, obj.obj()); | 1179 Java_ChromeBrowserProvider_onBookmarkChanged(env, obj); |
1180 } | 1180 } |
1181 | 1181 |
1182 void ChromeBrowserProvider::OnHistoryChanged() { | 1182 void ChromeBrowserProvider::OnHistoryChanged() { |
1183 JNIEnv* env = AttachCurrentThread(); | 1183 JNIEnv* env = AttachCurrentThread(); |
1184 ScopedJavaLocalRef<jobject> obj = weak_java_provider_.get(env); | 1184 ScopedJavaLocalRef<jobject> obj = weak_java_provider_.get(env); |
1185 if (obj.is_null()) | 1185 if (obj.is_null()) |
1186 return; | 1186 return; |
1187 Java_ChromeBrowserProvider_onHistoryChanged(env, obj.obj()); | 1187 Java_ChromeBrowserProvider_onHistoryChanged(env, obj); |
1188 } | 1188 } |
1189 | 1189 |
1190 void ChromeBrowserProvider::OnURLVisited( | 1190 void ChromeBrowserProvider::OnURLVisited( |
1191 history::HistoryService* history_service, | 1191 history::HistoryService* history_service, |
1192 ui::PageTransition transition, | 1192 ui::PageTransition transition, |
1193 const history::URLRow& row, | 1193 const history::URLRow& row, |
1194 const history::RedirectList& redirects, | 1194 const history::RedirectList& redirects, |
1195 base::Time visit_time) { | 1195 base::Time visit_time) { |
1196 OnHistoryChanged(); | 1196 OnHistoryChanged(); |
1197 } | 1197 } |
1198 | 1198 |
1199 void ChromeBrowserProvider::OnURLsDeleted( | 1199 void ChromeBrowserProvider::OnURLsDeleted( |
1200 history::HistoryService* history_service, | 1200 history::HistoryService* history_service, |
1201 bool all_history, | 1201 bool all_history, |
1202 bool expired, | 1202 bool expired, |
1203 const history::URLRows& deleted_rows, | 1203 const history::URLRows& deleted_rows, |
1204 const std::set<GURL>& favicon_urls) { | 1204 const std::set<GURL>& favicon_urls) { |
1205 OnHistoryChanged(); | 1205 OnHistoryChanged(); |
1206 } | 1206 } |
1207 | 1207 |
1208 void ChromeBrowserProvider::OnKeywordSearchTermUpdated( | 1208 void ChromeBrowserProvider::OnKeywordSearchTermUpdated( |
1209 history::HistoryService* history_service, | 1209 history::HistoryService* history_service, |
1210 const history::URLRow& row, | 1210 const history::URLRow& row, |
1211 history::KeywordID keyword_id, | 1211 history::KeywordID keyword_id, |
1212 const base::string16& term) { | 1212 const base::string16& term) { |
1213 JNIEnv* env = AttachCurrentThread(); | 1213 JNIEnv* env = AttachCurrentThread(); |
1214 ScopedJavaLocalRef<jobject> obj = weak_java_provider_.get(env); | 1214 ScopedJavaLocalRef<jobject> obj = weak_java_provider_.get(env); |
1215 if (obj.is_null()) | 1215 if (obj.is_null()) |
1216 return; | 1216 return; |
1217 Java_ChromeBrowserProvider_onSearchTermChanged(env, obj.obj()); | 1217 Java_ChromeBrowserProvider_onSearchTermChanged(env, obj); |
1218 } | 1218 } |
1219 | 1219 |
1220 void ChromeBrowserProvider::OnKeywordSearchTermDeleted( | 1220 void ChromeBrowserProvider::OnKeywordSearchTermDeleted( |
1221 history::HistoryService* history_service, | 1221 history::HistoryService* history_service, |
1222 history::URLID url_id) { | 1222 history::URLID url_id) { |
1223 } | 1223 } |
OLD | NEW |