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