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

Side by Side Diff: content/renderer/media/dtls_identity_service.h

Issue 15969025: Generates the DTLS identity in browser process and returns it to render process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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 (c) 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.
4
5 #ifndef CONTENT_RENDERER_MEDIA_DTLS_IDENTITY_SERVICE_H_
6 #define CONTENT_RENDERER_MEDIA_DTLS_IDENTITY_SERVICE_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "content/public/renderer/render_process_observer.h"
13 #include "googleurl/src/gurl.h"
14 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h "
15
16 namespace content {
17
18 // This class handles DTLS identity requests by sending IPC messages to the
19 // browser process.
20 class DTLSIdentityService : public webrtc::DTLSIdentityServiceInterface,
21 public RenderProcessObserver {
22 public:
23 DTLSIdentityService(const GURL& origin);
24 virtual ~DTLSIdentityService();
25
26 // DTLSIdentityServiceInterface implementation.
27 virtual bool RequestIdentity(
28 const std::string& identity_name,
29 const std::string& common_name,
30 webrtc::DTLSIdentityRequestObserver* observer) OVERRIDE;
31
32 private:
33 // RenderProcessObserver implementation.
34 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
35
36 void OnIdentityReady(int request_id,
37 const std::string& certificate,
38 const std::string& private_key);
39
40 void OnRequestFailed(int request_id, int error);
41
42 // The origin of the PeerConnection which owns this DTLSIdentityService.
43 GURL origin_;
44 talk_base::scoped_refptr<webrtc::DTLSIdentityRequestObserver>
45 pending_observer_;
46 int pending_request_id_;
47 DISALLOW_COPY_AND_ASSIGN(DTLSIdentityService);
48 };
49
50 } // namespace content
51
52 #endif // CONTENT_RENDERER_MEDIA_DTLS_IDENTITY_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698