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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 explicit OSExchangeDataProviderWin(IDataObject* source); | 142 explicit OSExchangeDataProviderWin(IDataObject* source); |
143 OSExchangeDataProviderWin(); | 143 OSExchangeDataProviderWin(); |
144 | 144 |
145 virtual ~OSExchangeDataProviderWin(); | 145 virtual ~OSExchangeDataProviderWin(); |
146 | 146 |
147 IDataObject* data_object() const { return data_.get(); } | 147 IDataObject* data_object() const { return data_.get(); } |
148 IDataObjectAsyncCapability* async_operation() const { return data_.get(); } | 148 IDataObjectAsyncCapability* async_operation() const { return data_.get(); } |
149 | 149 |
150 // OSExchangeData::Provider methods. | 150 // OSExchangeData::Provider methods. |
151 virtual Provider* Clone() const; | 151 Provider* Clone() const override; |
152 virtual void MarkOriginatedFromRenderer(); | 152 void MarkOriginatedFromRenderer() override; |
153 virtual bool DidOriginateFromRenderer() const; | 153 bool DidOriginateFromRenderer() const override; |
154 virtual void SetString(const base::string16& data); | 154 void SetString(const base::string16& data) override; |
155 virtual void SetURL(const GURL& url, const base::string16& title); | 155 void SetURL(const GURL& url, const base::string16& title) override; |
156 virtual void SetFilename(const base::FilePath& path); | 156 void SetFilename(const base::FilePath& path) override; |
157 virtual void SetFilenames(const std::vector<FileInfo>& filenames); | 157 void SetFilenames(const std::vector<FileInfo>& filenames) override; |
158 virtual void SetPickledData(const OSExchangeData::CustomFormat& format, | 158 void SetPickledData(const OSExchangeData::CustomFormat& format, |
159 const Pickle& data); | 159 const Pickle& data) override; |
160 virtual void SetFileContents(const base::FilePath& filename, | 160 void SetFileContents(const base::FilePath& filename, |
161 const std::string& file_contents); | 161 const std::string& file_contents) override; |
162 virtual void SetHtml(const base::string16& html, const GURL& base_url); | 162 void SetHtml(const base::string16& html, const GURL& base_url) override; |
163 | 163 |
164 virtual bool GetString(base::string16* data) const; | 164 bool GetString(base::string16* data) const override; |
165 virtual bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy, | 165 bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy, |
166 GURL* url, | 166 GURL* url, |
167 base::string16* title) const; | 167 base::string16* title) const override; |
168 virtual bool GetFilename(base::FilePath* path) const; | 168 bool GetFilename(base::FilePath* path) const override; |
169 virtual bool GetFilenames(std::vector<FileInfo>* filenames) const; | 169 bool GetFilenames(std::vector<FileInfo>* filenames) const override; |
170 virtual bool GetPickledData(const OSExchangeData::CustomFormat& format, | 170 bool GetPickledData(const OSExchangeData::CustomFormat& format, |
171 Pickle* data) const; | 171 Pickle* data) const override; |
172 virtual bool GetFileContents(base::FilePath* filename, | 172 bool GetFileContents(base::FilePath* filename, |
173 std::string* file_contents) const; | 173 std::string* file_contents) const override; |
174 virtual bool GetHtml(base::string16* html, GURL* base_url) const; | 174 bool GetHtml(base::string16* html, GURL* base_url) const override; |
175 virtual bool HasString() const; | 175 bool HasString() const override; |
176 virtual bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const; | 176 bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const override; |
177 virtual bool HasFile() const; | 177 bool HasFile() const override; |
178 virtual bool HasFileContents() const; | 178 bool HasFileContents() const override; |
179 virtual bool HasHtml() const; | 179 bool HasHtml() const override; |
180 virtual bool HasCustomFormat( | 180 bool HasCustomFormat( |
181 const OSExchangeData::CustomFormat& format) const; | 181 const OSExchangeData::CustomFormat& format) const override; |
182 virtual void SetDownloadFileInfo( | 182 void SetDownloadFileInfo( |
183 const OSExchangeData::DownloadFileInfo& download_info); | 183 const OSExchangeData::DownloadFileInfo& download_info) override; |
184 virtual void SetDragImage(const gfx::ImageSkia& image, | 184 void SetDragImage(const gfx::ImageSkia& image, |
185 const gfx::Vector2d& cursor_offset) override; | 185 const gfx::Vector2d& cursor_offset) override; |
186 virtual const gfx::ImageSkia& GetDragImage() const override; | 186 const gfx::ImageSkia& GetDragImage() const override; |
187 virtual const gfx::Vector2d& GetDragImageOffset() const override; | 187 const gfx::Vector2d& GetDragImageOffset() const override; |
188 | 188 |
189 private: | 189 private: |
190 scoped_refptr<DataObjectImpl> data_; | 190 scoped_refptr<DataObjectImpl> data_; |
191 base::win::ScopedComPtr<IDataObject> source_object_; | 191 base::win::ScopedComPtr<IDataObject> source_object_; |
192 | 192 |
193 // Drag image and offset data. Only used for Ash. | 193 // Drag image and offset data. Only used for Ash. |
194 gfx::ImageSkia drag_image_; | 194 gfx::ImageSkia drag_image_; |
195 gfx::Vector2d drag_image_offset_; | 195 gfx::Vector2d drag_image_offset_; |
196 | 196 |
197 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin); | 197 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin); |
198 }; | 198 }; |
199 | 199 |
200 } // namespace ui | 200 } // namespace ui |
201 | 201 |
202 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ | 202 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ |
OLD | NEW |