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

Side by Side Diff: chrome/browser/android/offline_pages/offline_page_bridge.h

Issue 1521193002: [Offline pages] Refactor URL conversions from TabAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing final CR feedback Created 5 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/android/offline_pages/offline_page_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_OFFLINE_PAGE_BRIDGE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_ 6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_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 "components/offline_pages/offline_page_model.h" 10 #include "components/offline_pages/offline_page_model.h"
11 11
12 namespace content { 12 namespace content {
13 class BrowserContext; 13 class BrowserContext;
14 } 14 }
15 15
16 namespace offline_pages { 16 namespace offline_pages {
17 namespace android { 17 namespace android {
18 18
19 /** 19 /**
20 * Bridge between C++ and Java for exposing native implementation of offline 20 * Bridge between C++ and Java for exposing native implementation of offline
21 * pages model in managed code. 21 * pages model in managed code.
22 */ 22 */
23 class OfflinePageBridge : public OfflinePageModel::Observer { 23 class OfflinePageBridge : public OfflinePageModel::Observer {
24 public: 24 public:
25 // Returns true if |url| might points to an offline page.
26 static bool MightBeOfflineURL(const GURL& url);
27
28 OfflinePageBridge(JNIEnv* env, 25 OfflinePageBridge(JNIEnv* env,
29 jobject obj, 26 jobject obj,
30 content::BrowserContext* browser_context); 27 content::BrowserContext* browser_context);
31 void Destroy(JNIEnv*, const base::android::JavaParamRef<jobject>&); 28 void Destroy(JNIEnv*, const base::android::JavaParamRef<jobject>&);
32 29
33 // OfflinePageModel::Observer implementation. 30 // OfflinePageModel::Observer implementation.
34 void OfflinePageModelLoaded(OfflinePageModel* model) override; 31 void OfflinePageModelLoaded(OfflinePageModel* model) override;
35 void OfflinePageModelChanged(OfflinePageModel* model) override; 32 void OfflinePageModelChanged(OfflinePageModel* model) override;
36 void OfflinePageDeleted(int64 bookmark_id) override; 33 void OfflinePageDeleted(int64 bookmark_id) override;
37 34
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 DISALLOW_COPY_AND_ASSIGN(OfflinePageBridge); 89 DISALLOW_COPY_AND_ASSIGN(OfflinePageBridge);
93 }; 90 };
94 91
95 bool RegisterOfflinePageBridge(JNIEnv* env); 92 bool RegisterOfflinePageBridge(JNIEnv* env);
96 93
97 } // namespace android 94 } // namespace android
98 } // namespace offline_pages 95 } // namespace offline_pages
99 96
100 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_ 97 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_
101 98
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/android/offline_pages/offline_page_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698