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

Side by Side Diff: content/browser/mojo/browser_service_registry_impl.h

Issue 1858103002: Strawman proposal for dealing with Android java mojo services registry in browser code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak a couple more headers. Created 4 years, 8 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_BROWSER_MOJO_BROWSER_SERVICE_REGISTRY_IMPL_
6 #define CONTENT_BROWSER_MOJO_BROWSER_SERVICE_REGISTRY_IMPL_
7
8 #include "content/common/mojo/service_registry_impl.h"
9 #include "content/public/browser/browser_service_registry.h"
10
11 namespace content {
12
13 // Implementation of BrowserServiceRegistry.
14 class CONTENT_EXPORT BrowserServiceRegistryImpl : public BrowserServiceRegistry {
15 public:
16 virtual ~BrowserServiceRegistryImpl() {}
17
18 // Implement the ServiceRegistry part of BrowserServiceRegistry by means of
19 // forwarding to our ServiceRegistryImpl member.
20 void AddService(
21 const std::string& service_name,
22 const base::Callback<void(mojo::ScopedMessagePipeHandle)>
23 service_factory) override {
24 impl_.AddService(service_name, service_factory);
25 }
26 // And so forth.
27
28 #if defined(OS_ANDROID)
29 // Implementation of android specific methods. This can probably just be
30 // copied over from ServiceRegistryAndroid, or you could have a getter that
31 // returns the ServiceRegistryAndroid.
32 void AddService(
33 JNIEnv* env,
34 const base::android::JavaParamRef<jobject>& j_service_registry,
35 const base::android::JavaParamRef<jobject>& j_manager,
36 const base::android::JavaParamRef<jobject>& j_factory,
37 const base::android::JavaParamRef<jstring>& j_name) override;
38 #endif
39
40 private:
41 // Our ServiceRegistry methods are implemented in terms of the following
42 // ServiceRegistryImpl member.
43 ServiceRegistryImpl impl_;
44
45 #if defined(OS_ANDROID)
46 // Android specific data members here. Probably just copied over from
47 // existing ServiceRegistryAndroid.
48 #endif
49 };
50
51 } // namespace content
52
53 #endif // CONTEBROWSER_MOJO_BROWSER_SERVICE_REGISTRY_IMPL_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/mojo/mojo_application_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698