| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ | 5 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ |
| 6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ | 6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ |
| 7 | 7 |
| 8 #include <objidl.h> | 8 #include <objidl.h> |
| 9 #include <shlobj.h> | 9 #include <shlobj.h> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 DataObjectImpl(); | 40 DataObjectImpl(); |
| 41 | 41 |
| 42 // Accessors. | 42 // Accessors. |
| 43 void set_observer(Observer* observer) { observer_ = observer; } | 43 void set_observer(Observer* observer) { observer_ = observer; } |
| 44 | 44 |
| 45 // Number of known formats. | 45 // Number of known formats. |
| 46 size_t size() const { return contents_.size(); } | 46 size_t size() const { return contents_.size(); } |
| 47 | 47 |
| 48 // DownloadFileObserver implementation: | 48 // DownloadFileObserver implementation: |
| 49 virtual void OnDownloadCompleted(const FilePath& file_path); | 49 virtual void OnDownloadCompleted(const base::FilePath& file_path); |
| 50 virtual void OnDownloadAborted(); | 50 virtual void OnDownloadAborted(); |
| 51 | 51 |
| 52 // IDataObject implementation: | 52 // IDataObject implementation: |
| 53 HRESULT __stdcall GetData(FORMATETC* format_etc, STGMEDIUM* medium); | 53 HRESULT __stdcall GetData(FORMATETC* format_etc, STGMEDIUM* medium); |
| 54 HRESULT __stdcall GetDataHere(FORMATETC* format_etc, STGMEDIUM* medium); | 54 HRESULT __stdcall GetDataHere(FORMATETC* format_etc, STGMEDIUM* medium); |
| 55 HRESULT __stdcall QueryGetData(FORMATETC* format_etc); | 55 HRESULT __stdcall QueryGetData(FORMATETC* format_etc); |
| 56 HRESULT __stdcall GetCanonicalFormatEtc( | 56 HRESULT __stdcall GetCanonicalFormatEtc( |
| 57 FORMATETC* format_etc, FORMATETC* result); | 57 FORMATETC* format_etc, FORMATETC* result); |
| 58 HRESULT __stdcall SetData( | 58 HRESULT __stdcall SetData( |
| 59 FORMATETC* format_etc, STGMEDIUM* medium, BOOL should_release); | 59 FORMATETC* format_etc, STGMEDIUM* medium, BOOL should_release); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 OSExchangeDataProviderWin(); | 154 OSExchangeDataProviderWin(); |
| 155 | 155 |
| 156 virtual ~OSExchangeDataProviderWin(); | 156 virtual ~OSExchangeDataProviderWin(); |
| 157 | 157 |
| 158 IDataObject* data_object() const { return data_.get(); } | 158 IDataObject* data_object() const { return data_.get(); } |
| 159 IDataObjectAsyncCapability* async_operation() const { return data_.get(); } | 159 IDataObjectAsyncCapability* async_operation() const { return data_.get(); } |
| 160 | 160 |
| 161 // OSExchangeData::Provider methods. | 161 // OSExchangeData::Provider methods. |
| 162 virtual void SetString(const string16& data); | 162 virtual void SetString(const string16& data); |
| 163 virtual void SetURL(const GURL& url, const string16& title); | 163 virtual void SetURL(const GURL& url, const string16& title); |
| 164 virtual void SetFilename(const FilePath& path); | 164 virtual void SetFilename(const base::FilePath& path); |
| 165 virtual void SetFilenames( | 165 virtual void SetFilenames( |
| 166 const std::vector<OSExchangeData::FileInfo>& filenames); | 166 const std::vector<OSExchangeData::FileInfo>& filenames); |
| 167 virtual void SetPickledData(OSExchangeData::CustomFormat format, | 167 virtual void SetPickledData(OSExchangeData::CustomFormat format, |
| 168 const Pickle& data); | 168 const Pickle& data); |
| 169 virtual void SetFileContents(const FilePath& filename, | 169 virtual void SetFileContents(const base::FilePath& filename, |
| 170 const std::string& file_contents); | 170 const std::string& file_contents); |
| 171 virtual void SetHtml(const string16& html, const GURL& base_url); | 171 virtual void SetHtml(const string16& html, const GURL& base_url); |
| 172 | 172 |
| 173 virtual bool GetString(string16* data) const; | 173 virtual bool GetString(string16* data) const; |
| 174 virtual bool GetURLAndTitle(GURL* url, string16* title) const; | 174 virtual bool GetURLAndTitle(GURL* url, string16* title) const; |
| 175 virtual bool GetFilename(FilePath* path) const; | 175 virtual bool GetFilename(base::FilePath* path) const; |
| 176 virtual bool GetFilenames( | 176 virtual bool GetFilenames( |
| 177 std::vector<OSExchangeData::FileInfo>* filenames) const; | 177 std::vector<OSExchangeData::FileInfo>* filenames) const; |
| 178 virtual bool GetPickledData(OSExchangeData::CustomFormat format, | 178 virtual bool GetPickledData(OSExchangeData::CustomFormat format, |
| 179 Pickle* data) const; | 179 Pickle* data) const; |
| 180 virtual bool GetFileContents(FilePath* filename, | 180 virtual bool GetFileContents(base::FilePath* filename, |
| 181 std::string* file_contents) const; | 181 std::string* file_contents) const; |
| 182 virtual bool GetHtml(string16* html, GURL* base_url) const; | 182 virtual bool GetHtml(string16* html, GURL* base_url) const; |
| 183 virtual bool HasString() const; | 183 virtual bool HasString() const; |
| 184 virtual bool HasURL() const; | 184 virtual bool HasURL() const; |
| 185 virtual bool HasFile() const; | 185 virtual bool HasFile() const; |
| 186 virtual bool HasFileContents() const; | 186 virtual bool HasFileContents() const; |
| 187 virtual bool HasHtml() const; | 187 virtual bool HasHtml() const; |
| 188 virtual bool HasCustomFormat(OSExchangeData::CustomFormat format) const; | 188 virtual bool HasCustomFormat(OSExchangeData::CustomFormat format) const; |
| 189 virtual void SetDownloadFileInfo( | 189 virtual void SetDownloadFileInfo( |
| 190 const OSExchangeData::DownloadFileInfo& download_info); | 190 const OSExchangeData::DownloadFileInfo& download_info); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 204 gfx::ImageSkia drag_image_; | 204 gfx::ImageSkia drag_image_; |
| 205 gfx::Vector2d drag_image_offset_; | 205 gfx::Vector2d drag_image_offset_; |
| 206 #endif | 206 #endif |
| 207 | 207 |
| 208 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin); | 208 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin); |
| 209 }; | 209 }; |
| 210 | 210 |
| 211 } // namespace ui | 211 } // namespace ui |
| 212 | 212 |
| 213 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ | 213 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ |
| OLD | NEW |