Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(597)

Side by Side Diff: android_webview/native/aw_contents_io_thread_client_impl.h

Issue 1544863002: [Android WebView] Implement initial settings and callback support for Service Workers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 const base::android::JavaRef<jobject>& browser_context);
48
43 // Either |pending_associate| is true or |jclient| holds a non-null 49 // Either |pending_associate| is true or |jclient| holds a non-null
44 // Java object. 50 // Java object.
45 AwContentsIoThreadClientImpl(bool pending_associate, 51 AwContentsIoThreadClientImpl(bool pending_associate,
46 const base::android::JavaRef<jobject>& jclient); 52 const base::android::JavaRef<jobject>& jclient);
47 ~AwContentsIoThreadClientImpl() override; 53 ~AwContentsIoThreadClientImpl() override;
48 54
49 // Implementation of AwContentsIoThreadClient. 55 // Implementation of AwContentsIoThreadClient.
50 bool PendingAssociation() const override; 56 bool PendingAssociation() const override;
51 CacheMode GetCacheMode() const override; 57 CacheMode GetCacheMode() const override;
52 void ShouldInterceptRequestAsync( 58 void ShouldInterceptRequestAsync(
(...skipping 23 matching lines...) Expand all
76 82
77 DISALLOW_COPY_AND_ASSIGN(AwContentsIoThreadClientImpl); 83 DISALLOW_COPY_AND_ASSIGN(AwContentsIoThreadClientImpl);
78 }; 84 };
79 85
80 // JNI registration method. 86 // JNI registration method.
81 bool RegisterAwContentsIoThreadClientImpl(JNIEnv* env); 87 bool RegisterAwContentsIoThreadClientImpl(JNIEnv* env);
82 88
83 } // namespace android_webview 89 } // namespace android_webview
84 90
85 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_IO_THREAD_CLIENT_IMPL_H_ 91 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_IO_THREAD_CLIENT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698