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 23 matching lines...) Expand all Loading... | |
34 | 34 |
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 virtual void ProxySettingsChangedTo(JNIEnv*, jobject, jstring, jint) = 0; | 44 // The third argument indicates the pac url. |
eroman
2014/09/18 15:55:20
nit: pac --> PAC
xunjieli
2014/09/18 16:18:17
Done.
| |
45 virtual void ProxySettingsChangedTo(JNIEnv*, | |
46 jobject, | |
47 jstring, | |
48 jint, | |
49 jstring) = 0; | |
45 | 50 |
46 // Called from Java (on JNI thread) to signal that the proxy settings have | 51 // Called from Java (on JNI thread) to signal that the proxy settings have |
47 // changed. New proxy settings are fetched from the system property store. | 52 // changed. New proxy settings are fetched from the system property store. |
48 virtual void ProxySettingsChanged(JNIEnv*, jobject) = 0; | 53 virtual void ProxySettingsChanged(JNIEnv*, jobject) = 0; |
49 }; | 54 }; |
50 | 55 |
51 ProxyConfigServiceAndroid( | 56 ProxyConfigServiceAndroid( |
52 const scoped_refptr<base::SequencedTaskRunner>& network_task_runner, | 57 const scoped_refptr<base::SequencedTaskRunner>& network_task_runner, |
53 const scoped_refptr<base::SequencedTaskRunner>& jni_task_runner); | 58 const scoped_refptr<base::SequencedTaskRunner>& jni_task_runner); |
54 | 59 |
(...skipping 22 matching lines...) Expand all Loading... | |
77 void ProxySettingsChanged(); | 82 void ProxySettingsChanged(); |
78 | 83 |
79 scoped_refptr<Delegate> delegate_; | 84 scoped_refptr<Delegate> delegate_; |
80 | 85 |
81 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceAndroid); | 86 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceAndroid); |
82 }; | 87 }; |
83 | 88 |
84 } // namespace net | 89 } // namespace net |
85 | 90 |
86 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_ANDROID_H_ | 91 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_ANDROID_H_ |
OLD | NEW |