Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: ui/base/dragdrop/os_exchange_data_provider_win.h

Issue 10537183: Upwards compatibility for Win8 SDK IDataObjectAsyncCapability/IAsyncOperation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: shorten url Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/base/dragdrop/os_exchange_data_provider_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/dragdrop/os_exchange_data_provider_win.h
diff --git a/ui/base/dragdrop/os_exchange_data_provider_win.h b/ui/base/dragdrop/os_exchange_data_provider_win.h
index 760719fc2a80f1645b7fd7f5cada6b2ed8fe3805..e126e8d1f82687288beb31908c4a868ed7eb089b 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_win.h
+++ b/ui/base/dragdrop/os_exchange_data_provider_win.h
@@ -10,6 +10,15 @@
#include <shlobj.h>
#include <string>
+// Win8 SDK compatibility, see http://goo.gl/fufvl for more information.
+// "Note: This interface has been renamed IDataObjectAsyncCapability."
+// If we're building on pre-8 we define it to its old name. It's documented as
+// being binary compatible.
+#ifndef __IDataObjectAsyncCapability_FWD_DEFINED__
+#define IDataObjectAsyncCapability IAsyncOperation
+#define IID_IDataObjectAsyncCapability IID_IAsyncOperation
+#endif
+
#include "base/win/scoped_comptr.h"
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/ui_export.h"
@@ -18,7 +27,7 @@ namespace ui {
class DataObjectImpl : public DownloadFileObserver,
public IDataObject,
- public IAsyncOperation {
+ public IDataObjectAsyncCapability {
public:
class Observer {
public:
@@ -55,7 +64,7 @@ class DataObjectImpl : public DownloadFileObserver,
HRESULT __stdcall DUnadvise(DWORD connection);
HRESULT __stdcall EnumDAdvise(IEnumSTATDATA** enumerator);
- // IAsyncOperation implementation:
+ // IDataObjectAsyncCapability implementation:
HRESULT __stdcall EndOperation(
HRESULT result, IBindCtx* reserved, DWORD effects);
HRESULT __stdcall GetAsyncMode(BOOL* is_op_async);
@@ -138,7 +147,8 @@ class UI_EXPORT OSExchangeDataProviderWin : public OSExchangeData::Provider {
static DataObjectImpl* GetDataObjectImpl(const OSExchangeData& data);
static IDataObject* GetIDataObject(const OSExchangeData& data);
- static IAsyncOperation* GetIAsyncOperation(const OSExchangeData& data);
+ static IDataObjectAsyncCapability* GetIAsyncOperation(
+ const OSExchangeData& data);
explicit OSExchangeDataProviderWin(IDataObject* source);
OSExchangeDataProviderWin();
@@ -146,7 +156,7 @@ class UI_EXPORT OSExchangeDataProviderWin : public OSExchangeData::Provider {
virtual ~OSExchangeDataProviderWin();
IDataObject* data_object() const { return data_.get(); }
- IAsyncOperation* async_operation() const { return data_.get(); }
+ IDataObjectAsyncCapability* async_operation() const { return data_.get(); }
// OSExchangeData::Provider methods.
virtual void SetString(const string16& data);
« no previous file with comments | « no previous file | ui/base/dragdrop/os_exchange_data_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698