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

Side by Side Diff: content/renderer/mojo/blink_service_registry_impl.h

Issue 2196843003: Blink ServiceRegistry -> InterfaceProvider (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_RENDERER_MOJO_BLINK_SERVICE_REGISTRY_IMPL_H_
6 #define CONTENT_RENDERER_MOJO_BLINK_SERVICE_REGISTRY_IMPL_H_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h"
11 #include "mojo/public/cpp/system/message_pipe.h"
12 #include "third_party/WebKit/public/platform/ServiceRegistry.h"
13
14 namespace base {
15 class SingleThreadTaskRunner;
16 }
17
18 namespace shell {
19 class InterfaceProvider;
20 }
21
22 namespace content {
23
24 // An implementation of blink::ServiceRegistry that forwards to a
25 // shell::InterfaceProvider.
26 class BlinkServiceRegistryImpl : public blink::ServiceRegistry {
27 public:
28 explicit BlinkServiceRegistryImpl(
29 base::WeakPtr<shell::InterfaceProvider> remote_interfaces);
30 ~BlinkServiceRegistryImpl();
31
32 // blink::ServiceRegistry override.
33 void connectToRemoteService(const char* name,
34 mojo::ScopedMessagePipeHandle handle) override;
35
36 private:
37 const base::WeakPtr<shell::InterfaceProvider> remote_interfaces_;
38
39 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
40
41 base::WeakPtrFactory<BlinkServiceRegistryImpl> weak_ptr_factory_;
42
43 DISALLOW_COPY_AND_ASSIGN(BlinkServiceRegistryImpl);
44 };
45
46 } // namespace content
47
48 #endif // CONTENT_RENDERER_MOJO_BLINK_SERVICE_REGISTRY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698