OLD | NEW |
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 package org.chromium.chrome.browser.offlinepages; | 5 package org.chromium.chrome.browser.offlinepages; |
6 | 6 |
7 import org.chromium.base.Callback; | 7 import org.chromium.base.Callback; |
8 import org.chromium.base.ObserverList; | 8 import org.chromium.base.ObserverList; |
9 import org.chromium.base.ThreadUtils; | 9 import org.chromium.base.ThreadUtils; |
10 import org.chromium.base.VisibleForTesting; | 10 import org.chromium.base.VisibleForTesting; |
(...skipping 15 matching lines...) Expand all Loading... |
26 * Access gate to C++ side offline pages functionalities. | 26 * Access gate to C++ side offline pages functionalities. |
27 */ | 27 */ |
28 @JNINamespace("offline_pages::android") | 28 @JNINamespace("offline_pages::android") |
29 public class OfflinePageBridge { | 29 public class OfflinePageBridge { |
30 // These constants must be kept in sync with the constants defined in | 30 // These constants must be kept in sync with the constants defined in |
31 // //components/offline_pages/core/client_namespace_constants.cc | 31 // //components/offline_pages/core/client_namespace_constants.cc |
32 public static final String ASYNC_NAMESPACE = "async_loading"; | 32 public static final String ASYNC_NAMESPACE = "async_loading"; |
33 public static final String BOOKMARK_NAMESPACE = "bookmark"; | 33 public static final String BOOKMARK_NAMESPACE = "bookmark"; |
34 public static final String LAST_N_NAMESPACE = "last_n"; | 34 public static final String LAST_N_NAMESPACE = "last_n"; |
35 public static final String SHARE_NAMESPACE = "share"; | 35 public static final String SHARE_NAMESPACE = "share"; |
| 36 public static final String CCT_NAMESPACE = "custom_tabs"; |
| 37 public static final String DOWNLOAD_NAMESPACE = "download"; |
36 | 38 |
37 /** | 39 /** |
38 * Retrieves the OfflinePageBridge for the given profile, creating it the fi
rst time | 40 * Retrieves the OfflinePageBridge for the given profile, creating it the fi
rst time |
39 * getForProfile is called for a given profile. Must be called on the UI th
read. | 41 * getForProfile is called for a given profile. Must be called on the UI th
read. |
40 * | 42 * |
41 * @param profile The profile associated with the OfflinePageBridge to get. | 43 * @param profile The profile associated with the OfflinePageBridge to get. |
42 */ | 44 */ |
43 public static OfflinePageBridge getForProfile(Profile profile) { | 45 public static OfflinePageBridge getForProfile(Profile profile) { |
44 ThreadUtils.assertOnUiThread(); | 46 ThreadUtils.assertOnUiThread(); |
45 | 47 |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 long nativeOfflinePageBridge, WebContents webContents); | 639 long nativeOfflinePageBridge, WebContents webContents); |
638 private native boolean nativeIsShowingDownloadButtonInErrorPage( | 640 private native boolean nativeIsShowingDownloadButtonInErrorPage( |
639 long nativeOfflinePageBridge, WebContents webContents); | 641 long nativeOfflinePageBridge, WebContents webContents); |
640 private native void nativeScheduleDownload(long nativeOfflinePageBridge, | 642 private native void nativeScheduleDownload(long nativeOfflinePageBridge, |
641 WebContents webContents, String nameSpace, String url, int uiAction)
; | 643 WebContents webContents, String nameSpace, String url, int uiAction)
; |
642 private native boolean nativeIsOfflinePage( | 644 private native boolean nativeIsOfflinePage( |
643 long nativeOfflinePageBridge, WebContents webContents); | 645 long nativeOfflinePageBridge, WebContents webContents); |
644 private native OfflinePageItem nativeGetOfflinePage( | 646 private native OfflinePageItem nativeGetOfflinePage( |
645 long nativeOfflinePageBridge, WebContents webContents); | 647 long nativeOfflinePageBridge, WebContents webContents); |
646 } | 648 } |
OLD | NEW |