| 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 "android_webview/browser/aw_contents_io_thread_client.h" | 8 #include "android_webview/browser/aw_contents_io_thread_client.h" |
| 9 | 9 |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 public: | 33 public: |
| 34 // Called when AwContents is created before there is a Java client. | 34 // Called when AwContents is created before there is a Java client. |
| 35 static void RegisterPendingContents(content::WebContents* web_contents); | 35 static void RegisterPendingContents(content::WebContents* web_contents); |
| 36 | 36 |
| 37 // Associates the |jclient| instance (which must implement the | 37 // Associates the |jclient| instance (which must implement the |
| 38 // AwContentsIoThreadClient Java interface) with the |web_contents|. | 38 // AwContentsIoThreadClient Java interface) with the |web_contents|. |
| 39 // This should be called at most once per |web_contents|. | 39 // This should be called at most once per |web_contents|. |
| 40 static void Associate(content::WebContents* web_contents, | 40 static void Associate(content::WebContents* web_contents, |
| 41 const base::android::JavaRef<jobject>& jclient); | 41 const base::android::JavaRef<jobject>& jclient); |
| 42 | 42 |
| 43 // Sets the |jclient| java instance to which service worker related |
| 44 // callbacks should be delegated. |
| 45 static void SetServiceWorkerIoThreadClient( |
| 46 const base::android::JavaRef<jobject>& jclient); |
| 47 |
| 43 // Either |pending_associate| is true or |jclient| holds a non-null | 48 // Either |pending_associate| is true or |jclient| holds a non-null |
| 44 // Java object. | 49 // Java object. |
| 45 AwContentsIoThreadClientImpl(bool pending_associate, | 50 AwContentsIoThreadClientImpl(bool pending_associate, |
| 46 const base::android::JavaRef<jobject>& jclient); | 51 const base::android::JavaRef<jobject>& jclient); |
| 47 ~AwContentsIoThreadClientImpl() override; | 52 ~AwContentsIoThreadClientImpl() override; |
| 48 | 53 |
| 49 // Implementation of AwContentsIoThreadClient. | 54 // Implementation of AwContentsIoThreadClient. |
| 50 bool PendingAssociation() const override; | 55 bool PendingAssociation() const override; |
| 51 CacheMode GetCacheMode() const override; | 56 CacheMode GetCacheMode() const override; |
| 52 void ShouldInterceptRequestAsync( | 57 void ShouldInterceptRequestAsync( |
| (...skipping 23 matching lines...) Expand all Loading... |
| 76 | 81 |
| 77 DISALLOW_COPY_AND_ASSIGN(AwContentsIoThreadClientImpl); | 82 DISALLOW_COPY_AND_ASSIGN(AwContentsIoThreadClientImpl); |
| 78 }; | 83 }; |
| 79 | 84 |
| 80 // JNI registration method. | 85 // JNI registration method. |
| 81 bool RegisterAwContentsIoThreadClientImpl(JNIEnv* env); | 86 bool RegisterAwContentsIoThreadClientImpl(JNIEnv* env); |
| 82 | 87 |
| 83 } // namespace android_webview | 88 } // namespace android_webview |
| 84 | 89 |
| 85 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_IO_THREAD_CLIENT_IMPL_H_ | 90 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_IO_THREAD_CLIENT_IMPL_H_ |
| OLD | NEW |