Index: ui/base/dragdrop/os_exchange_data_provider_android.cc |
diff --git a/ui/base/dragdrop/os_exchange_data_provider_android.cc b/ui/base/dragdrop/os_exchange_data_provider_android.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9a97c422de6276f2199afa45dafa48d6f7ddd5d9 |
--- /dev/null |
+++ b/ui/base/dragdrop/os_exchange_data_provider_android.cc |
@@ -0,0 +1,102 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "ui/base/dragdrop/os_exchange_data_provider_android.h" |
+ |
+namespace ui { |
+ |
+OSExchangeDataProviderAndroid::OSExchangeDataProviderAndroid() {} |
+ |
+OSExchangeDataProviderAndroid::~OSExchangeDataProviderAndroid() {} |
+ |
+OSExchangeData::Provider* OSExchangeDataProviderAndroid::Clone() const { |
+ OSExchangeDataProviderAndroid* provider = new OSExchangeDataProviderAndroid(); |
+ provider->string_ = string_; |
+ |
+ return provider; |
+} |
+ |
+void OSExchangeDataProviderAndroid::MarkOriginatedFromRenderer() { |
+ // 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
|
+} |
+ |
+bool OSExchangeDataProviderAndroid::DidOriginateFromRenderer() const { |
+ return false; |
+} |
+ |
+void OSExchangeDataProviderAndroid::SetString(const base::string16& string) { |
+ string_ = string; |
+} |
+ |
+void OSExchangeDataProviderAndroid::SetURL(const GURL& url, |
+ const base::string16& title) { |
+ // no op |
+} |
+ |
+void OSExchangeDataProviderAndroid::SetFilename(const base::FilePath& path) { |
+ // no op |
+} |
+ |
+void OSExchangeDataProviderAndroid::SetFilenames( |
+ const std::vector<ui::FileInfo>& filenames) { |
+ // no op |
+} |
+ |
+void OSExchangeDataProviderAndroid::SetPickledData( |
+ const ui::Clipboard::FormatType& format, |
+ const base::Pickle& pickle) { |
+ // no op. |
+} |
+ |
+bool OSExchangeDataProviderAndroid::GetString(base::string16* string) const { |
+ *string = string_; |
+ 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
|
+} |
+ |
+bool OSExchangeDataProviderAndroid::GetURLAndTitle( |
+ ui::OSExchangeData::FilenameToURLPolicy policy, |
+ GURL* url, |
+ base::string16* title) const { |
+ return false; |
+} |
+ |
+bool OSExchangeDataProviderAndroid::GetFilename(base::FilePath* path) const { |
+ return false; |
+} |
+ |
+bool OSExchangeDataProviderAndroid::GetFilenames( |
+ std::vector<ui::FileInfo>* filenames) const { |
+ return false; |
+} |
+ |
+bool OSExchangeDataProviderAndroid::GetPickledData( |
+ const ui::Clipboard::FormatType& format, |
+ base::Pickle* pickle) const { |
+ return false; |
+} |
+ |
+bool OSExchangeDataProviderAndroid::HasString() const { |
+ return string_.size() > 0; |
+} |
+ |
+bool OSExchangeDataProviderAndroid::HasURL( |
+ ui::OSExchangeData::FilenameToURLPolicy policy) const { |
+ return false; |
+} |
+ |
+bool OSExchangeDataProviderAndroid::HasFile() const { |
+ return false; |
+} |
+ |
+bool OSExchangeDataProviderAndroid::HasCustomFormat( |
+ const ui::Clipboard::FormatType& format) const { |
+ return false; |
+} |
+ |
+// static |
+OSExchangeData::Provider* OSExchangeData::CreateProvider() { |
+ return new OSExchangeDataProviderAndroid(); |
+} |
+ |
+} // namespace ui |