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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 virtual ~OSExchangeDataProviderWin(); | 154 virtual ~OSExchangeDataProviderWin(); |
155 | 155 |
156 IDataObject* data_object() const { return data_.get(); } | 156 IDataObject* data_object() const { return data_.get(); } |
157 IDataObjectAsyncCapability* async_operation() const { return data_.get(); } | 157 IDataObjectAsyncCapability* async_operation() const { return data_.get(); } |
158 | 158 |
159 // OSExchangeData::Provider methods. | 159 // OSExchangeData::Provider methods. |
160 virtual void SetString(const string16& data); | 160 virtual void SetString(const string16& data); |
161 virtual void SetURL(const GURL& url, const string16& title); | 161 virtual void SetURL(const GURL& url, const string16& title); |
162 virtual void SetFilename(const FilePath& path); | 162 virtual void SetFilename(const FilePath& path); |
163 virtual void SetFilenames( | 163 virtual void SetFilenames( |
164 const std::vector<OSExchangeData::FileInfo>& filenames) { | 164 const std::vector<OSExchangeData::FileInfo>& filenames); |
165 NOTREACHED(); | |
166 } | |
167 virtual void SetPickledData(OSExchangeData::CustomFormat format, | 165 virtual void SetPickledData(OSExchangeData::CustomFormat format, |
168 const Pickle& data); | 166 const Pickle& data); |
169 virtual void SetFileContents(const FilePath& filename, | 167 virtual void SetFileContents(const FilePath& filename, |
170 const std::string& file_contents); | 168 const std::string& file_contents); |
171 virtual void SetHtml(const string16& html, const GURL& base_url); | 169 virtual void SetHtml(const string16& html, const GURL& base_url); |
172 | 170 |
173 virtual bool GetString(string16* data) const; | 171 virtual bool GetString(string16* data) const; |
174 virtual bool GetURLAndTitle(GURL* url, string16* title) const; | 172 virtual bool GetURLAndTitle(GURL* url, string16* title) const; |
175 virtual bool GetFilename(FilePath* path) const; | 173 virtual bool GetFilename(FilePath* path) const; |
176 virtual bool GetFilenames( | 174 virtual bool GetFilenames( |
177 std::vector<OSExchangeData::FileInfo>* filenames) const { | 175 std::vector<OSExchangeData::FileInfo>* filenames) const; |
178 NOTREACHED(); | |
179 return false; | |
180 } | |
181 virtual bool GetPickledData(OSExchangeData::CustomFormat format, | 176 virtual bool GetPickledData(OSExchangeData::CustomFormat format, |
182 Pickle* data) const; | 177 Pickle* data) const; |
183 virtual bool GetFileContents(FilePath* filename, | 178 virtual bool GetFileContents(FilePath* filename, |
184 std::string* file_contents) const; | 179 std::string* file_contents) const; |
185 virtual bool GetHtml(string16* html, GURL* base_url) const; | 180 virtual bool GetHtml(string16* html, GURL* base_url) const; |
186 virtual bool HasString() const; | 181 virtual bool HasString() const; |
187 virtual bool HasURL() const; | 182 virtual bool HasURL() const; |
188 virtual bool HasFile() const; | 183 virtual bool HasFile() const; |
189 virtual bool HasFileContents() const; | 184 virtual bool HasFileContents() const; |
190 virtual bool HasHtml() const; | 185 virtual bool HasHtml() const; |
191 virtual bool HasCustomFormat(OSExchangeData::CustomFormat format) const; | 186 virtual bool HasCustomFormat(OSExchangeData::CustomFormat format) const; |
192 virtual void SetDownloadFileInfo( | 187 virtual void SetDownloadFileInfo( |
193 const OSExchangeData::DownloadFileInfo& download_info); | 188 const OSExchangeData::DownloadFileInfo& download_info); |
194 | 189 |
195 private: | 190 private: |
196 scoped_refptr<DataObjectImpl> data_; | 191 scoped_refptr<DataObjectImpl> data_; |
197 base::win::ScopedComPtr<IDataObject> source_object_; | 192 base::win::ScopedComPtr<IDataObject> source_object_; |
198 | 193 |
199 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin); | 194 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin); |
200 }; | 195 }; |
201 | 196 |
202 } // namespace ui | 197 } // namespace ui |
203 | 198 |
204 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ | 199 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ |
OLD | NEW |