OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/public/common/drop_data.h" | 5 #include "content/public/common/drop_data.h" |
6 | 6 |
7 namespace content { | 7 namespace content { |
8 | 8 |
9 DropData::DropData() | 9 DropData::DropData() |
10 : did_originate_from_renderer(false), | 10 : did_originate_from_renderer(false), |
11 referrer_policy(blink::WebReferrerPolicyDefault), | 11 referrer_policy(blink::WebReferrerPolicyDefault), |
12 key_modifiers(0) {} | 12 key_modifiers(0) {} |
13 | 13 |
14 DropData::DropData(const DropData& other) = default; | 14 DropData::DropData(const DropData& other) = default; |
15 | 15 |
16 DropData::~DropData() { | 16 DropData::~DropData() { |
17 } | 17 } |
18 | 18 |
19 DropData::Metadata::Metadata() {} | |
20 | |
21 // static | |
22 DropData::Metadata DropData::Metadata::createForMimeType( | |
23 const DropData::Kind& kind, | |
dcheng
2016/05/25 03:25:37
You shouldn't need the DropData:: specifier here.
hush (inactive)
2016/05/25 17:17:15
Done.
| |
24 const base::string16& mime_type) { | |
25 DropData::Metadata metadata; | |
dcheng
2016/05/25 03:25:37
Ditto, DropData:: shouldn't be needed here (and be
hush (inactive)
2016/05/25 17:17:15
Done.
| |
26 metadata.kind = kind; | |
27 metadata.mime_type = mime_type; | |
28 return metadata; | |
29 } | |
30 | |
31 // static | |
32 DropData::Metadata DropData::Metadata::createForFilePath( | |
33 const base::FilePath& filename) { | |
34 DropData::Metadata metadata; | |
35 metadata.kind = DropData::Kind::FILENAME; | |
36 metadata.filename = filename; | |
37 return metadata; | |
38 } | |
39 | |
40 // static | |
41 DropData::Metadata DropData::Metadata::createForFileSystemUrl( | |
42 const GURL& file_system_url) { | |
43 DropData::Metadata metadata; | |
44 metadata.kind = DropData::Kind::FILESYSTEMFILE; | |
45 metadata.file_system_url = file_system_url; | |
46 return metadata; | |
47 } | |
48 | |
49 DropData::Metadata::Metadata(const DropData::Metadata& other) = default; | |
50 | |
51 DropData::Metadata::~Metadata() {} | |
52 | |
19 } // namespace content | 53 } // namespace content |
OLD | NEW |