1 // Copyright 2013 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.
5 #ifndef CONTENT_RENDERER_MEDIA_PEER_CONNECTION_IDENTITY_SERVICE_H_
6 #define CONTENT_RENDERER_MEDIA_PEER_CONNECTION_IDENTITY_SERVICE_H_
11 #include "base/basictypes.h"
12 #include "base/single_thread_task_runner.h"
13 #include "base/threading/thread_checker.h"
14 #include "content/public/renderer/render_process_observer.h"
15 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h"
20 // This class is associated with a peer connection and handles WebRTC DTLS
21 // identity requests by delegating to the per-renderer WebRTCIdentityProxy.
22 class PeerConnectionIdentityService
23 : public webrtc::DTLSIdentityServiceInterface
{
25 PeerConnectionIdentityService(const GURL
& url
,
26 const GURL
& first_party_for_cookies
);
28 ~PeerConnectionIdentityService() override
;
30 // webrtc::DTLSIdentityServiceInterface implementation.
31 bool RequestIdentity(const std::string
& identity_name
,
32 const std::string
& common_name
,
33 webrtc::DTLSIdentityRequestObserver
* observer
) override
;
36 base::ThreadChecker signaling_thread_
;
38 const scoped_refptr
<base::SingleThreadTaskRunner
> main_thread_
;
42 const GURL first_party_for_cookies_
;
44 DISALLOW_COPY_AND_ASSIGN(PeerConnectionIdentityService
);
47 } // namespace content
49 #endif // CONTENT_RENDERER_MEDIA_PEER_CONNECTION_IDENTITY_SERVICE_H_