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