Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / content / renderer / media / peer_connection_identity_store.h
blobb0507b09cd2eb031dce673eec7767a5273100ce9
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.
5 #ifndef CONTENT_RENDERER_MEDIA_PEER_CONNECTION_IDENTITY_STORE_H_
6 #define CONTENT_RENDERER_MEDIA_PEER_CONNECTION_IDENTITY_STORE_H_
8 #include "base/basictypes.h"
9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_checker.h"
11 #include "third_party/libjingle/source/talk/app/webrtc/dtlsidentitystore.h"
12 #include "url/gurl.h"
14 namespace content {
16 // This class is associated with a peer connection and handles WebRTC DTLS
17 // identity requests by delegating to the per-renderer WebRTCIdentityProxy.
18 class PeerConnectionIdentityStore
19 : public webrtc::DtlsIdentityStoreInterface {
20 public:
21 PeerConnectionIdentityStore(const GURL& origin,
22 const GURL& first_party_for_cookies);
23 ~PeerConnectionIdentityStore() override;
25 // webrtc::DtlsIdentityStoreInterface override;
26 void RequestIdentity(
27 rtc::KeyType key_type,
28 const rtc::scoped_refptr<webrtc::DtlsIdentityRequestObserver>& observer)
29 override;
31 private:
32 base::ThreadChecker signaling_thread_;
33 const scoped_refptr<base::SingleThreadTaskRunner> main_thread_;
34 const GURL url_;
35 const GURL first_party_for_cookies_;
37 DISALLOW_COPY_AND_ASSIGN(PeerConnectionIdentityStore);
40 } // namespace content
42 #endif // CONTENT_RENDERER_MEDIA_PEER_CONNECTION_IDENTITY_STORE_H_