From c74acf4552944c5485b1175c008708d19b57d322 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 9 Feb 2016 10:18:11 -0800 Subject: Several pure virtual IFWL_Adapter* classes not implemented. The routines that would return them always return NULL. Some path, however, didn't previously check for NULL. Those must have been bugs; treat such cases as unreachable. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1679103002 . --- xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h | 34 -------------------- xfa/include/fwl/adapter/fwl_adaptercursormgr.h | 38 ----------------------- xfa/include/fwl/adapter/fwl_adaptermonitormgr.h | 24 -------------- xfa/include/fwl/adapter/fwl_adapternative.h | 7 +---- xfa/include/fwl/fwl.h | 3 -- 5 files changed, 1 insertion(+), 105 deletions(-) delete mode 100644 xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h delete mode 100644 xfa/include/fwl/adapter/fwl_adaptercursormgr.h delete mode 100644 xfa/include/fwl/adapter/fwl_adaptermonitormgr.h (limited to 'xfa/include/fwl') diff --git a/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h b/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h deleted file mode 100644 index 52cd7b8ff8..0000000000 --- a/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef _FWL_ADAPTER_CLIPBOARDMGR_H -#define _FWL_ADAPTER_CLIPBOARDMGR_H - -enum FWL_CLIPBOARDFORMAT { - FWL_CLIPBOARDFORMAT_Dib, - FWL_CLIPBOARDFORMAT_Text, - FWL_CLIPBOARDFORMAT_UncodeText, -}; -typedef struct _FWL_HCLIPBOARDDATA { void* pData; } * FWL_HCLIPBOARDDATA; - -class IFWL_AdapterClipboardMgr { - public: - virtual ~IFWL_AdapterClipboardMgr() {} - virtual FWL_ERR Empty() = 0; - virtual FX_BOOL IsDataAvailable(FX_DWORD dwFormat) = 0; - virtual FWL_HCLIPBOARDDATA GetData(FX_DWORD dwFormat) = 0; - virtual FWL_ERR SetData(FX_DWORD dwFormat, uint8_t* pBuf, int32_t iSize) = 0; - virtual int32_t GetDataSize(FWL_HCLIPBOARDDATA hData) = 0; - virtual void* LockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0; - virtual FX_BOOL UnLockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0; - virtual FWL_ERR SetStringData(const CFX_WideStringC& ws) = 0; - virtual FWL_ERR SetStringData(const CFX_ByteStringC& bs) = 0; - virtual FWL_ERR GetStringData(CFX_WideString& ws) = 0; - virtual FWL_ERR GetStringData(CFX_ByteString& bs) = 0; - virtual FWL_ERR EnumFormats(CFX_DWordArray& formats) = 0; - virtual FX_DWORD RegisterFormat(const CFX_WideStringC& wsFormat) = 0; -}; -#endif diff --git a/xfa/include/fwl/adapter/fwl_adaptercursormgr.h b/xfa/include/fwl/adapter/fwl_adaptercursormgr.h deleted file mode 100644 index cc8b8ecc10..0000000000 --- a/xfa/include/fwl/adapter/fwl_adaptercursormgr.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef _FWL_ADAPTER_CURSORMGR_H -#define _FWL_ADAPTER_CURSORMGR_H -class CFX_DIBitmap; -class IFWL_AdapterCursorMgr; -enum FWL_CURSORTYPE { - FWL_CURSORTYPE_Arrow = 0, - FWL_CURSORTYPE_Cross, - FWL_CURSORTYPE_Hand, - FWL_CURSORTYPE_InputBeam, - FWL_CURSORTYPE_Wait, - FWL_CURSORTYPE_SizeAll, - FWL_CURSORTYPE_SizeNWSE, - FWL_CURSORTYPE_SizeNESW, - FWL_CURSORTYPE_SizeWE, - FWL_CURSORTYPE_SizeNS, - FWL_CURSORTYPE_Prohibition, - FWL_CURSORTYPE_Help -}; -typedef struct _FWL_HCURSOR { void* pData; } * FWL_HCURSOR; - -class IFWL_AdapterCursorMgr { - public: - virtual ~IFWL_AdapterCursorMgr() {} - virtual FWL_HCURSOR GetSystemCursor(FWL_CURSORTYPE eCursorType) = 0; - virtual FWL_HCURSOR GetCustomCursor(const CFX_DIBitmap* pBitmap, - FX_FLOAT xHotspot = 0, - FX_FLOAT yHotspot = 0) = 0; - virtual FWL_ERR SetCursor(FWL_HCURSOR hCursor) = 0; - virtual FWL_ERR ShowCursor(FX_BOOL bShow) = 0; - virtual FWL_ERR GetCursorPos(CFX_PointF& pt) = 0; -}; -#endif diff --git a/xfa/include/fwl/adapter/fwl_adaptermonitormgr.h b/xfa/include/fwl/adapter/fwl_adaptermonitormgr.h deleted file mode 100644 index 666f06cd6c..0000000000 --- a/xfa/include/fwl/adapter/fwl_adaptermonitormgr.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef _FWL_ADAPTER_MONITORMGR_H -#define _FWL_ADAPTER_MONITORMGR_H - -typedef struct _FWL_HMONITOR { void* pData; } * FWL_HMONITOR; - -class IFWL_AdapterMonitorMgr { - public: - virtual ~IFWL_AdapterMonitorMgr() {} - virtual int32_t CountMonitors() = 0; - virtual FWL_HMONITOR GetMonitor(int32_t nIndex) = 0; - virtual FWL_HMONITOR GetCurrentMonitor() = 0; - virtual FWL_HMONITOR GetMonitorByRect(const CFX_RectF& rect) = 0; - virtual FWL_HMONITOR GetMonitorByPoint(FX_FLOAT fx, FX_FLOAT fy) = 0; - virtual FWL_ERR GetMonitorSize(FWL_HMONITOR hMonitor, - FX_FLOAT& fx, - FX_FLOAT& fy) = 0; -}; -#endif diff --git a/xfa/include/fwl/adapter/fwl_adapternative.h b/xfa/include/fwl/adapter/fwl_adapternative.h index 6d02610337..b914f7bfb2 100644 --- a/xfa/include/fwl/adapter/fwl_adapternative.h +++ b/xfa/include/fwl/adapter/fwl_adapternative.h @@ -6,13 +6,11 @@ #ifndef _FWL_ADAPTER_NATIVE_H #define _FWL_ADAPTER_NATIVE_H + class IFWL_WidgetMgrDelegate; class IFWL_AdapterWidgetMgr; class IFWL_AdapterThreadMgr; class IFWL_AdapterTimerMgr; -class IFWL_AdapterCursorMgr; -class IFWL_AdapterMonitorMgr; -class IFWL_AdapterClipboardMgr; class IFWL_AdapterNative { public: @@ -21,9 +19,6 @@ class IFWL_AdapterNative { IFWL_WidgetMgrDelegate* pDelegate) = 0; virtual IFWL_AdapterThreadMgr* GetThreadMgr() = 0; virtual IFWL_AdapterTimerMgr* GetTimerMgr() = 0; - virtual IFWL_AdapterCursorMgr* GetCursorMgr() = 0; - virtual IFWL_AdapterMonitorMgr* GetMonitorMgr() = 0; - virtual IFWL_AdapterClipboardMgr* GetClipboardMgr() = 0; }; IFWL_AdapterNative* FWL_CreateFuelAdapterNative(); void FWL_ReleaseFuelAdapterNative(IFWL_AdapterNative* pAdapterNative); diff --git a/xfa/include/fwl/fwl.h b/xfa/include/fwl/fwl.h index f0b4b1519a..999e9a9fc1 100644 --- a/xfa/include/fwl/fwl.h +++ b/xfa/include/fwl/fwl.h @@ -71,8 +71,5 @@ #include "xfa/include/fwl/adapter/fwl_adapterthreadmgr.h" #include "xfa/include/fwl/adapter/fwl_adaptertimermgr.h" #include "xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h" -#include "xfa/include/fwl/adapter/fwl_adaptercursormgr.h" -#include "xfa/include/fwl/adapter/fwl_adaptermonitormgr.h" -#include "xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h" #include "xfa/include/fwl/adapter/fwl_sdadapterimp.h" #endif -- cgit v1.2.3