Commit c116b60b authored by Dragana Damjanovic's avatar Dragana Damjanovic
Browse files

Bug 1382886 - Add a callback when the handshake is done. r=necko-reviewers,kershaw,keeler

parent 96de6230
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ XPIDL_SOURCES += [
    "nsIHttpHeaderVisitor.idl",
    "nsIHttpProtocolHandler.idl",
    "nsIRaceCacheWithNetwork.idl",
    "nsITlsHandshakeListener.idl",
    "nsIWellKnownOpportunisticUtils.idl",
]

+6 −0
Original line number Diff line number Diff line
@@ -2368,6 +2368,7 @@ NS_INTERFACE_MAP_BEGIN(nsHttpConnection)
  NS_INTERFACE_MAP_ENTRY(nsIOutputStreamCallback)
  NS_INTERFACE_MAP_ENTRY(nsITransportEventSink)
  NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor)
  NS_INTERFACE_MAP_ENTRY(nsITlsHandshakeCallbackListener)
  NS_INTERFACE_MAP_ENTRY(HttpConnectionBase)
  NS_INTERFACE_MAP_ENTRY_CONCRETE(nsHttpConnection)
NS_INTERFACE_MAP_END
@@ -2597,5 +2598,10 @@ bool nsHttpConnection::GetEchConfigUsed() {
  return val;
}

NS_IMETHODIMP
nsHttpConnection::HandshakeDone() {
  return NS_OK;
}

}  // namespace net
}  // namespace mozilla
+3 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include "nsIInterfaceRequestor.h"
#include "nsISupportsPriority.h"
#include "nsITimer.h"
#include "nsITlsHandshakeListener.h"

class nsISocketTransport;
class nsISSLSocketControl;
@@ -56,6 +57,7 @@ class nsHttpConnection final : public HttpConnectionBase,
                               public nsIOutputStreamCallback,
                               public nsITransportEventSink,
                               public nsIInterfaceRequestor,
                               public nsITlsHandshakeCallbackListener,
                               public NudgeTunnelCallback {
 private:
  virtual ~nsHttpConnection();
@@ -70,6 +72,7 @@ class nsHttpConnection final : public HttpConnectionBase,
  NS_DECL_NSIOUTPUTSTREAMCALLBACK
  NS_DECL_NSITRANSPORTEVENTSINK
  NS_DECL_NSIINTERFACEREQUESTOR
  NS_DECL_NSITLSHANDSHAKECALLBACKLISTENER
  NS_DECL_NUDGETUNNELCALLBACK

  nsHttpConnection();
+12 −0
Original line number Diff line number Diff line
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"

[builtinclass, uuid(b4bbe824-ec4c-48be-9a40-6a7339347f40)]
interface nsITlsHandshakeCallbackListener : nsISupports {
    [noscript] void handshakeDone();
};
+3 −1
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@

interface nsIInterfaceRequestor;
interface nsIX509Cert;
interface nsITlsHandshakeCallbackListener;

%{C++
#include "nsStringFwd.h"
@@ -171,5 +172,6 @@ interface nsISSLSocketControl : nsISupports {
     * Disable early data.
     */
    [noscript] void disableEarlyData();
};

    [noscript] void setHandshakeCallbackListener(in nsITlsHandshakeCallbackListener callback);
};
Loading