2014-08-08 14:42:20 -07:00
|
|
|
/* -*- Mode: c++; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
|
|
|
|
* 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/. */
|
|
|
|
|
2015-04-24 19:26:51 -07:00
|
|
|
#ifndef AndroidContentController_h__
|
|
|
|
#define AndroidContentController_h__
|
2014-08-08 14:42:20 -07:00
|
|
|
|
2015-03-27 12:18:19 -07:00
|
|
|
#include "mozilla/layers/ChromeProcessController.h"
|
2015-03-02 13:38:07 -08:00
|
|
|
#include "mozilla/EventForwards.h" // for Modifiers
|
2015-01-09 16:33:57 -08:00
|
|
|
#include "mozilla/StaticPtr.h"
|
2014-08-08 14:42:20 -07:00
|
|
|
#include "mozilla/TimeStamp.h"
|
|
|
|
#include "nsIDOMWindowUtils.h"
|
|
|
|
#include "nsTArray.h"
|
2016-01-25 17:32:33 -08:00
|
|
|
#include "nsWindow.h"
|
2014-08-08 14:42:20 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
2015-08-13 15:26:00 -07:00
|
|
|
namespace layers {
|
|
|
|
class APZEventState;
|
|
|
|
class APZCTreeManager;
|
|
|
|
}
|
2014-08-08 14:42:20 -07:00
|
|
|
namespace widget {
|
|
|
|
|
2016-01-15 10:05:45 -08:00
|
|
|
class AndroidContentController final
|
|
|
|
: public mozilla::layers::ChromeProcessController
|
2014-08-08 14:42:20 -07:00
|
|
|
{
|
2015-04-24 19:26:51 -07:00
|
|
|
public:
|
2016-01-25 17:32:33 -08:00
|
|
|
AndroidContentController(nsWindow* aWindow,
|
2015-08-13 15:26:00 -07:00
|
|
|
mozilla::layers::APZEventState* aAPZEventState,
|
|
|
|
mozilla::layers::APZCTreeManager* aAPZCTreeManager)
|
2016-01-25 17:32:33 -08:00
|
|
|
: mozilla::layers::ChromeProcessController(aWindow, aAPZEventState, aAPZCTreeManager)
|
|
|
|
, mAndroidWindow(aWindow)
|
2014-08-08 14:42:20 -07:00
|
|
|
{}
|
|
|
|
|
2015-04-24 19:26:51 -07:00
|
|
|
// ChromeProcessController methods
|
2016-01-25 17:32:33 -08:00
|
|
|
virtual void Destroy() override;
|
2015-11-13 12:10:52 -08:00
|
|
|
void HandleSingleTap(const CSSPoint& aPoint,
|
|
|
|
Modifiers aModifiers,
|
|
|
|
const ScrollableLayerGuid& aGuid) override;
|
2015-04-24 19:26:51 -07:00
|
|
|
void PostDelayedTask(Task* aTask, int aDelayMs) override;
|
2016-01-25 17:32:33 -08:00
|
|
|
void UpdateOverscrollVelocity(const float aX, const float aY) override;
|
|
|
|
void UpdateOverscrollOffset(const float aX,const float aY) override;
|
2014-08-08 14:42:20 -07:00
|
|
|
|
2016-01-15 10:05:45 -08:00
|
|
|
static void NotifyDefaultPrevented(mozilla::layers::APZCTreeManager* aManager,
|
|
|
|
uint64_t aInputBlockId, bool aDefaultPrevented);
|
2016-01-25 17:32:33 -08:00
|
|
|
private:
|
|
|
|
nsWindow* mAndroidWindow;
|
2014-08-08 14:42:20 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace widget
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|