Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1047)

Unified Diff: ui/base/clipboard/clipboard_android.cc

Issue 1114213004: Remove NOTIMPLEMENTED() logspam on Android clipboard actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/base/clipboard/clipboard_android.cc
diff --git a/ui/base/clipboard/clipboard_android.cc b/ui/base/clipboard/clipboard_android.cc
index abeb9e92ffcb63c2f96658173db838c7450bde50..b9298b482732ab962259c9e0a3d3a53d8f3994aa 100644
--- a/ui/base/clipboard/clipboard_android.cc
+++ b/ui/base/clipboard/clipboard_android.cc
@@ -311,9 +311,21 @@ void ClipboardAndroid::ReadAvailableTypes(ClipboardType type,
return;
}
- NOTIMPLEMENTED();
-
types->clear();
+
+ // would be nice to ask the ClipboardMap to enumerate the types it supports,
+ // rather than hardcode the list here.
+ if (IsFormatAvailable(Clipboard::GetPlainTextFormatType(), type))
+ types->push_back(base::UTF8ToUTF16(kMimeTypeText));
+ if (IsFormatAvailable(Clipboard::GetHtmlFormatType(), type))
+ types->push_back(base::UTF8ToUTF16(kMimeTypeHTML));
+
+ // these formats aren't supported by the ClipboardMap currently, but might
+ // be one day?
+ if (IsFormatAvailable(Clipboard::GetRtfFormatType(), type))
+ types->push_back(base::UTF8ToUTF16(kMimeTypeRTF));
+ if (IsFormatAvailable(Clipboard::GetBitmapFormatType(), type))
+ types->push_back(base::UTF8ToUTF16(kMimeTypePNG));
*contains_filenames = false;
}
« no previous file with comments | « no previous file | ui/base/clipboard/clipboard_test_template.h » ('j') | ui/base/clipboard/clipboard_test_template.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698