1 /*
   2  * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
   3  */
   4 
   5 #pragma once
   6 
   7 #include "DataTransfer.h"
   8 #include "DragActions.h"
   9 #include "DragClient.h"
  10 #include "DragImage.h"
  11 #include "Frame.h"
  12 #include "IntPoint.h"
  13 #include <wtf/java/JavaEnv.h>
  14 
  15 namespace WebCore {
  16 
  17 class DataTransfer;
  18 class DragData;
  19 class Frame;
  20 class Image;
  21 class HTMLImageElement;
  22 
  23 class DragClientJava final: public DragClient {
  24 public:
  25     DragClientJava(const JLObject &webPage);
  26     ~DragClientJava() override;
  27 
  28     void willPerformDragDestinationAction(DragDestinationAction, const DragData&) override;
  29     void willPerformDragSourceAction(DragSourceAction, const IntPoint&, DataTransfer& clipboard) override;
  30     DragDestinationAction actionMaskForDrag(const DragData& data) override;
  31     //We work in window rather than view coordinates here
  32     DragSourceAction dragSourceActionMaskForPoint(const IntPoint& windowPoint) override;
  33 
  34     void startDrag(DragImage, const IntPoint& dragImageOrigin, const IntPoint& eventPos, const FloatPoint& dragImageAnchor, DataTransfer&, Frame&, DragSourceAction) override;
  35 
  36     void dragControllerDestroyed() override;
  37     void updateFileExtension(const URL&) override;
  38 private:
  39     JGObject m_webPage;
  40     String m_fileExt;
  41 };
  42 
  43 } // namespace WebCore