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 #include "ui/base/dragdrop/os_exchange_data.h" | 5 #include "ui/base/dragdrop/os_exchange_data.h" |
6 | 6 |
7 #include "base/pickle.h" | 7 #include "base/pickle.h" |
8 #include "googleurl/src/gurl.h" | 8 #include "googleurl/src/gurl.h" |
9 | 9 |
10 namespace ui { | 10 namespace ui { |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 OSExchangeData::OSExchangeData() : provider_(CreateProvider()) { | 30 OSExchangeData::OSExchangeData() : provider_(CreateProvider()) { |
31 } | 31 } |
32 | 32 |
33 OSExchangeData::OSExchangeData(Provider* provider) : provider_(provider) { | 33 OSExchangeData::OSExchangeData(Provider* provider) : provider_(provider) { |
34 } | 34 } |
35 | 35 |
36 OSExchangeData::~OSExchangeData() { | 36 OSExchangeData::~OSExchangeData() { |
37 } | 37 } |
38 | 38 |
39 void OSExchangeData::SetString(const string16& data) { | 39 void OSExchangeData::SetString(const base::string16& data) { |
40 provider_->SetString(data); | 40 provider_->SetString(data); |
41 } | 41 } |
42 | 42 |
43 void OSExchangeData::SetURL(const GURL& url, const string16& title) { | 43 void OSExchangeData::SetURL(const GURL& url, const base::string16& title) { |
44 provider_->SetURL(url, title); | 44 provider_->SetURL(url, title); |
45 } | 45 } |
46 | 46 |
47 void OSExchangeData::SetFilename(const base::FilePath& path) { | 47 void OSExchangeData::SetFilename(const base::FilePath& path) { |
48 provider_->SetFilename(path); | 48 provider_->SetFilename(path); |
49 } | 49 } |
50 | 50 |
51 void OSExchangeData::SetFilenames( | 51 void OSExchangeData::SetFilenames( |
52 const std::vector<FileInfo>& filenames) { | 52 const std::vector<FileInfo>& filenames) { |
53 provider_->SetFilenames(filenames); | 53 provider_->SetFilenames(filenames); |
54 } | 54 } |
55 | 55 |
56 void OSExchangeData::SetPickledData(const CustomFormat& format, | 56 void OSExchangeData::SetPickledData(const CustomFormat& format, |
57 const Pickle& data) { | 57 const Pickle& data) { |
58 provider_->SetPickledData(format, data); | 58 provider_->SetPickledData(format, data); |
59 } | 59 } |
60 | 60 |
61 bool OSExchangeData::GetString(string16* data) const { | 61 bool OSExchangeData::GetString(base::string16* data) const { |
62 return provider_->GetString(data); | 62 return provider_->GetString(data); |
63 } | 63 } |
64 | 64 |
65 bool OSExchangeData::GetURLAndTitle(GURL* url, string16* title) const { | 65 bool OSExchangeData::GetURLAndTitle(GURL* url, base::string16* title) const { |
66 return provider_->GetURLAndTitle(url, title); | 66 return provider_->GetURLAndTitle(url, title); |
67 } | 67 } |
68 | 68 |
69 bool OSExchangeData::GetFilename(base::FilePath* path) const { | 69 bool OSExchangeData::GetFilename(base::FilePath* path) const { |
70 return provider_->GetFilename(path); | 70 return provider_->GetFilename(path); |
71 } | 71 } |
72 | 72 |
73 bool OSExchangeData::GetFilenames( | 73 bool OSExchangeData::GetFilenames( |
74 std::vector<FileInfo>* filenames) const { | 74 std::vector<FileInfo>* filenames) const { |
75 return provider_->GetFilenames(filenames); | 75 return provider_->GetFilenames(filenames); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 void OSExchangeData::SetDownloadFileInfo(const DownloadFileInfo& download) { | 160 void OSExchangeData::SetDownloadFileInfo(const DownloadFileInfo& download) { |
161 provider_->SetDownloadFileInfo(download); | 161 provider_->SetDownloadFileInfo(download); |
162 } | 162 } |
163 | 163 |
164 void OSExchangeData::SetInDragLoop(bool in_drag_loop) { | 164 void OSExchangeData::SetInDragLoop(bool in_drag_loop) { |
165 provider_->SetInDragLoop(in_drag_loop); | 165 provider_->SetInDragLoop(in_drag_loop); |
166 } | 166 } |
167 #endif | 167 #endif |
168 | 168 |
169 #if defined(OS_WIN) || defined(USE_AURA) | 169 #if defined(OS_WIN) || defined(USE_AURA) |
170 void OSExchangeData::SetHtml(const string16& html, const GURL& base_url) { | 170 void OSExchangeData::SetHtml(const base::string16& html, const GURL& base_url) { |
171 provider_->SetHtml(html, base_url); | 171 provider_->SetHtml(html, base_url); |
172 } | 172 } |
173 | 173 |
174 bool OSExchangeData::GetHtml(string16* html, GURL* base_url) const { | 174 bool OSExchangeData::GetHtml(base::string16* html, GURL* base_url) const { |
175 return provider_->GetHtml(html, base_url); | 175 return provider_->GetHtml(html, base_url); |
176 } | 176 } |
177 #endif | 177 #endif |
178 | 178 |
179 } // namespace ui | 179 } // namespace ui |
OLD | NEW |