Clean up deprecated EncodableValue code (flutter/engine#20981)
Removes the older pointer-based versions of APIs taking EncodableValues for which there are now reference-based versions.
This commit is contained in:
@@ -21,24 +21,12 @@ class EventSink {
|
||||
EventSink(EventSink const&) = delete;
|
||||
EventSink& operator=(EventSink const&) = delete;
|
||||
|
||||
// DEPRECATED. Use the reference version below. This will be removed in the
|
||||
// near future.
|
||||
void Success(const T* event) { SuccessInternal(event); }
|
||||
|
||||
// Consumes a successful event
|
||||
void Success(const T& event) { SuccessInternal(&event); }
|
||||
|
||||
// Consumes a successful event.
|
||||
void Success() { SuccessInternal(nullptr); }
|
||||
|
||||
// DEPRECATED. Use the reference version below. This will be removed in the
|
||||
// near future.
|
||||
void Error(const std::string& error_code,
|
||||
const std::string& error_message,
|
||||
const T* error_details) {
|
||||
ErrorInternal(error_code, error_message, error_details);
|
||||
}
|
||||
|
||||
// Consumes an error event.
|
||||
void Error(const std::string& error_code,
|
||||
const std::string& error_message,
|
||||
|
||||
@@ -24,10 +24,6 @@ class MethodResult {
|
||||
MethodResult(MethodResult const&) = delete;
|
||||
MethodResult& operator=(MethodResult const&) = delete;
|
||||
|
||||
// DEPRECATED. Use the reference versions below. This will be removed in the
|
||||
// near future.
|
||||
void Success(const T* result) { SuccessInternal(result); }
|
||||
|
||||
// Sends a success response, indicating that the call completed successfully
|
||||
// with the given result.
|
||||
void Success(const T& result) { SuccessInternal(&result); }
|
||||
@@ -36,14 +32,6 @@ class MethodResult {
|
||||
// with no result.
|
||||
void Success() { SuccessInternal(nullptr); }
|
||||
|
||||
// DEPRECATED. Use the reference versions below. This will be removed in the
|
||||
// near future.
|
||||
void Error(const std::string& error_code,
|
||||
const std::string& error_message,
|
||||
const T* error_details) {
|
||||
ErrorInternal(error_code, error_message, error_details);
|
||||
}
|
||||
|
||||
// Sends an error response, indicating that the call was understood but
|
||||
// handling failed in some way.
|
||||
//
|
||||
|
||||
@@ -69,7 +69,7 @@ void PlatformHandler::HandleMethodCall(
|
||||
rapidjson::Document::AllocatorType& allocator = document.GetAllocator();
|
||||
document.AddMember(rapidjson::Value(kTextKey, allocator),
|
||||
rapidjson::Value(clipboardData, allocator), allocator);
|
||||
result->Success(&document);
|
||||
result->Success(document);
|
||||
} else if (method.compare(kSetClipboardDataMethod) == 0) {
|
||||
if (!window_) {
|
||||
result->Error(kNoWindowError,
|
||||
|
||||
Reference in New Issue
Block a user