Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_WEBRTC_IDENTITY_SERVICE_H_ | |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_IDENTITY_SERVICE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "content/public/renderer/render_process_observer.h" | |
| 12 #include "googleurl/src/gurl.h" | |
| 13 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h " | |
| 14 | |
| 15 namespace content { | |
| 16 | |
| 17 // This class handles WebRTC DTLS identity requests by sending IPC messages to | |
| 18 // the browser process. | |
| 19 class WebRTCIdentityService : public webrtc::DTLSIdentityServiceInterface, | |
| 20 public RenderProcessObserver { | |
| 21 public: | |
| 22 WebRTCIdentityService(const GURL& origin); | |
|
Ami GONE FROM CHROMIUM
2013/06/27 20:05:18
explicit
jiayl
2013/06/27 21:08:37
Done.
| |
| 23 virtual ~WebRTCIdentityService(); | |
| 24 | |
| 25 // WebRTCIdentityServiceInterface implementation. | |
| 26 virtual bool RequestIdentity(const std::string& identity_name, | |
| 27 const std::string& common_name, | |
| 28 webrtc::DTLSIdentityRequestObserver* observer) | |
|
Ami GONE FROM CHROMIUM
2013/06/27 20:05:18
why does this interface pass a raw pointer to a re
jiayl
2013/06/27 21:08:37
This is following the other webrtc interfaces, lik
| |
| 29 OVERRIDE; | |
| 30 | |
| 31 private: | |
| 32 // RenderProcessObserver implementation. | |
| 33 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; | |
| 34 | |
| 35 void OnIdentityReady(int request_id, | |
| 36 const std::string& certificate, | |
| 37 const std::string& private_key); | |
| 38 | |
| 39 void OnRequestFailed(int request_id, int error); | |
| 40 | |
| 41 // The origin of the DTLS connection. | |
| 42 GURL origin_; | |
| 43 talk_base::scoped_refptr<webrtc::DTLSIdentityRequestObserver> | |
| 44 pending_observer_; | |
| 45 int pending_request_id_; | |
| 46 DISALLOW_COPY_AND_ASSIGN(WebRTCIdentityService); | |
| 47 }; | |
| 48 | |
| 49 } // namespace content | |
| 50 | |
| 51 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_IDENTITY_SERVICE_H_ | |
| OLD | NEW |