OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "ui/base/dragdrop/os_exchange_data_provider_android.h" | |
6 | |
7 namespace ui { | |
8 | |
9 OSExchangeDataProviderAndroid::OSExchangeDataProviderAndroid() {} | |
10 | |
11 OSExchangeDataProviderAndroid::~OSExchangeDataProviderAndroid() {} | |
12 | |
13 OSExchangeData::Provider* OSExchangeDataProviderAndroid::Clone() const { | |
14 OSExchangeDataProviderAndroid* provider = new OSExchangeDataProviderAndroid(); | |
15 provider->string_ = string_; | |
16 | |
17 return provider; | |
18 } | |
19 | |
20 void OSExchangeDataProviderAndroid::MarkOriginatedFromRenderer() { | |
21 // no-op. | |
Ted C
2016/02/25 18:38:53
should all of these be marked as NOTIMPLEMENTED()
hush (inactive)
2016/02/27 01:46:14
yes. That would be good to catch any unexpected ca
| |
22 } | |
23 | |
24 bool OSExchangeDataProviderAndroid::DidOriginateFromRenderer() const { | |
25 return false; | |
26 } | |
27 | |
28 void OSExchangeDataProviderAndroid::SetString(const base::string16& string) { | |
29 string_ = string; | |
30 } | |
31 | |
32 void OSExchangeDataProviderAndroid::SetURL(const GURL& url, | |
33 const base::string16& title) { | |
34 // no op | |
35 } | |
36 | |
37 void OSExchangeDataProviderAndroid::SetFilename(const base::FilePath& path) { | |
38 // no op | |
39 } | |
40 | |
41 void OSExchangeDataProviderAndroid::SetFilenames( | |
42 const std::vector<ui::FileInfo>& filenames) { | |
43 // no op | |
44 } | |
45 | |
46 void OSExchangeDataProviderAndroid::SetPickledData( | |
47 const ui::Clipboard::FormatType& format, | |
48 const base::Pickle& pickle) { | |
49 // no op. | |
50 } | |
51 | |
52 bool OSExchangeDataProviderAndroid::GetString(base::string16* string) const { | |
53 *string = string_; | |
54 return string_.size() > 0; | |
aelias_OOO_until_Jul13
2016/02/25 20:58:00
!string_.empty() (likewise in HasString())
hush (inactive)
2016/02/27 01:46:14
I changed the logic a little. I used a format_ int
| |
55 } | |
56 | |
57 bool OSExchangeDataProviderAndroid::GetURLAndTitle( | |
58 ui::OSExchangeData::FilenameToURLPolicy policy, | |
59 GURL* url, | |
60 base::string16* title) const { | |
61 return false; | |
62 } | |
63 | |
64 bool OSExchangeDataProviderAndroid::GetFilename(base::FilePath* path) const { | |
65 return false; | |
66 } | |
67 | |
68 bool OSExchangeDataProviderAndroid::GetFilenames( | |
69 std::vector<ui::FileInfo>* filenames) const { | |
70 return false; | |
71 } | |
72 | |
73 bool OSExchangeDataProviderAndroid::GetPickledData( | |
74 const ui::Clipboard::FormatType& format, | |
75 base::Pickle* pickle) const { | |
76 return false; | |
77 } | |
78 | |
79 bool OSExchangeDataProviderAndroid::HasString() const { | |
80 return string_.size() > 0; | |
81 } | |
82 | |
83 bool OSExchangeDataProviderAndroid::HasURL( | |
84 ui::OSExchangeData::FilenameToURLPolicy policy) const { | |
85 return false; | |
86 } | |
87 | |
88 bool OSExchangeDataProviderAndroid::HasFile() const { | |
89 return false; | |
90 } | |
91 | |
92 bool OSExchangeDataProviderAndroid::HasCustomFormat( | |
93 const ui::Clipboard::FormatType& format) const { | |
94 return false; | |
95 } | |
96 | |
97 // static | |
98 OSExchangeData::Provider* OSExchangeData::CreateProvider() { | |
99 return new OSExchangeDataProviderAndroid(); | |
100 } | |
101 | |
102 } // namespace ui | |
OLD | NEW |