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_AURA_H_ | 5 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURA_H_ |
6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURA_H_ | 6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURA_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 // Overridden from OSExchangeData::Provider: | 28 // Overridden from OSExchangeData::Provider: |
29 Provider* Clone() const override; | 29 Provider* Clone() const override; |
30 void MarkOriginatedFromRenderer() override; | 30 void MarkOriginatedFromRenderer() override; |
31 bool DidOriginateFromRenderer() const override; | 31 bool DidOriginateFromRenderer() const override; |
32 void SetString(const base::string16& data) override; | 32 void SetString(const base::string16& data) override; |
33 void SetURL(const GURL& url, const base::string16& title) override; | 33 void SetURL(const GURL& url, const base::string16& title) override; |
34 void SetFilename(const base::FilePath& path) override; | 34 void SetFilename(const base::FilePath& path) override; |
35 void SetFilenames(const std::vector<FileInfo>& filenames) override; | 35 void SetFilenames(const std::vector<FileInfo>& filenames) override; |
36 void SetPickledData(const OSExchangeData::CustomFormat& format, | 36 void SetPickledData(const OSExchangeData::CustomFormat& format, |
37 const Pickle& data) override; | 37 const base::Pickle& data) override; |
38 bool GetString(base::string16* data) const override; | 38 bool GetString(base::string16* data) const override; |
39 bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy, | 39 bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy, |
40 GURL* url, | 40 GURL* url, |
41 base::string16* title) const override; | 41 base::string16* title) const override; |
42 bool GetFilename(base::FilePath* path) const override; | 42 bool GetFilename(base::FilePath* path) const override; |
43 bool GetFilenames(std::vector<FileInfo>* filenames) const override; | 43 bool GetFilenames(std::vector<FileInfo>* filenames) const override; |
44 bool GetPickledData(const OSExchangeData::CustomFormat& format, | 44 bool GetPickledData(const OSExchangeData::CustomFormat& format, |
45 Pickle* data) const override; | 45 base::Pickle* data) const override; |
46 bool HasString() const override; | 46 bool HasString() const override; |
47 bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const override; | 47 bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const override; |
48 bool HasFile() const override; | 48 bool HasFile() const override; |
49 bool HasCustomFormat(const OSExchangeData::CustomFormat& format) const | 49 bool HasCustomFormat(const OSExchangeData::CustomFormat& format) const |
50 override; | 50 override; |
51 | 51 |
52 void SetHtml(const base::string16& html, const GURL& base_url) override; | 52 void SetHtml(const base::string16& html, const GURL& base_url) override; |
53 bool GetHtml(base::string16* html, GURL* base_url) const override; | 53 bool GetHtml(base::string16* html, GURL* base_url) const override; |
54 bool HasHtml() const override; | 54 bool HasHtml() const override; |
55 void SetDragImage(const gfx::ImageSkia& image, | 55 void SetDragImage(const gfx::ImageSkia& image, |
56 const gfx::Vector2d& cursor_offset) override; | 56 const gfx::Vector2d& cursor_offset) override; |
57 const gfx::ImageSkia& GetDragImage() const override; | 57 const gfx::ImageSkia& GetDragImage() const override; |
58 const gfx::Vector2d& GetDragImageOffset() const override; | 58 const gfx::Vector2d& GetDragImageOffset() const override; |
59 | 59 |
60 private: | 60 private: |
61 typedef std::map<OSExchangeData::CustomFormat, Pickle> PickleData; | 61 typedef std::map<OSExchangeData::CustomFormat, base::Pickle> PickleData; |
62 | 62 |
63 // Returns true if |formats_| contains a string format and the string can be | 63 // Returns true if |formats_| contains a string format and the string can be |
64 // parsed as a URL. | 64 // parsed as a URL. |
65 bool GetPlainTextURL(GURL* url) const; | 65 bool GetPlainTextURL(GURL* url) const; |
66 | 66 |
67 // Actual formats that have been set. See comment above |known_formats_| | 67 // Actual formats that have been set. See comment above |known_formats_| |
68 // for details. | 68 // for details. |
69 int formats_; | 69 int formats_; |
70 | 70 |
71 // String contents. | 71 // String contents. |
(...skipping 16 matching lines...) Expand all Loading... |
88 // For HTML format | 88 // For HTML format |
89 base::string16 html_; | 89 base::string16 html_; |
90 GURL base_url_; | 90 GURL base_url_; |
91 | 91 |
92 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderAura); | 92 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderAura); |
93 }; | 93 }; |
94 | 94 |
95 } // namespace ui | 95 } // namespace ui |
96 | 96 |
97 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURA_H_ | 97 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURA_H_ |
OLD | NEW |