| Index: content/renderer/media/dtls_identity_service.h
|
| diff --git a/content/renderer/media/dtls_identity_service.h b/content/renderer/media/dtls_identity_service.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5c820c2bef36f4168aa5648a8b0aa4b856f14cdb
|
| --- /dev/null
|
| +++ b/content/renderer/media/dtls_identity_service.h
|
| @@ -0,0 +1,52 @@
|
| +// 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_DTLS_IDENTITY_SERVICE_H_
|
| +#define CONTENT_RENDERER_MEDIA_DTLS_IDENTITY_SERVICE_H_
|
| +
|
| +#include <string>
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "base/memory/scoped_ptr.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 DTLS identity requests by sending IPC messages to the
|
| +// browser process.
|
| +class DTLSIdentityService : public webrtc::DTLSIdentityServiceInterface,
|
| + public RenderProcessObserver {
|
| + public:
|
| + DTLSIdentityService(const GURL& origin);
|
| + virtual ~DTLSIdentityService();
|
| +
|
| + // DTLSIdentityServiceInterface implementation.
|
| + virtual bool RequestIdentity(
|
| + const std::string& identity_name,
|
| + const std::string& common_name,
|
| + webrtc::DTLSIdentityRequestObserver* observer) 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 PeerConnection which owns this DTLSIdentityService.
|
| + GURL origin_;
|
| + talk_base::scoped_refptr<webrtc::DTLSIdentityRequestObserver>
|
| + pending_observer_;
|
| + int pending_request_id_;
|
| + DISALLOW_COPY_AND_ASSIGN(DTLSIdentityService);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_RENDERER_MEDIA_DTLS_IDENTITY_SERVICE_H_
|
|
|