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

Side by Side Diff: content/child/navigator_connect/service_port_dispatcher_impl.h

Issue 1210643002: Update navigator.services API to use the new services.onconnect event [2/3]. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@serviceport
Patch Set: decouple renderer side code more Created 5 years, 5 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 2015 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_CHILD_NAVIGATOR_CONNECT_SERVICE_PORT_DISPATCHER_IMPL_H_
6 #define CONTENT_CHILD_NAVIGATOR_CONNECT_SERVICE_PORT_DISPATCHER_IMPL_H_
7
8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h"
10 #include "content/common/service_port_service.mojom.h"
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
12
13 namespace blink {
14 class WebServiceWorkerContextProxy;
15 }
16
17 namespace content {
18
19 class ServicePortDispatcherImpl : public ServicePortDispatcher {
20 public:
21 static void Create(base::WeakPtr<blink::WebServiceWorkerContextProxy> proxy,
22 mojo::InterfaceRequest<ServicePortDispatcher> request);
23
24 ~ServicePortDispatcherImpl() override;
25
26 private:
27 ServicePortDispatcherImpl(
28 base::WeakPtr<blink::WebServiceWorkerContextProxy> proxy,
29 mojo::InterfaceRequest<ServicePortDispatcher> request);
30
31 void Connect(const mojo::String& target_url,
32 const mojo::String& origin,
33 int32_t port_id,
34 const ConnectCallback& callback) override;
35
36 mojo::StrongBinding<ServicePortDispatcher> binding_;
37 base::WeakPtr<blink::WebServiceWorkerContextProxy> proxy_;
38
39 DISALLOW_COPY_AND_ASSIGN(ServicePortDispatcherImpl);
40 };
41
42 } // namespace content
43
44 #endif // CONTENT_CHILD_NAVIGATOR_CONNECT_SERVICE_PORT_DISPATCHER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698