gfx/layers/ipc/APZChild.h
author Alex Gaynor <agaynor@mozilla.com>
Wed, 06 Feb 2019 15:58:43 +0000
changeset 518312 92091d537161e4df0986113e26762ed801190dfa
parent 508163 6f3709b3878117466168c40affa7bca0b60cf75b
child 524266 91d0c9066fd139285e025b0b87a70f61823281af
permissions -rw-r--r--
Bug 1512990 - Part 4 - remove declarations of Recv/Answer methods from IPDL protocol base class; r=froydnj For cases where the class has direct calls (that is, we cast `this` to the subclass before making the call) no longer declare Recv/Answer methods on the base class at all. This should ensure that slots for them are not generated in vtables, and also allow the derived class to choose the method signature (e.g. whether it wants to take something by reference or by value). Differential Revision: https://phabricator.services.mozilla.com/D18132

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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/. */

#ifndef mozilla_layers_APZChild_h
#define mozilla_layers_APZChild_h

#include "mozilla/layers/PAPZChild.h"

namespace mozilla {

namespace layers {

class GeckoContentController;

/**
 * APZChild implements PAPZChild and is used to remote a GeckoContentController
 * that lives in a different process than where APZ lives.
 */
class APZChild final : public PAPZChild {
 public:
  explicit APZChild(RefPtr<GeckoContentController> aController);
  ~APZChild();

  mozilla::ipc::IPCResult RecvRequestContentRepaint(
      const RepaintRequest& aRequest);

  mozilla::ipc::IPCResult RecvUpdateOverscrollVelocity(
      const float& aX, const float& aY, const bool& aIsRootContent);

  mozilla::ipc::IPCResult RecvUpdateOverscrollOffset(
      const float& aX, const float& aY, const bool& aIsRootContent);

  mozilla::ipc::IPCResult RecvNotifyMozMouseScrollEvent(const ViewID& aScrollId,
                                                        const nsString& aEvent);

  mozilla::ipc::IPCResult RecvNotifyAPZStateChange(
      const ScrollableLayerGuid& aGuid, const APZStateChange& aChange,
      const int& aArg);

  mozilla::ipc::IPCResult RecvNotifyFlushComplete();

  mozilla::ipc::IPCResult RecvNotifyAsyncScrollbarDragInitiated(
      const uint64_t& aDragBlockId, const ViewID& aScrollId,
      const ScrollDirection& aDirection);
  mozilla::ipc::IPCResult RecvNotifyAsyncScrollbarDragRejected(
      const ViewID& aScrollId);

  mozilla::ipc::IPCResult RecvNotifyAsyncAutoscrollRejected(
      const ViewID& aScrollId);

  mozilla::ipc::IPCResult RecvDestroy();

 private:
  RefPtr<GeckoContentController> mController;
};

}  // namespace layers

}  // namespace mozilla

#endif  // mozilla_layers_APZChild_h