| 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 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_EVALUATION_OFFLINE_PAGE_EVALUATION_
BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_EVALUATION_OFFLINE_PAGE_EVALUATION_
BRIDGE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_EVALUATION_OFFLINE_PAGE_EVALUATION_
BRIDGE_H_ | 6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_EVALUATION_OFFLINE_PAGE_EVALUATION_
BRIDGE_H_ |
| 7 | 7 |
| 8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
| 9 #include "base/android/jni_weak_ref.h" | 9 #include "base/android/jni_weak_ref.h" |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 namespace android { | 24 namespace android { |
| 25 | 25 |
| 26 /** | 26 /** |
| 27 * Bridge for exposing native implementation which are used by evaluation. | 27 * Bridge for exposing native implementation which are used by evaluation. |
| 28 */ | 28 */ |
| 29 class OfflinePageEvaluationBridge : public OfflinePageModel::Observer, | 29 class OfflinePageEvaluationBridge : public OfflinePageModel::Observer, |
| 30 public RequestCoordinator::Observer { | 30 public RequestCoordinator::Observer { |
| 31 public: | 31 public: |
| 32 static bool Register(JNIEnv* env); | 32 static bool Register(JNIEnv* env); |
| 33 static std::unique_ptr<KeyedService> GetTestingRequestCoordinator( |
| 34 content::BrowserContext* context); |
| 33 | 35 |
| 34 OfflinePageEvaluationBridge(JNIEnv* env, | 36 OfflinePageEvaluationBridge(JNIEnv* env, |
| 35 content::BrowserContext* browser_context, | 37 content::BrowserContext* browser_context, |
| 36 OfflinePageModel* offline_page_model, | 38 OfflinePageModel* offline_page_model, |
| 37 RequestCoordinator* request_coordinator); | 39 RequestCoordinator* request_coordinator); |
| 38 | 40 |
| 39 ~OfflinePageEvaluationBridge() override; | 41 ~OfflinePageEvaluationBridge() override; |
| 40 | 42 |
| 41 // OfflinePageModel::Observer implementation. | 43 // OfflinePageModel::Observer implementation. |
| 42 void OfflinePageModelLoaded(OfflinePageModel* model) override; | 44 void OfflinePageModelLoaded(OfflinePageModel* model) override; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // Not owned. | 88 // Not owned. |
| 87 RequestCoordinator* request_coordinator_; | 89 RequestCoordinator* request_coordinator_; |
| 88 | 90 |
| 89 DISALLOW_COPY_AND_ASSIGN(OfflinePageEvaluationBridge); | 91 DISALLOW_COPY_AND_ASSIGN(OfflinePageEvaluationBridge); |
| 90 }; | 92 }; |
| 91 | 93 |
| 92 } // namespace android | 94 } // namespace android |
| 93 } // namespace offline_pages | 95 } // namespace offline_pages |
| 94 | 96 |
| 95 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_EVALUATION_OFFLINE_PAGE_EVALUATI
ON_BRIDGE_H_ | 97 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_EVALUATION_OFFLINE_PAGE_EVALUATI
ON_BRIDGE_H_ |
| OLD | NEW |