1 /* -*- Mode: c++; c-basic-offset: 2; tab-width: 20; indent-tabs-mode: nil; -*- 2 * This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 #ifndef AndroidContentController_h__ 7 #define AndroidContentController_h__ 8 9 #include "mozilla/layers/ChromeProcessController.h" 10 #include "mozilla/EventForwards.h" // for Modifiers 11 #include "mozilla/StaticPtr.h" 12 #include "mozilla/TimeStamp.h" 13 #include "nsTArray.h" 14 #include "nsWindow.h" 15 16 namespace mozilla { 17 namespace layers { 18 class APZEventState; 19 class IAPZCTreeManager; 20 } // namespace layers 21 namespace widget { 22 23 class AndroidContentController final 24 : public mozilla::layers::ChromeProcessController { 25 public: AndroidContentController(nsWindow * aWindow,mozilla::layers::APZEventState * aAPZEventState,mozilla::layers::IAPZCTreeManager * aAPZCTreeManager)26 AndroidContentController(nsWindow* aWindow, 27 mozilla::layers::APZEventState* aAPZEventState, 28 mozilla::layers::IAPZCTreeManager* aAPZCTreeManager) 29 : mozilla::layers::ChromeProcessController(aWindow, aAPZEventState, 30 aAPZCTreeManager), 31 mAndroidWindow(aWindow) {} 32 33 // ChromeProcessController methods 34 virtual void Destroy() override; 35 void UpdateOverscrollVelocity(const float aX, const float aY, 36 const bool aIsRootContent) override; 37 void UpdateOverscrollOffset(const float aX, const float aY, 38 const bool aIsRootContent) override; 39 void NotifyAPZStateChange(const ScrollableLayerGuid& aGuid, 40 APZStateChange aChange, int aArg) override; 41 42 private: 43 nsWindow* mAndroidWindow; 44 }; 45 46 } // namespace widget 47 } // namespace mozilla 48 49 #endif 50