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.net; | 5 package org.chromium.net; |
6 | 6 |
7 import android.os.ConditionVariable; | 7 import android.os.ConditionVariable; |
8 | 8 |
9 import org.chromium.base.CalledByNative; | 9 import org.chromium.base.annotations.CalledByNative; |
10 import org.chromium.base.JNINamespace; | 10 import org.chromium.base.annotations.JNINamespace; |
11 | 11 |
12 /** | 12 /** |
13 * Class to watch for Sdch dictionary events. The native implementation | 13 * Class to watch for Sdch dictionary events. The native implementation |
14 * unregisters itself when an event happens. Therefore, an instance of this | 14 * unregisters itself when an event happens. Therefore, an instance of this |
15 * class is only able to receive a notification of the earliest event. | 15 * class is only able to receive a notification of the earliest event. |
16 * Currently, implemented events include {@link #onDictionaryAdded}. | 16 * Currently, implemented events include {@link #onDictionaryAdded}. |
17 */ | 17 */ |
18 @JNINamespace("cronet") | 18 @JNINamespace("cronet") |
19 public class SdchObserver { | 19 public class SdchObserver { |
20 protected boolean mDictionaryAlreadyPresent = false; | 20 protected boolean mDictionaryAlreadyPresent = false; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 @CalledByNative | 53 @CalledByNative |
54 private void onDictionarySetAlreadyPresent() { | 54 private void onDictionarySetAlreadyPresent() { |
55 mDictionaryAlreadyPresent = true; | 55 mDictionaryAlreadyPresent = true; |
56 mAddBlock.open(); | 56 mAddBlock.open(); |
57 } | 57 } |
58 | 58 |
59 private native void nativeAddSdchObserver(String targetUrl, long contextAdap
ter); | 59 private native void nativeAddSdchObserver(String targetUrl, long contextAdap
ter); |
60 private native void nativeAddSdchObserverLegacyAPI(String targetUrl, long co
ntextAdapter); | 60 private native void nativeAddSdchObserverLegacyAPI(String targetUrl, long co
ntextAdapter); |
61 } | 61 } |
OLD | NEW |