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 <cmath> | 7 #include <cmath> |
8 #include <list> | 8 #include <list> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/android/jni_android.h" | 11 #include "base/android/jni_android.h" |
12 #include "base/android/jni_array.h" | 12 #include "base/android/jni_array.h" |
13 #include "base/android/jni_string.h" | 13 #include "base/android/jni_string.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/memory/ref_counted_memory.h" | 15 #include "base/memory/ref_counted_memory.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "base/task/cancelable_task_tracker.h" | 17 #include "base/task/cancelable_task_tracker.h" |
18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
19 #include "chrome/browser/android/provider/blocking_ui_thread_async_request.h" | 19 #include "chrome/browser/android/provider/blocking_ui_thread_async_request.h" |
20 #include "chrome/browser/android/provider/bookmark_model_observer_task.h" | 20 #include "chrome/browser/android/provider/bookmark_model_observer_task.h" |
21 #include "chrome/browser/android/provider/run_on_ui_thread_blocking.h" | 21 #include "chrome/browser/android/provider/run_on_ui_thread_blocking.h" |
22 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 22 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
23 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" | 23 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" |
24 #include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h" | 24 #include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h" |
25 #include "chrome/browser/browser_process.h" | 25 #include "chrome/browser/browser_process.h" |
26 #include "chrome/browser/chrome_notification_types.h" | 26 #include "chrome/browser/chrome_notification_types.h" |
27 #include "chrome/browser/favicon/favicon_service.h" | 27 #include "chrome/browser/favicon/favicon_service.h" |
28 #include "chrome/browser/favicon/favicon_service_factory.h" | 28 #include "chrome/browser/favicon/favicon_service_factory.h" |
29 #include "chrome/browser/history/android/android_history_types.h" | |
30 #include "chrome/browser/history/android/sqlite_cursor.h" | 29 #include "chrome/browser/history/android/sqlite_cursor.h" |
31 #include "chrome/browser/history/top_sites.h" | 30 #include "chrome/browser/history/top_sites.h" |
32 #include "chrome/browser/profiles/profile.h" | 31 #include "chrome/browser/profiles/profile.h" |
33 #include "chrome/browser/profiles/profile_manager.h" | 32 #include "chrome/browser/profiles/profile_manager.h" |
34 #include "chrome/browser/search_engines/template_url_service_factory.h" | 33 #include "chrome/browser/search_engines/template_url_service_factory.h" |
35 #include "components/bookmarks/browser/bookmark_model.h" | 34 #include "components/bookmarks/browser/bookmark_model.h" |
36 #include "components/bookmarks/browser/bookmark_utils.h" | 35 #include "components/bookmarks/browser/bookmark_utils.h" |
| 36 #include "components/history/core/android/android_history_types.h" |
37 #include "components/search_engines/template_url.h" | 37 #include "components/search_engines/template_url.h" |
38 #include "components/search_engines/template_url_service.h" | 38 #include "components/search_engines/template_url_service.h" |
39 #include "content/public/browser/browser_thread.h" | 39 #include "content/public/browser/browser_thread.h" |
40 #include "content/public/browser/notification_service.h" | 40 #include "content/public/browser/notification_service.h" |
41 #include "jni/ChromeBrowserProvider_jni.h" | 41 #include "jni/ChromeBrowserProvider_jni.h" |
42 #include "sql/statement.h" | 42 #include "sql/statement.h" |
43 #include "ui/base/layout.h" | 43 #include "ui/base/layout.h" |
44 #include "ui/base/resource/resource_bundle.h" | 44 #include "ui/base/resource/resource_bundle.h" |
45 #include "ui/gfx/favicon_size.h" | 45 #include "ui/gfx/favicon_size.h" |
46 | 46 |
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1616 Java_ChromeBrowserProvider_onHistoryChanged(env, obj.obj()); | 1616 Java_ChromeBrowserProvider_onHistoryChanged(env, obj.obj()); |
1617 } else if (type == | 1617 } else if (type == |
1618 chrome::NOTIFICATION_HISTORY_KEYWORD_SEARCH_TERM_UPDATED) { | 1618 chrome::NOTIFICATION_HISTORY_KEYWORD_SEARCH_TERM_UPDATED) { |
1619 JNIEnv* env = AttachCurrentThread(); | 1619 JNIEnv* env = AttachCurrentThread(); |
1620 ScopedJavaLocalRef<jobject> obj = weak_java_provider_.get(env); | 1620 ScopedJavaLocalRef<jobject> obj = weak_java_provider_.get(env); |
1621 if (obj.is_null()) | 1621 if (obj.is_null()) |
1622 return; | 1622 return; |
1623 Java_ChromeBrowserProvider_onSearchTermChanged(env, obj.obj()); | 1623 Java_ChromeBrowserProvider_onSearchTermChanged(env, obj.obj()); |
1624 } | 1624 } |
1625 } | 1625 } |
OLD | NEW |