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 "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "ui/base/dragdrop/os_exchange_data_provider_factory.h" |
9 #include "url/gurl.h" | 10 #include "url/gurl.h" |
10 | 11 |
11 namespace ui { | 12 namespace ui { |
12 | 13 |
13 OSExchangeData::DownloadFileInfo::DownloadFileInfo( | 14 OSExchangeData::DownloadFileInfo::DownloadFileInfo( |
14 const base::FilePath& filename, | 15 const base::FilePath& filename, |
15 DownloadFileProvider* downloader) | 16 DownloadFileProvider* downloader) |
16 : filename(filename), | 17 : filename(filename), |
17 downloader(downloader) { | 18 downloader(downloader) { |
18 } | 19 } |
19 | 20 |
20 OSExchangeData::DownloadFileInfo::~DownloadFileInfo() {} | 21 OSExchangeData::DownloadFileInfo::~DownloadFileInfo() {} |
21 | 22 |
22 OSExchangeData::OSExchangeData() : provider_(CreateProvider()) { | 23 OSExchangeData::OSExchangeData() |
| 24 : provider_(OSExchangeDataProviderFactory::CreateProvider()) { |
23 } | 25 } |
24 | 26 |
25 OSExchangeData::OSExchangeData(Provider* provider) : provider_(provider) { | 27 OSExchangeData::OSExchangeData(Provider* provider) : provider_(provider) { |
26 } | 28 } |
27 | 29 |
28 OSExchangeData::~OSExchangeData() { | 30 OSExchangeData::~OSExchangeData() { |
29 } | 31 } |
30 | 32 |
31 void OSExchangeData::MarkOriginatedFromRenderer() { | 33 void OSExchangeData::MarkOriginatedFromRenderer() { |
32 provider_->MarkOriginatedFromRenderer(); | 34 provider_->MarkOriginatedFromRenderer(); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 void OSExchangeData::SetHtml(const base::string16& html, const GURL& base_url) { | 144 void OSExchangeData::SetHtml(const base::string16& html, const GURL& base_url) { |
143 provider_->SetHtml(html, base_url); | 145 provider_->SetHtml(html, base_url); |
144 } | 146 } |
145 | 147 |
146 bool OSExchangeData::GetHtml(base::string16* html, GURL* base_url) const { | 148 bool OSExchangeData::GetHtml(base::string16* html, GURL* base_url) const { |
147 return provider_->GetHtml(html, base_url); | 149 return provider_->GetHtml(html, base_url); |
148 } | 150 } |
149 #endif | 151 #endif |
150 | 152 |
151 } // namespace ui | 153 } // namespace ui |
OLD | NEW |