mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Apply clang-format to all C, C++ and ObjC files (issue #2171)
This commit is contained in:
@@ -22,36 +22,34 @@
|
||||
|
||||
namespace client {
|
||||
|
||||
#define DEFAULT_QUERY_INTERFACE(__Class) \
|
||||
#define DEFAULT_QUERY_INTERFACE(__Class) \
|
||||
HRESULT __stdcall QueryInterface(const IID& iid, void** object) { \
|
||||
*object = NULL; \
|
||||
if (IsEqualIID(iid, IID_IUnknown)) { \
|
||||
IUnknown* obj = this; \
|
||||
*object = obj; \
|
||||
} else if (IsEqualIID(iid, IID_ ## __Class)) { \
|
||||
__Class* obj = this; \
|
||||
*object = obj; \
|
||||
} else { \
|
||||
return E_NOINTERFACE; \
|
||||
} \
|
||||
AddRef(); \
|
||||
return S_OK; \
|
||||
*object = NULL; \
|
||||
if (IsEqualIID(iid, IID_IUnknown)) { \
|
||||
IUnknown* obj = this; \
|
||||
*object = obj; \
|
||||
} else if (IsEqualIID(iid, IID_##__Class)) { \
|
||||
__Class* obj = this; \
|
||||
*object = obj; \
|
||||
} else { \
|
||||
return E_NOINTERFACE; \
|
||||
} \
|
||||
AddRef(); \
|
||||
return S_OK; \
|
||||
}
|
||||
#define IUNKNOWN_IMPLEMENTATION \
|
||||
ULONG __stdcall AddRef() { \
|
||||
return ++ref_count_; \
|
||||
} \
|
||||
ULONG __stdcall Release() { \
|
||||
if (--ref_count_ == 0) { \
|
||||
delete this; \
|
||||
return 0U; \
|
||||
} \
|
||||
return ref_count_; \
|
||||
} \
|
||||
protected: \
|
||||
#define IUNKNOWN_IMPLEMENTATION \
|
||||
ULONG __stdcall AddRef() { return ++ref_count_; } \
|
||||
ULONG __stdcall Release() { \
|
||||
if (--ref_count_ == 0) { \
|
||||
delete this; \
|
||||
return 0U; \
|
||||
} \
|
||||
return ref_count_; \
|
||||
} \
|
||||
\
|
||||
protected: \
|
||||
ULONG ref_count_;
|
||||
|
||||
|
||||
class DropTargetWin : public IDropTarget {
|
||||
public:
|
||||
static CComPtr<DropTargetWin> Create(OsrDragEvents* callback, HWND hWnd);
|
||||
@@ -60,7 +58,8 @@ class DropTargetWin : public IDropTarget {
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefDragData> drag_data,
|
||||
CefRenderHandler::DragOperationsMask allowed_ops,
|
||||
int x, int y);
|
||||
int x,
|
||||
int y);
|
||||
|
||||
// IDropTarget implementation:
|
||||
HRESULT __stdcall DragEnter(IDataObject* data_object,
|
||||
@@ -84,9 +83,7 @@ class DropTargetWin : public IDropTarget {
|
||||
|
||||
protected:
|
||||
DropTargetWin(OsrDragEvents* callback, HWND hWnd)
|
||||
: ref_count_(0),
|
||||
callback_(callback),
|
||||
hWnd_(hWnd) {}
|
||||
: ref_count_(0), callback_(callback), hWnd_(hWnd) {}
|
||||
virtual ~DropTargetWin() {}
|
||||
|
||||
private:
|
||||
@@ -123,26 +120,26 @@ class DragEnumFormatEtc : public IEnumFORMATETC {
|
||||
// IEnumFormatEtc members
|
||||
//
|
||||
HRESULT __stdcall Next(ULONG celt,
|
||||
FORMATETC * pFormatEtc,
|
||||
ULONG * pceltFetched);
|
||||
FORMATETC* pFormatEtc,
|
||||
ULONG* pceltFetched);
|
||||
HRESULT __stdcall Skip(ULONG celt);
|
||||
HRESULT __stdcall Reset(void);
|
||||
HRESULT __stdcall Clone(IEnumFORMATETC ** ppEnumFormatEtc);
|
||||
HRESULT __stdcall Clone(IEnumFORMATETC** ppEnumFormatEtc);
|
||||
|
||||
//
|
||||
// Construction / Destruction
|
||||
//
|
||||
DragEnumFormatEtc(FORMATETC *pFormatEtc, int nNumFormats);
|
||||
DragEnumFormatEtc(FORMATETC* pFormatEtc, int nNumFormats);
|
||||
~DragEnumFormatEtc();
|
||||
|
||||
static void DeepCopyFormatEtc(FORMATETC *dest, FORMATETC *source);
|
||||
static void DeepCopyFormatEtc(FORMATETC* dest, FORMATETC* source);
|
||||
|
||||
DEFAULT_QUERY_INTERFACE(IEnumFORMATETC)
|
||||
IUNKNOWN_IMPLEMENTATION
|
||||
|
||||
private:
|
||||
ULONG m_nIndex; // current enumerator index
|
||||
ULONG m_nNumFormats; // number of FORMATETC members
|
||||
ULONG m_nIndex; // current enumerator index
|
||||
ULONG m_nNumFormats; // number of FORMATETC members
|
||||
FORMATETC* m_pFormatEtc; // array of FORMATETC objects
|
||||
};
|
||||
|
||||
@@ -153,7 +150,7 @@ class DataObjectWin : public IDataObject {
|
||||
int count);
|
||||
|
||||
// IDataObject memberS
|
||||
HRESULT __stdcall GetDataHere(FORMATETC* pFormatEtc, STGMEDIUM *pmedium);
|
||||
HRESULT __stdcall GetDataHere(FORMATETC* pFormatEtc, STGMEDIUM* pmedium);
|
||||
HRESULT __stdcall QueryGetData(FORMATETC* pFormatEtc);
|
||||
HRESULT __stdcall GetCanonicalFormatEtc(FORMATETC* pFormatEct,
|
||||
FORMATETC* pFormatEtcOut);
|
||||
@@ -165,11 +162,11 @@ class DataObjectWin : public IDataObject {
|
||||
IAdviseSink*,
|
||||
DWORD*);
|
||||
HRESULT __stdcall DUnadvise(DWORD dwConnection);
|
||||
HRESULT __stdcall EnumDAdvise(IEnumSTATDATA **ppEnumAdvise);
|
||||
HRESULT __stdcall EnumDAdvise(IEnumSTATDATA** ppEnumAdvise);
|
||||
|
||||
HRESULT __stdcall EnumFormatEtc(DWORD dwDirection,
|
||||
IEnumFORMATETC **ppEnumFormatEtc);
|
||||
HRESULT __stdcall GetData(FORMATETC *pFormatEtc, STGMEDIUM *pMedium);
|
||||
IEnumFORMATETC** ppEnumFormatEtc);
|
||||
HRESULT __stdcall GetData(FORMATETC* pFormatEtc, STGMEDIUM* pMedium);
|
||||
|
||||
DEFAULT_QUERY_INTERFACE(IDataObject)
|
||||
IUNKNOWN_IMPLEMENTATION
|
||||
@@ -181,9 +178,9 @@ class DataObjectWin : public IDataObject {
|
||||
|
||||
static HGLOBAL DupGlobalMem(HGLOBAL hMem);
|
||||
|
||||
int LookupFormatEtc(FORMATETC *pFormatEtc);
|
||||
int LookupFormatEtc(FORMATETC* pFormatEtc);
|
||||
|
||||
explicit DataObjectWin(FORMATETC *fmtetc, STGMEDIUM *stgmed, int count);
|
||||
explicit DataObjectWin(FORMATETC* fmtetc, STGMEDIUM* stgmed, int count);
|
||||
};
|
||||
|
||||
} // namespace client
|
||||
|
Reference in New Issue
Block a user