Chromium Code Reviews| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 140 const OSExchangeData& data); | 140 const OSExchangeData& data); |
| 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. |
|
sky
2014/10/30 00:59:10
I thought we were getting rid of virtual too?
Nico
2014/10/30 01:00:01
Yes, dcheng is doing this in a separate pass, usin
| |
| 151 virtual Provider* Clone() const; | 151 virtual Provider* Clone() const override; |
| 152 virtual void MarkOriginatedFromRenderer(); | 152 virtual void MarkOriginatedFromRenderer() override; |
| 153 virtual bool DidOriginateFromRenderer() const; | 153 virtual bool DidOriginateFromRenderer() const override; |
| 154 virtual void SetString(const base::string16& data); | 154 virtual void SetString(const base::string16& data) override; |
| 155 virtual void SetURL(const GURL& url, const base::string16& title); | 155 virtual void SetURL(const GURL& url, const base::string16& title) override; |
| 156 virtual void SetFilename(const base::FilePath& path); | 156 virtual void SetFilename(const base::FilePath& path) override; |
| 157 virtual void SetFilenames(const std::vector<FileInfo>& filenames); | 157 virtual void SetFilenames(const std::vector<FileInfo>& filenames) override; |
| 158 virtual void SetPickledData(const OSExchangeData::CustomFormat& format, | 158 virtual void SetPickledData(const OSExchangeData::CustomFormat& format, |
| 159 const Pickle& data); | 159 const Pickle& data) override; |
| 160 virtual void SetFileContents(const base::FilePath& filename, | 160 virtual 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 virtual void SetHtml(const base::string16& html, |
| 163 const GURL& base_url) override; | |
| 163 | 164 |
| 164 virtual bool GetString(base::string16* data) const; | 165 virtual bool GetString(base::string16* data) const override; |
| 165 virtual bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy, | 166 virtual bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy, |
| 166 GURL* url, | 167 GURL* url, |
| 167 base::string16* title) const; | 168 base::string16* title) const override; |
| 168 virtual bool GetFilename(base::FilePath* path) const; | 169 virtual bool GetFilename(base::FilePath* path) const override; |
| 169 virtual bool GetFilenames(std::vector<FileInfo>* filenames) const; | 170 virtual bool GetFilenames(std::vector<FileInfo>* filenames) const override; |
| 170 virtual bool GetPickledData(const OSExchangeData::CustomFormat& format, | 171 virtual bool GetPickledData(const OSExchangeData::CustomFormat& format, |
| 171 Pickle* data) const; | 172 Pickle* data) const override; |
| 172 virtual bool GetFileContents(base::FilePath* filename, | 173 virtual bool GetFileContents(base::FilePath* filename, |
| 173 std::string* file_contents) const; | 174 std::string* file_contents) const override; |
| 174 virtual bool GetHtml(base::string16* html, GURL* base_url) const; | 175 virtual bool GetHtml(base::string16* html, GURL* base_url) const override; |
| 175 virtual bool HasString() const; | 176 virtual bool HasString() const override; |
| 176 virtual bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const; | 177 virtual bool HasURL( |
| 177 virtual bool HasFile() const; | 178 OSExchangeData::FilenameToURLPolicy policy) const override; |
| 178 virtual bool HasFileContents() const; | 179 virtual bool HasFile() const override; |
| 179 virtual bool HasHtml() const; | 180 virtual bool HasFileContents() const override; |
| 181 virtual bool HasHtml() const override; | |
| 180 virtual bool HasCustomFormat( | 182 virtual bool HasCustomFormat( |
| 181 const OSExchangeData::CustomFormat& format) const; | 183 const OSExchangeData::CustomFormat& format) const override; |
| 182 virtual void SetDownloadFileInfo( | 184 virtual void SetDownloadFileInfo( |
| 183 const OSExchangeData::DownloadFileInfo& download_info); | 185 const OSExchangeData::DownloadFileInfo& download_info) override; |
| 184 virtual void SetDragImage(const gfx::ImageSkia& image, | 186 virtual void SetDragImage(const gfx::ImageSkia& image, |
| 185 const gfx::Vector2d& cursor_offset) override; | 187 const gfx::Vector2d& cursor_offset) override; |
| 186 virtual const gfx::ImageSkia& GetDragImage() const override; | 188 virtual const gfx::ImageSkia& GetDragImage() const override; |
| 187 virtual const gfx::Vector2d& GetDragImageOffset() const override; | 189 virtual const gfx::Vector2d& GetDragImageOffset() const override; |
| 188 | 190 |
| 189 private: | 191 private: |
| 190 scoped_refptr<DataObjectImpl> data_; | 192 scoped_refptr<DataObjectImpl> data_; |
| 191 base::win::ScopedComPtr<IDataObject> source_object_; | 193 base::win::ScopedComPtr<IDataObject> source_object_; |
| 192 | 194 |
| 193 // Drag image and offset data. Only used for Ash. | 195 // Drag image and offset data. Only used for Ash. |
| 194 gfx::ImageSkia drag_image_; | 196 gfx::ImageSkia drag_image_; |
| 195 gfx::Vector2d drag_image_offset_; | 197 gfx::Vector2d drag_image_offset_; |
| 196 | 198 |
| 197 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin); | 199 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin); |
| 198 }; | 200 }; |
| 199 | 201 |
| 200 } // namespace ui | 202 } // namespace ui |
| 201 | 203 |
| 202 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ | 204 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ |
| OLD | NEW |