OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/offline_pages/downloads/offline_page_download_b
ridge.h" | 5 #include "chrome/browser/android/offline_pages/downloads/offline_page_download_b
ridge.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" | 10 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/profiles/profile_android.h" | 12 #include "chrome/browser/profiles/profile_android.h" |
13 #include "components/offline_pages/downloads/download_ui_item.h" | 13 #include "components/offline_pages/downloads/download_ui_item.h" |
14 #include "components/offline_pages/offline_page_model.h" | 14 #include "components/offline_pages/offline_page_model.h" |
15 #include "jni/OfflinePageDownloadBridge_jni.h" | 15 #include "jni/OfflinePageDownloadBridge_jni.h" |
16 #include "net/base/filename_util.h" | 16 #include "net/base/filename_util.h" |
17 | 17 |
18 using base::android::AttachCurrentThread; | 18 using base::android::AttachCurrentThread; |
19 using base::android::ConvertJavaStringToUTF8; | 19 using base::android::ConvertJavaStringToUTF8; |
20 using base::android::ConvertUTF8ToJavaString; | 20 using base::android::ConvertUTF8ToJavaString; |
| 21 using base::android::JavaParamRef; |
21 using base::android::ScopedJavaGlobalRef; | 22 using base::android::ScopedJavaGlobalRef; |
22 using base::android::ScopedJavaLocalRef; | 23 using base::android::ScopedJavaLocalRef; |
23 | 24 |
24 namespace offline_pages { | 25 namespace offline_pages { |
25 namespace android { | 26 namespace android { |
26 | 27 |
27 namespace { | 28 namespace { |
28 | 29 |
29 void ToJavaOfflinePageDownloadItemList(JNIEnv* env, | 30 void ToJavaOfflinePageDownloadItemList(JNIEnv* env, |
30 jobject j_result_obj, | 31 jobject j_result_obj, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 136 |
136 DownloadUIAdapter* adapter = | 137 DownloadUIAdapter* adapter = |
137 DownloadUIAdapter::FromOfflinePageModel(offline_page_model); | 138 DownloadUIAdapter::FromOfflinePageModel(offline_page_model); |
138 | 139 |
139 return reinterpret_cast<jlong>( | 140 return reinterpret_cast<jlong>( |
140 new OfflinePageDownloadBridge(env, obj, adapter)); | 141 new OfflinePageDownloadBridge(env, obj, adapter)); |
141 } | 142 } |
142 | 143 |
143 } // namespace android | 144 } // namespace android |
144 } // namespace offline_pages | 145 } // namespace offline_pages |
OLD | NEW |