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 ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_IO_THREAD_CLIENT_IMPL_H_ | 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_IO_THREAD_CLIENT_IMPL_H_ |
6 #define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_IO_THREAD_CLIENT_IMPL_H_ | 6 #define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_IO_THREAD_CLIENT_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "android_webview/browser/aw_contents_io_thread_client.h" | 10 #include "android_webview/browser/aw_contents_io_thread_client.h" |
11 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 | 14 |
15 class GURL; | |
16 | |
17 namespace content { | 15 namespace content { |
18 class ResourceRequestInfo; | |
19 class WebContents; | 16 class WebContents; |
20 } | 17 } |
21 | 18 |
22 namespace net { | 19 namespace net { |
23 class URLRequest; | 20 class URLRequest; |
24 } | 21 } |
25 | 22 |
26 namespace android_webview { | 23 namespace android_webview { |
27 | 24 |
28 class AwWebResourceResponse; | |
29 | |
30 class AwContentsIoThreadClientImpl : public AwContentsIoThreadClient { | 25 class AwContentsIoThreadClientImpl : public AwContentsIoThreadClient { |
31 public: | 26 public: |
32 // Called when AwContents is created before there is a Java client. | 27 // Called when AwContents is created before there is a Java client. |
33 static void RegisterPendingContents(content::WebContents* web_contents); | 28 static void RegisterPendingContents(content::WebContents* web_contents); |
34 | 29 |
35 // Associates the |jclient| instance (which must implement the | 30 // Associates the |jclient| instance (which must implement the |
36 // AwContentsIoThreadClient Java interface) with the |web_contents|. | 31 // AwContentsIoThreadClient Java interface) with the |web_contents|. |
37 // This should be called at most once per |web_contents|. | 32 // This should be called at most once per |web_contents|. |
38 static void Associate(content::WebContents* web_contents, | 33 static void Associate(content::WebContents* web_contents, |
39 const base::android::JavaRef<jobject>& jclient); | 34 const base::android::JavaRef<jobject>& jclient); |
(...skipping 29 matching lines...) Expand all Loading... |
69 bool pending_association_; | 64 bool pending_association_; |
70 base::android::ScopedJavaGlobalRef<jobject> java_object_; | 65 base::android::ScopedJavaGlobalRef<jobject> java_object_; |
71 base::android::ScopedJavaGlobalRef<jobject> bg_thread_client_object_; | 66 base::android::ScopedJavaGlobalRef<jobject> bg_thread_client_object_; |
72 | 67 |
73 DISALLOW_COPY_AND_ASSIGN(AwContentsIoThreadClientImpl); | 68 DISALLOW_COPY_AND_ASSIGN(AwContentsIoThreadClientImpl); |
74 }; | 69 }; |
75 | 70 |
76 } // namespace android_webview | 71 } // namespace android_webview |
77 | 72 |
78 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_IO_THREAD_CLIENT_IMPL_H_ | 73 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_IO_THREAD_CLIENT_IMPL_H_ |
OLD | NEW |