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

Side by Side Diff: content/public/browser/android/interface_provider_android.h

Issue 2191033002: Split ServiceRegistryAndroid into InterfaceRegistryAndroid and InterfaceProviderAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_INTERFACE_PROVIDER_ANDROID_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_INTERFACE_PROVIDER_ANDROID_H_
7
8 #include <jni.h>
9 #include <memory>
10
11 #include "base/android/scoped_java_ref.h"
12 #include "content/common/content_export.h"
13
14 namespace shell {
15 class InterfaceProvider;
16 }
17
18 namespace content {
19
20 // Android wrapper around shell::InterfaceProvider, allowing code in Java to
21 // request interfaces implemented in other environments.
22 class CONTENT_EXPORT InterfaceProviderAndroid {
23 public:
24 virtual ~InterfaceProviderAndroid() {}
25
26 // The |registry| parameter must outlive |InterfaceProviderAndroid|.
no sievers 2016/07/29 18:02:13 s/registry/remote_interfaces
27 static std::unique_ptr<InterfaceProviderAndroid> Create(
28 shell::InterfaceProvider* remote_interfaces);
29
30 // Called from Java.
31 virtual void GetInterface(
32 JNIEnv* env,
33 const base::android::JavaParamRef<jobject>& j_interface_provider,
34 const base::android::JavaParamRef<jstring>& j_name,
35 jint handle) = 0;
36
37 // Accessor to the Java object.
38 virtual const base::android::ScopedJavaGlobalRef<jobject>& GetObj() = 0;
39 };
40
41 } // namespace content
42
43 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_INTERFACE_PROVIDER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698