Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_bridge.h

Issue 2564163002: [Offline Pages] Remove load state from public OfflinePageModel API. (Closed)
Patch Set: Fix broken tests. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 23 matching lines...) Expand all
34 content::BrowserContext* context); 34 content::BrowserContext* context);
35 35
36 OfflinePageEvaluationBridge(JNIEnv* env, 36 OfflinePageEvaluationBridge(JNIEnv* env,
37 content::BrowserContext* browser_context, 37 content::BrowserContext* browser_context,
38 OfflinePageModel* offline_page_model, 38 OfflinePageModel* offline_page_model,
39 RequestCoordinator* request_coordinator); 39 RequestCoordinator* request_coordinator);
40 40
41 ~OfflinePageEvaluationBridge() override; 41 ~OfflinePageEvaluationBridge() override;
42 42
43 // OfflinePageModel::Observer implementation. 43 // OfflinePageModel::Observer implementation.
44 void OfflinePageModelLoaded(OfflinePageModel* model) override;
45 void OfflinePageAdded(OfflinePageModel* model, 44 void OfflinePageAdded(OfflinePageModel* model,
46 const OfflinePageItem& added_page) override; 45 const OfflinePageItem& added_page) override;
47 void OfflinePageDeleted(int64_t offline_id, 46 void OfflinePageDeleted(int64_t offline_id,
48 const ClientId& client_id) override; 47 const ClientId& client_id) override;
49 48
50 // RequestCoordinator::Observer implementation. 49 // RequestCoordinator::Observer implementation.
51 void OnAdded(const SavePageRequest& request) override; 50 void OnAdded(const SavePageRequest& request) override;
52 void OnCompleted(const SavePageRequest& request, 51 void OnCompleted(const SavePageRequest& request,
53 RequestNotifier::BackgroundSavePageResult status) override; 52 RequestNotifier::BackgroundSavePageResult status) override;
54 void OnChanged(const SavePageRequest& request) override; 53 void OnChanged(const SavePageRequest& request) override;
(...skipping 30 matching lines...) Expand all
85 void SavePageLater(JNIEnv* env, 84 void SavePageLater(JNIEnv* env,
86 const base::android::JavaParamRef<jobject>& obj, 85 const base::android::JavaParamRef<jobject>& obj,
87 const base::android::JavaParamRef<jstring>& url, 86 const base::android::JavaParamRef<jstring>& url,
88 const base::android::JavaParamRef<jstring>& j_namespace, 87 const base::android::JavaParamRef<jstring>& j_namespace,
89 const base::android::JavaParamRef<jstring>& j_client_id, 88 const base::android::JavaParamRef<jstring>& j_client_id,
90 jboolean user_requested); 89 jboolean user_requested);
91 90
92 base::android::ScopedJavaGlobalRef<jobject> java_ref() { return java_ref_; } 91 base::android::ScopedJavaGlobalRef<jobject> java_ref() { return java_ref_; }
93 92
94 private: 93 private:
95 void NotifyIfDoneLoading() const;
96
97 base::android::ScopedJavaLocalRef<jobject> CreateClientId( 94 base::android::ScopedJavaLocalRef<jobject> CreateClientId(
98 JNIEnv* env, 95 JNIEnv* env,
99 const ClientId& clientId) const; 96 const ClientId& clientId) const;
100 97
101 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 98 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
102 // Not owned. 99 // Not owned.
103 content::BrowserContext* browser_context_; 100 content::BrowserContext* browser_context_;
104 // Not owned. 101 // Not owned.
105 OfflinePageModel* offline_page_model_; 102 OfflinePageModel* offline_page_model_;
106 // Not owned. 103 // Not owned.
107 RequestCoordinator* request_coordinator_; 104 RequestCoordinator* request_coordinator_;
108 105
109 DISALLOW_COPY_AND_ASSIGN(OfflinePageEvaluationBridge); 106 DISALLOW_COPY_AND_ASSIGN(OfflinePageEvaluationBridge);
110 }; 107 };
111 108
112 } // namespace android 109 } // namespace android
113 } // namespace offline_pages 110 } // namespace offline_pages
114 111
115 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_EVALUATION_OFFLINE_PAGE_EVALUATI ON_BRIDGE_H_ 112 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_EVALUATION_OFFLINE_PAGE_EVALUATI ON_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698