OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 NET_PROXY_PROXY_CONFIG_SERVICE_ANDROID_H_ | 5 #ifndef NET_PROXY_PROXY_CONFIG_SERVICE_ANDROID_H_ |
6 #define NET_PROXY_PROXY_CONFIG_SERVICE_ANDROID_H_ | 6 #define NET_PROXY_PROXY_CONFIG_SERVICE_ANDROID_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 // Separate class whose instance is owned by the Delegate class implemented in | 35 // Separate class whose instance is owned by the Delegate class implemented in |
36 // the .cc file. | 36 // the .cc file. |
37 class JNIDelegate { | 37 class JNIDelegate { |
38 public: | 38 public: |
39 virtual ~JNIDelegate() {} | 39 virtual ~JNIDelegate() {} |
40 | 40 |
41 // Called from Java (on JNI thread) to signal that the proxy settings have | 41 // Called from Java (on JNI thread) to signal that the proxy settings have |
42 // changed. The string and int arguments (the host/port pair for the proxy) | 42 // changed. The string and int arguments (the host/port pair for the proxy) |
43 // are either a host/port pair or ("", 0) to indicate "no proxy". | 43 // are either a host/port pair or ("", 0) to indicate "no proxy". |
44 // The third argument indicates the PAC url. | 44 // The third argument indicates the PAC url. |
| 45 // The fourth argument is the proxy exclusion list. |
45 virtual void ProxySettingsChangedTo(JNIEnv*, | 46 virtual void ProxySettingsChangedTo(JNIEnv*, |
46 jobject, | 47 jobject, |
47 jstring, | 48 jstring, |
48 jint, | 49 jint, |
49 jstring) = 0; | 50 jstring, |
| 51 jobjectArray) = 0; |
50 | 52 |
51 // Called from Java (on JNI thread) to signal that the proxy settings have | 53 // Called from Java (on JNI thread) to signal that the proxy settings have |
52 // changed. New proxy settings are fetched from the system property store. | 54 // changed. New proxy settings are fetched from the system property store. |
53 virtual void ProxySettingsChanged(JNIEnv*, jobject) = 0; | 55 virtual void ProxySettingsChanged(JNIEnv*, jobject) = 0; |
54 }; | 56 }; |
55 | 57 |
56 ProxyConfigServiceAndroid( | 58 ProxyConfigServiceAndroid( |
57 const scoped_refptr<base::SequencedTaskRunner>& network_task_runner, | 59 const scoped_refptr<base::SequencedTaskRunner>& network_task_runner, |
58 const scoped_refptr<base::SequencedTaskRunner>& jni_task_runner); | 60 const scoped_refptr<base::SequencedTaskRunner>& jni_task_runner); |
59 | 61 |
(...skipping 22 matching lines...) Expand all Loading... |
82 void ProxySettingsChanged(); | 84 void ProxySettingsChanged(); |
83 | 85 |
84 scoped_refptr<Delegate> delegate_; | 86 scoped_refptr<Delegate> delegate_; |
85 | 87 |
86 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceAndroid); | 88 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceAndroid); |
87 }; | 89 }; |
88 | 90 |
89 } // namespace net | 91 } // namespace net |
90 | 92 |
91 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_ANDROID_H_ | 93 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_ANDROID_H_ |
OLD | NEW |