Chromium Code Reviews| Index: content/renderer/media/webrtc_identity_service.h |
| diff --git a/content/renderer/media/webrtc_identity_service.h b/content/renderer/media/webrtc_identity_service.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c2376bdda3b0bd38e1aee5fbe1696e2fa4832f5d |
| --- /dev/null |
| +++ b/content/renderer/media/webrtc_identity_service.h |
| @@ -0,0 +1,51 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_RENDERER_MEDIA_WEBRTC_IDENTITY_SERVICE_H_ |
| +#define CONTENT_RENDERER_MEDIA_WEBRTC_IDENTITY_SERVICE_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/basictypes.h" |
| +#include "content/public/renderer/render_process_observer.h" |
| +#include "googleurl/src/gurl.h" |
| +#include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h" |
| + |
| +namespace content { |
| + |
| +// This class handles WebRTC DTLS identity requests by sending IPC messages to |
| +// the browser process. |
| +class WebRTCIdentityService : public webrtc::DTLSIdentityServiceInterface, |
| + public RenderProcessObserver { |
| + public: |
| + WebRTCIdentityService(const GURL& origin); |
|
Ami GONE FROM CHROMIUM
2013/06/27 20:05:18
explicit
jiayl
2013/06/27 21:08:37
Done.
|
| + virtual ~WebRTCIdentityService(); |
| + |
| + // WebRTCIdentityServiceInterface implementation. |
| + virtual bool RequestIdentity(const std::string& identity_name, |
| + const std::string& common_name, |
| + 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
|
| + OVERRIDE; |
| + |
| + private: |
| + // RenderProcessObserver implementation. |
| + virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; |
| + |
| + void OnIdentityReady(int request_id, |
| + const std::string& certificate, |
| + const std::string& private_key); |
| + |
| + void OnRequestFailed(int request_id, int error); |
| + |
| + // The origin of the DTLS connection. |
| + GURL origin_; |
| + talk_base::scoped_refptr<webrtc::DTLSIdentityRequestObserver> |
| + pending_observer_; |
| + int pending_request_id_; |
| + DISALLOW_COPY_AND_ASSIGN(WebRTCIdentityService); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_RENDERER_MEDIA_WEBRTC_IDENTITY_SERVICE_H_ |